Coder Social home page Coder Social logo

Comments (2)

polm avatar polm commented on June 26, 2024

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.

nobu-g avatar nobu-g commented on June 26, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.