Open tulerpetontidae opened 1 year ago
I'm so so so sorry for forgetting about this, please forgive me! I've fixed this so the instructions in the README will work! I'll repeat them here just to make sure I don't mess them up:
mkdir curtiz-demo
cd curtiz-demo
# download JmdictFurigana.json (see README for links)
# download and unzip jmdict-eng-3.5.0.json
# download kanjidic2.xml.gz
npm init -y
npm i https://github.com/fasiha/curtiz-japanese-nlp
PORT=8888 JMDICT_SIMPLIFIED_JSON=./jmdict-eng-3.5.0.json npx curtiz-annotate-server
This will print out several lines like
Annotation app listening at http://127.0.0.1:8888, NATIVE mecab=true
3378 entries written
7264 entries written
11120 entries written
...
and then the server will be ready! In another console you can run
curl --data '{"sentence": "へましたらリーダーに切られるだけ"}' \
-X POST \
-H "Content-Type: application/json" \
-o curtiz.json \
http://127.0.0.1:8888/api/v1/sentence
and this will save the output of the REST API in curtiz.json
which you can look at. It'll have details on dictionary hits, conjugations and deconjugations of verbs/adjectives, particles, JDepP bunsetsu dependency trees, kanji entries and breakdowns from Wanikani, etc. 😁
EDIT This assumes you have installed (1) MeCab, (2) Mecab-UniDic, and (3) JDepP on your device! These are big C++ programs so they might be hard to install, let me know.
I'm very happy you're interested in this package, I really like it but I know it's quite hard to use and the documentation is very spotty and it's untested. I am most happy to help answer questions and build docs if you'd like. Right now I'm using this as part of my app quite intensively so it may change, but hopefully only for the better.
I've tried to install your package with
npm i https://github.com/fasiha/curtiz-japanese-nlp
. However, after importing there're some issues. One example of the errors is:What I noticed is that none of the .js files are located in the package, only
.ts
. Is this the expected behaviour? Could you help me with configuring it?