mastodon icon indicating copy to clipboard operation
mastodon copied to clipboard

Using bindict.getPredictions C++ function get incorrect result

Open xdream86 opened this issue 10 years ago • 3 comments

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ˇä 

xdream86 avatar Oct 09 '14 04:10 xdream86

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.

castel50 avatar Sep 25 '15 19:09 castel50

I not found the solution. Finally, I take a couple of days to write a myself word predicator.

xdream86 avatar Sep 27 '15 16:09 xdream86

Alright. I also noticed the BinaryDictionary only allows for a max word weight of 255, but I guess that's a different issue.

castel50 avatar Sep 27 '15 16:09 castel50