This is my attempt to create a machine translator from and to multiple natural languages. The method is based on formal (Chomsky) grammars and equivalency rules. The input sentence is parsed into a tree, an equivalent tree is constructed in the target language and traversed to yield the translated text. Currently, I am working on my native Serbian, and English. Future support may include Russian, Spanish and German.
3
stars
0
forks
source link
every_word_composed_of_serbian_letters is slow #56
The test every_word_composed_of_serbian_letters is very slow. Try to speed it up.
Probably a hash would increase the speed at:
Assert::AreNotEqual(std::wstring::npos, Serbian::stAlphabet.find(c),
w.word.c_str());
instead of string.find(wchar)
The test every_word_composed_of_serbian_letters is very slow. Try to speed it up. Probably a hash would increase the speed at: Assert::AreNotEqual(std::wstring::npos, Serbian::stAlphabet.find(c), w.word.c_str()); instead of string.find(wchar)