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

can not building lm.binary using unigram #182

Open
Nourahussein opened this issue Sep 8, 2018 · 3 comments
Open

can not building lm.binary using unigram #182

Nourahussein opened this issue Sep 8, 2018 · 3 comments

Comments

@Nourahussein
Copy link

I am trying to use a unigram arpa file to build a kenlm Model in the python wrapper. However, I receive the following error:

error
is there any way to create a binary file using unigrams?

@kpu
Copy link
Owner

kpu commented Sep 8, 2018

No, unigrams create corner cases (the highest order is the same as the lowest order) so I haven't implemented them.

@thuvh
Copy link

thuvh commented Sep 17, 2018

@Nourahussein you can use #26 for unigrams with python,

@lpcauch
Copy link

lpcauch commented Aug 2, 2019

Hey @Nourahussein,

Dis you succeed ? I'm stuck at the creation of the lm.binary, even by using the solution of @thuvh
I created the unigram without any problem but when i wanted to create the lm.binary it throw this error "lm/read_arpa.cc:85 in void lm::ReadNGramHeader(util::FilePiece&, unsigned int) threw FormatLoadException'.
Was expecting n-gram header \1-grams: but got \end\ instead Byte: 209
ERROR"
any advices ?
thanks !

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

4 participants