from nltk.corpus.reader import TaggedCorpusReader
from nltk.tag import AffixTagger
import pickle
#trainer
reader = TaggedCorpusReader('.', 'latin_training_set.pos')
train_sents = reader.tagged_sents()
two_prefix_tagger = AffixTagger(train_sents, affix_length=2)
two_prefix_tagger.evaluate(train_sents)
three_prefix_tagger = AffixTagger(train_sents, affix_length=3)
three_prefix_tagger.evaluate(train_sents)
four_prefix_tagger = AffixTagger(train_sents, affix_length=4)
four_prefix_tagger.evaluate(train_sents)
suffix_tagger = AffixTagger(train_sents, affix_length=-2)
suffix_tagger.evaluate(train_sents)
three_suffix_tagger = AffixTagger(train_sents, affix_length=-3)
three_suffix_tagger.evaluate(train_sents)
four_suffix_tagger = AffixTagger(train_sents, affix_length=-4)
four_suffix_tagger.evaluate(train_sents)
five_suffix_tagger = AffixTagger(train_sents, affix_length=-5)
five_suffix_tagger.evaluate(train_sents)
six_suffix_tagger = AffixTagger(train_sents, affix_length=-6)
six_suffix_tagger.evaluate(train_sents)