oggy22 / Translator

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

Palindrome seeker #67

Closed oggy22 closed 5 years ago

oggy22 commented 5 years ago

Write the algorithm to search for palindromes with multiple words.

The grammar should be relaxed/ignored, or palindromes with more grammatical sense should be scored higher.

Focus on Serbian language.

The input to the algorithm:

The algorithm:

class trie_node
{
  bool wordEnd;
  map<char, trie_node*> children;
}