commit 7f47ef53e47f135b91f5332132cb35830e88c286 Author: aboelhamd Date: Tue Jul 30 21:52:03 2019 +0200 add the part of handling space in the lemma diff --git a/src/SklearnHandler.cpp b/src/SklearnHandler.cpp index 5b47ce4..740b8a8 100644 --- a/src/SklearnHandler.cpp +++ b/src/SklearnHandler.cpp @@ -201,8 +201,14 @@ int main(int argc, char **argv) { // write the record predictDataFile << rulesNums << " "; for (unsigned x = ambig->firTokId; - x < ambig->firTokId + ambig->maxPat; x++) + x < ambig->firTokId + ambig->maxPat; x++) { + + for (unsigned t = 0; t < slTokens[x].size(); t++) + if (slTokens[x][t] == ' ') + slTokens[x].replace(t, 1, "_"); + predictDataFile << slTokens[x] << " "; + } predictDataFile << endl; } // predict mode