[6c353a]: / medacy / pipeline_components / learners / crf_learner.py

Download this file

14 lines (11 with data), 310 Bytes

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
import sklearn_crfsuite
def get_crf():
"""
:return: a CRF learner with the specification used by medaCy
"""
return sklearn_crfsuite.CRF(
algorithm='l2sgd',
c2=0.1,
max_iterations=100,
all_possible_transitions=True
)