Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 25 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,31 @@ Known platforms without wheels:
- PowerPC
- Windows 32bit

## Building from Source

If you are installing fugashi from source, install MeCab first. The build uses
`mecab-config` on Unix-like platforms to find the MeCab headers and libraries.
If `mecab-config` is not on your `PATH`, the build will fail with an error
asking whether MeCab is installed.

On Linux or macOS, a typical local development setup looks like this:

```sh
python -m venv .venv
. .venv/bin/activate
python -m pip install --upgrade pip
python -m pip install -e '.[unidic-lite]'
python -c "from fugashi import Tagger; print(Tagger('-Owakati').parse('麩菓子'))"
```

The editable install builds the Cython extension in place. Installing the
`unidic-lite` extra is not required for compilation, but it gives fugashi a
dictionary so you can immediately verify that the built package works.

If you need to build from source on Windows, install MeCab from
[@chezou's fork](https://github.com/chezou/mecab) first, then run the same
editable install command in your Python environment.

## Usage

```python
Expand Down