Skip to content

encounter problem when use API #3

@kaharjan

Description

@kaharjan

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, ''.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions