Exemplo n.º 1
0
 def __init__(self):
   """ Create a finder that identifies age phrases. All tokens in 
       age phrases are labeled 'age'.
   """
   RuleBasedFinder.__init__(self, [self.label])
   self.currentID = 0
   self.currentAbstract = ''
Exemplo n.º 2
0
 def __init__(self, entityType, dictionaryFilename):
     """ Create a finder that labels tokens with a given type if they appear
     in a list of words.
     entityType = the mention types to find (e.g. group, outcome)
     dictionaryFilename = the path of the file containing the list of words
 """
     RuleBasedFinder.__init__(self, [entityType])
     self.wordSet = set([])
     lines = open(dictionaryFilename, 'r').readlines()
     for line in lines:
         self.wordSet.add(line.strip())
Exemplo n.º 3
0
 def __init__(self, entityType,  dictionaryFilename):
   """ Create a finder that labels tokens with a given type if they appear
       in a list of words.
       entityType = the mention types to find (e.g. group, outcome)
       dictionaryFilename = the path of the file containing the list of words
   """
   RuleBasedFinder.__init__(self, [entityType])
   self.wordSet = set([])
   lines = open(dictionaryFilename, 'r').readlines()
   for line in lines:
     self.wordSet.add(line.strip())
Exemplo n.º 4
0
 def __init__(self):
     """ Create a finder that identifies age phrases. All tokens in
         age phrases are labeled 'age'.
     """
     RuleBasedFinder.__init__(self, [self.label])
Exemplo n.º 5
0
 def __init__(self):
   """ Create a finder that labels tokens with a given type if they have this annotation.
   """
   RuleBasedFinder.__init__(self, self.entityTypes)
Exemplo n.º 6
0
 def __init__(self):
     """ Create a finder that labels tokens with a given type if they have this annotation.
 """
     RuleBasedFinder.__init__(self, self.entityTypes)
Exemplo n.º 7
0
 def __init__(self):
   """ Create a finder that identifies population phrases. All tokens in 
       the phrases are labeled 'population'.
   """
   RuleBasedFinder.__init__(self, [self.label])
Exemplo n.º 8
0
 def __init__(self):
     """ Create a finder that identifies threshold phrases. All tokens in 
     time phrases are labeled 'threshold'.
 """
     RuleBasedFinder.__init__(self, [self.label])
 def __init__(self, entityTypes):
   """ Create a finder that labels tokens with a given type if they have this annotation.
       entityType = the mention types to find (e.g. group, outcome)
   """
   RuleBasedFinder.__init__(self, entityTypes)
Exemplo n.º 10
0
 def __init__(self, entityTypes):
     """ Create a finder that labels tokens with a given type if they have this annotation.
     entityType = the mention types to find (e.g. group, outcome)
 """
     RuleBasedFinder.__init__(self, entityTypes)
Exemplo n.º 11
0
 def __init__(self):
   """ Create a finder that labels tokens with a given type if they appear 
       to be a location of a trial.
   """
   RuleBasedFinder.__init__(self, [self.label])