presidio-analyzer/analyzer/matcher.py
def __check_ner(self, doc, results, field):
        """Check for specific NER in text

        Args:
          doc: spacy document to analyze
          results: array containing the created results
          field: current field type (NER)
        """

        for ent in doc.ents:
            if field.check_label(ent.label_) is False:
                continue
            field.text = ent.text

            if field.validate_result():
                res = self.__create_result(doc, NER_STRENGTH, field,
                                           ent.start_char, ent.end_char)

                if res is not None:
                    results.append(res)

        return results
Check for specific NER in text

        Args:
          doc: spacy document to analyze
          results: array containing the created results
          field: current field type (NER)
        
Check for specific NER in text
Check for specific NER in text
def __check_ner(self, doc, results, field):
        for ent in doc.ents:
            if field.check_label(ent.label_) is False:
                continue
            field.text = ent.text
            if field.validate_result():
                res = self.__create_result(doc, NER_STRENGTH, field,
                                           ent.start_char, ent.end_char)
                if res is not None:
                    results.append(res)
        return results
def __check_ner ( self , doc , results , field ) : for ent in doc . ents : if field . check_label ( ent . label_ ) is False : continue field . text = ent . text if field . validate_result ( ) : res = self . __create_result ( doc , NER_STRENGTH , field , ent . start_char , ent . end_char ) if res is not None : results . append ( res ) return results
Check for specific NER in text
Check for specific NER in text
"""Check for specific NER in text

        Args:
          doc: spacy document to analyze
          results: array containing the created results
          field: current field type (NER)
        """
self
doc
spacy document to analyze
spacy document to analyze
results
array containing the created results
array containing the created results
field
current field type (NER)
current field type ( NER )