Skip to content
Snippets Groups Projects
Commit 1ac29b7f authored by Franck Dary's avatar Franck Dary
Browse files

Fixed cost of transition ADDCHARTOWORD

parent 78a3f0ed
Branches
No related tags found
No related merge requests found
...@@ -175,7 +175,7 @@ void Transition::initAddCharToWord() ...@@ -175,7 +175,7 @@ void Transition::initAddCharToWord()
auto letter = fmt::format("{}", config.getLetter(config.getCharacterIndex())); auto letter = fmt::format("{}", config.getLetter(config.getCharacterIndex()));
auto & goldWord = config.getConst("FORM", config.getWordIndex(), 0).get(); auto & goldWord = config.getConst("FORM", config.getWordIndex(), 0).get();
auto & curWord = config.getLastNotEmptyConst("FORM", config.getWordIndex()).get(); auto & curWord = config.getAsFeature("FORM", config.getWordIndex()).get();
if (curWord.size() + letter.size() > goldWord.size()) if (curWord.size() + letter.size() > goldWord.size())
return 1; return 1;
...@@ -399,7 +399,7 @@ void Transition::initEOS() ...@@ -399,7 +399,7 @@ void Transition::initEOS()
continue; continue;
auto otherStackIndex = config.getStack(i); auto otherStackIndex = config.getStack(i);
auto otherStackGovPred = config.getLastNotEmptyHypConst(Config::headColName, otherStackIndex); auto otherStackGovPred = config.getAsFeature(Config::headColName, otherStackIndex);
if (util::isEmpty(otherStackGovPred)) if (util::isEmpty(otherStackGovPred))
++cost; ++cost;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment