def __init__(self, nlp):
     pattern = [{'POS': 'NOUN'},
                {'IS_PUNCT': True, 'OP': '?'},
                {'LOWER': 'including'},
                {'POS': 'NOUN'}]
     self.__matcherId = "including"
     PatternMatcher.__init__(self, pattern, nlp, self.__matcherId)
Exemplo n.º 2
0
 def __init__(self, nlp):
     pattern = [
         {'POS': 'NOUN'},
         {'Lower': 'and'},
         {'Lower': 'other'},
         {'POS': 'NOUN'},
     ]
     self.__matcherId = "andOther"
     PatternMatcher.__init__(self, pattern, nlp, self.__matcherId)
Exemplo n.º 3
0
 def __init__(self, nlp):
     pattern = [
         {'POS': 'NOUN'},
         {'IS_PUNCT': True, 'OP': '?'},
         {'LOWER': 'especially'},
         {'POS': 'NOUN'},
     ]
     self.__matcherId = 'especially'
     PatternMatcher.__init__(self, pattern, nlp, self.__matcherId)
Exemplo n.º 4
0
 def __init__(self, nlp):
     pattern = [{
         'POS': 'NOUN'
     }, {
         'LOWER': 'and'
     }, {
         'LOWER': 'other'
     }, {
         'POS': 'NOUN'
     }]
     PatternMatcher.__init__(self, pattern, nlp, "andOther")
 def __init__(self, nlp):
     pattern = [{
         'POS': 'NOUN'
     }, {
         'IS_PUNCT': True,
         'OP': '?'
     }, {
         'LOWER': 'such'
     }, {
         'LOWER': 'as'
     }, {
         'POS': 'NOUN'
     }]
     PatternMatcher.__init__(self, pattern, nlp, "suchAs")
    def __init__(self, nlp):
        '''
        "look for structures containing 4 words: 
        1. the first word is a NOUN (POS stands for Part-Of-Speech), 
        2. second word is <<and>>, 
        3. third is <<other>>
        4.  and the last word is also a Noun".
        '''

        pattern = [{
            'POS': 'NOUN'
        }, {
            'LOWER': 'and'
        }, {
            'LOWER': 'other'
        }, {
            'POS': 'NOUN'
        }]
        PatternMatcher.__init__(self, pattern, nlp, "andOther")