Swiftpack.co - landonepps/mecab as Swift Package

Swiftpack.co is a collection of thousands of indexed Swift packages. Search packages.
landonepps/mecab
MeCab library for SPM (Swift Package Manager)
.package(url: "https://github.com/landonepps/mecab.git", from: "1.0.0")

MeCab for Swift Package Manager

** Originally forked from FLCLjp/iPhone-libmecab (mirror here rnorth/iPhone-libmecab)

MeCab source code updated to current version from taku910/mecab (commit 3a07c4e on Mar 18, 2018)**

Getting Started

Go to the "Package Dependencies" tab in your Xcode project and click the + button to add a package.

Search for "github.com/landonepps/mecab", select "mecab", and click "Add Package".

Click "Add Package" again.

Go to your targets' "Build Phases" tab and make sure "mecab" shows under "Link Binary with Libraries".
If not, click the + button and add it.

You'll also need to add the dictionary files and a mecabrc file which tells MeCab where the dictionary files are located.
For an example, see: landonepps/MecabDemo which uses ipadic.
Make sure your dictionary files and mecabrc file show up under "Copy Bundle Resources".
Screen Shot 2021-10-10 at 3 45 03 PM

You can now import mecab from any file you want to use it from. MeCab is a C++ library and doesn't work cleanly with Swift. For an example of how to write a Swift wrapper, see landonepps/MecabDemo.

Reference

http://d.hatena.ne.jp/seiyan1978/comment?date=20111116&section=1321461642

GitHub

link
Stars: 0
Last commit: 1 week ago

Ad: Job Offers

iOS Software Engineer @ Perry Street Software
Perry Street Software is Jack’d and SCRUFF. We are two of the world’s largest gay, bi, trans and queer social dating apps on iOS and Android. Our brands reach more than 20 million members worldwide so members can connect, meet and express themselves on a platform that prioritizes privacy and security. We invest heavily into SwiftUI and using Swift Packages to modularize the codebase.

Submit a free job ad (while I'm testing this). The analytics numbers for this website are here.

Release Notes

v1.0.0
1 week ago

Swiftpack is being maintained by Petr Pavlik | @ptrpavlik | @swiftpackco | API | Analytics