Ejemplo n.º 1
0
 def __init__(self, order=1, fullyConnected=False, nIterations=100, topK=1):
   """ Create a new mention finder to find a given list of mention types.
       entityTypes = list of mention types to find (e.g. group, outcome)
   """
   BaseTokenClassifier.__init__(self, 'mallet', topK)
   self.simpleTagger = 'java -Xmx2g -cp ' + self.classpath  \
                        + ' cc.mallet.fst.SimpleTagger'
   self.crfOrder = order
   if fullyConnected:
     self.connectedOption = 'true'
   else:
     self.connectedOption = 'false'
   self.nIterations = nIterations
Ejemplo n.º 2
0
 def __init__(self, binaryThreshold=0.5):
   """ Create a new mention finder to find a given list of mention types.
       entityTypes = list of mention types to find (e.g. group, outcome)
   """
   BaseTokenClassifier.__init__(self, 'megam')
   self.binaryThreshold = binaryThreshold