def train(X_train, y_train, **kwargs):
crf = Trainer()<EOL>crf.set_params({<EOL>'<STR_LIT>': <NUM_LIT:1.0>,<EOL>'<STR_LIT>': <NUM_LIT>,<EOL>'<STR_LIT>': <NUM_LIT:200>,<EOL>'<STR_LIT>': True,<EOL>})<EOL>for xseq, yseq in zip(X_train, y_train):<EOL><INDENT>crf.append(xseq, yseq)<EOL><DEDENT>crf.train(PART_OF_SPEECH_MODEL_PATH)<EOL>return crf<EOL>
>>> corpus = CorpusReader('annot.opcorpora.xml')
>>> X_train, x_test, y_train, y_test = get_train_data(corpus, test_size=0.33, random_state=42)
>>> crf = train(X_train, y_train)