Skip to content

Commit

Permalink
Fix the out of alphabet token handling in analyses generation
Browse files Browse the repository at this point in the history
Solves apertium#45
Consider alphanumeric characters to be part of the vocabulary.
  • Loading branch information
AMR-KELEG committed Jun 20, 2019
1 parent 46f5737 commit 3129368
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lttoolbox/fst_processor.cc
Original file line number Diff line number Diff line change
Expand Up @@ -837,7 +837,7 @@ FSTProcessor::isEscaped(wchar_t const c) const
bool
FSTProcessor::isAlphabetic(wchar_t const c) const
{
return alphabetic_chars.find(c) != alphabetic_chars.end();
return (bool)std::iswalnum(c) || alphabetic_chars.find(c) != alphabetic_chars.end();
}

void
Expand Down

0 comments on commit 3129368

Please sign in to comment.