Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

encounter problem when use API #3

Open
kaharjan opened this issue Jun 5, 2018 · 0 comments
Open

encounter problem when use API #3

kaharjan opened this issue Jun 5, 2018 · 0 comments

Comments

@kaharjan
Copy link

kaharjan commented Jun 5, 2018

I have trained Flatcat model according to Code Examples for using library interface the document.
it is trained by cmd command, and could segment by command line. But when I use API to load this model , there is problem. The code is the same as the in the document of Code Examples for using library interface . any idea what it happened ?

Thank you!

thuflatcat=thumorfess.thuflatcat("-model_file baseline.model.flatcat.tar.gz")
  File "__init__.py", line 86, in __init__
    self.model=self.io.read_binary_model_file(self.model_file)
  File "/usr/local/lib/python2.7/dist-packages/Morfessor-2.0.2alpha1-py2.7.egg/morfessor/io.py", line 176, in read_binary_model_file
    model = self.read_binary_file(file_name)
  File "/usr/local/lib/python2.7/dist-packages/Morfessor-2.0.2alpha1-py2.7.egg/morfessor/io.py", line 183, in read_binary_file
    obj = pickle.load(fobj)
cPickle.UnpicklingError: invalid load key, ''.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant