Metadata-Version: 2.1
Name: nori-clone
Version: 1.0.0a0
Summary: UNKNOWN
Home-page: https://github.com/jeongukjae/nori-clone
Author: Ukjae Jeong
Author-email: jeongukjae@gmail.com
License: UNKNOWN
Platform: UNKNOWN
Classifier: Development Status :: 4 - Beta
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Programming Language :: C++
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: Implementation :: CPython
Classifier: Topic :: Software Development :: Libraries
Requires-Python: >=3.7
Description-Content-Type: text/markdown
License-File: LICENSE

# `nori-clone` Python binding

## Usage

### Installation

```sh
pip install nori-clone
```

### Build from source

You can build pip package using Bazel.

```sh
$ bazel build //nori/python:build_pip_pkg
INFO: Analyzed target //nori/python:build_pip_pkg (0 packages loaded, 0 targets configured).
INFO: Found 1 target...
Target //nori/python:build_pip_pkg up-to-date:
  bazel-bin/nori/python/build_pip_pkg
...
$ ./bazel-bin/nori/python/build_pip_pkg dist
++ uname -s
++ tr A-Z a-z
...
++ date
+ echo Thu Jan 20 21:59:37 KST 2022 : '=== Output wheel file is in: ./dist'
Thu Jan 20 21:59:37 KST 2022 : === Output wheel file is in: ./dist
```

You can find your own wheel file in `./dist`.

### How to use

```python
import nori

dictionary = nori.Dictionary()
dictionary.load_prebuilt_dictionary("./dictionary/latest-dictionary.nori")
dictionary.load_user_dictionary("./dictionary/latest-userdict.txt")
tokenizer = nori.NoriTokenizer(dictionary)

result = tokenizer.tokenize("이 프로젝트는 nori를 재작성하는 프로젝트입니다.")

for token in result.tokens:
    print(token.surface)
```

You can check the inferface of Python binding [here(`./nori/bind.pyi`)](./nori/bind.pyi).

<!-- TODO(jeongukjae): add description -->


