Comments (2)
I ran into a similar issue using Juman++ (latest release) and pyknp from pip.
Traceback (most recent call last):
File "./benchmark-jumanpp.py", line 10, in <module>
for word in tok.analysis(line.strip()).mrph_list():
File "/mnt/pool/code/tokenizer-benchmark/env/lib/python3.8/site-packages/pyknp/juman/juman.py", line 89, in analysis
return self.juman(input_str, juman_format)
File "/mnt/pool/code/tokenizer-benchmark/env/lib/python3.8/site-packages/pyknp/juman/juman.py", line 76, in juman
result = MList(self.juman_lines(input_str), juman_format)
File "/mnt/pool/code/tokenizer-benchmark/env/lib/python3.8/site-packages/pyknp/juman/mlist.py", line 29, in __init__
mrph = Morpheme(line, mid, juman_format)
File "/mnt/pool/code/tokenizer-benchmark/env/lib/python3.8/site-packages/pyknp/juman/morpheme.py", line 79, in __init__
self._parse_spec(spec.strip("\n"))
File "/mnt/pool/code/tokenizer-benchmark/env/lib/python3.8/site-packages/pyknp/juman/morpheme.py", line 142, in _parse_spec
self.hinsi_id = int(parts[4])
ValueError: invalid literal for int() with base 10: 'input'
from pyknp.
This problem seems to be fixed now.
I tested in the following environments and confirmed that pyknp works well.
JUMAN++ 1.02 / 2.0.0-rc3
KNP current HEAD of master ku-nlp/knp@2ad4f6d / 4.2
pyknp current HEAD of master 38469c8 / latest version from pip (0.4.5)
Python 3.7.9
OS macOS Bug Sur (11.0.1) / Ubuntu 20.04.1
from pyknp.
Related Issues (20)
- comment line with only S-ID infomation is ignored
- New pypi package release? HOT 1
- 特定の文章を入力された際にフリーズする現象
- IndexError caused HOT 1
- 述語項構造にNEの情報が付与されている場合,パースに失敗する HOT 4
- jumanpp 2.0.0-rc3でpyknp/juman/juman.pyのテストに失敗する HOT 1
- pas.cfidがNoneになることがある HOT 4
- UnicodeDecodeError: 'cp932' HOT 2
- AttributeError: 'NoneType' object has no attribute 'group' HOT 2
- parse() returns empty result for a sentence without a punctuation
- consideration of parse process
- 複数スレッド間で `Juman` インスタンスを共有し analysis を実行すると確率的に処理が止まってしまう HOT 2
- KNP seems to ignore the `timeout` option HOT 9
- Documentation of pyknp (pyknp.readthedocs.io) shows no detailed information on knp HOT 1
- How to cite pyknp? HOT 5
- 照応解析(anaphora)オプションを付けると前の入力を読み続ける HOT 3
- jumanの出力が止まったとき無限ループに入る HOT 3
- Exception: Can't find JUMAN command: juman HOT 4
- Unable to tokenize sentences that start with at mark
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pyknp.