b71af48cb390b3f7d9245d5c58d0b5338d742968,ner_v2/detectors/pattern/phone_number/phone_number_detection.py,PhoneDetector,detect_entity,#PhoneDetector#Any#,63

Before Change


                self.final_phone.append(self.check_for_country_code(phone_number))
                self.final_original_text.append(original_phone_number)
            else:
                self.final_phone.append({"country_calling_code": self.country_code_dict[self.country_code],
                                         "phone_number": phone_number})
                self.final_original_text.append(original_phone_number)

After Change


        self.processed_text = self.text
        self.phone, self.original_phone_text = [], []
        for match in phonenumbers.PhoneNumberMatcher(self.text, self.country_code, leniency=0):
            if match.number.country_code == phonenumbers.country_code_for_region(self.country_code):
                self.phone.append(self.check_for_country_code(str(match.number.national_number)))
                self.original_phone_text.append(self.text[match.start:match.end])
            else:
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 5

Instances


Project Name: hellohaptik/chatbot_ner
Commit Name: b71af48cb390b3f7d9245d5c58d0b5338d742968
Time: 2019-10-17
Author: ruthvik@haptik.co
File Name: ner_v2/detectors/pattern/phone_number/phone_number_detection.py
Class Name: PhoneDetector
Method Name: detect_entity


Project Name: hellohaptik/chatbot_ner
Commit Name: b71af48cb390b3f7d9245d5c58d0b5338d742968
Time: 2019-10-17
Author: ruthvik@haptik.co
File Name: ner_v2/detectors/pattern/phone_number/phone_number_detection.py
Class Name: PhoneDetector
Method Name: detect_entity_with_regex


Project Name: hellohaptik/chatbot_ner
Commit Name: b71af48cb390b3f7d9245d5c58d0b5338d742968
Time: 2019-10-17
Author: ruthvik@haptik.co
File Name: ner_v2/detectors/pattern/phone_number/phone_number_detection.py
Class Name: PhoneDetector
Method Name: check_for_country_code