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

input file format documentation missing #48

Open
mbspng opened this issue Aug 20, 2018 · 0 comments
Open

input file format documentation missing #48

mbspng opened this issue Aug 20, 2018 · 0 comments

Comments

@mbspng
Copy link

mbspng commented Aug 20, 2018

Edit: nvm, misunderstood purpose of Trie.load.

The documentation does not explain what format is expected for files passed to load. I tried the following:

In [1]: import marisa_trie

In [2]: trie = marisa_trie.Trie()

In [3]: trie.load('data')
---------------------------------------------------------------------------
RuntimeError                              Traceback (most recent call last)
<ipython-input-3-d813dec57587> in <module>()
----> 1 trie.load('data')

src/marisa_trie.pyx in marisa_trie._Trie.load()

src/marisa_trie.pyx in marisa_trie._Trie.load()

RuntimeError: marisa-trie/lib/marisa/grimoire/trie/header.h:26: MARISA_FORMAT_ERROR: !test_header(buf)

Documentation does not specify what the file should be formatted like:

In [4]: trie.load?
Docstring:
_Trie.load(self, path)
Load a trie from a specified path.
Type:      builtin_function_or_method
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants