コード例 #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 = ''
コード例 #2
0
ファイル: dictionaryfinder.py プロジェクト: olabknbit/acres
 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())
コード例 #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())
コード例 #4
0
ファイル: costvaluefinder.py プロジェクト: olabknbit/acres
 def __init__(self):
     """ Create a finder that identifies age phrases. All tokens in
         age phrases are labeled 'age'.
     """
     RuleBasedFinder.__init__(self, [self.label])
コード例 #5
0
ファイル: autoannotate.py プロジェクト: rlsummerscales/acres
 def __init__(self):
   """ Create a finder that labels tokens with a given type if they have this annotation.
   """
   RuleBasedFinder.__init__(self, self.entityTypes)
コード例 #6
0
ファイル: autoannotate.py プロジェクト: olabknbit/acres
 def __init__(self):
     """ Create a finder that labels tokens with a given type if they have this annotation.
 """
     RuleBasedFinder.__init__(self, self.entityTypes)
コード例 #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])
コード例 #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])
コード例 #9
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)
コード例 #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)
コード例 #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])