mastodon
mastodon copied to clipboard
Using bindict.getPredictions C++ function get incorrect result
I had a problem when i use bindict.getPredictions function in C++.
Blow is code snippet:
BinaryDictionary bindict;
bindict.fromFile("../dictionaries/test/big.dict");
string phrase[] = {"how", "are"};
vector<weighted_string> holder;
vector<weighted_string> predictions = bindict.getPredictions(phrase, 2, holder, 4);
I always get same result whatever I use phrase parameter:
s
'--youˇˇˇ
gloriesˇä
I had the same issue, did you ever fix this? @xdream86 @michaelfester
edit: I noticed the test dictionary generates the correct output, so I'm not sure if it's an issue with the dictionary generation or with the C++ implementation.
I not found the solution. Finally, I take a couple of days to write a myself word predicator.
Alright. I also noticed the BinaryDictionary only allows for a max word weight of 255, but I guess that's a different issue.