Exemple #1
0
 def __init__(self, lexicon=None, formatter=None):
     self.lexicon = (lexicon if lexicon is not None else
                     RootLexicon.default_text_dictionaries())
     self.morphotactics = TurkishMorphotactics(self.lexicon)
     self.analyzer = RuleBasedAnalyzer(self.morphotactics)
     self.formatter = (DefaultFormatter(True) if formatter is None else
                       MorphAnalyzer.formatters[formatter]())
Exemple #2
0
def test_default_lexicon():
    lex = RootLexicon.default_text_dictionaries()
    assert lex.get_item_by_id('elma_Noun') is not None
    assert len(lex) > 0