a1622041867f42a071f1d0711b85f31e3ea6e332,ner_v2/detectors/numeral/number/standard_number_detector.py,BaseNumberDetector,_get_unit_from_text,#BaseNumberDetector#Any#Any#,102

Before Change


        if unit_matches:
            original_text = original_text[0][0].strip()
            unit_pre = unit_matches[0][1].strip()
            unit_suc = unit_matches[0][2].strip()
            if unit_pre:
                unit = self.units_map[unit_pre]
            elif unit_suc:
                unit = self.units_map[unit_suc]

After Change


        unit_choices = "|".join(self.units_map)
        unit_matches = re.search(r"((" + unit_choices + r")?[\.\,\s]*" + detected_original + r"\s*(" + unit_choices +
                                 r")?)", processed_text, re.UNICODE)
        original_text, unit_prefix, unit_suffix = unit_matches.groups()
        original_text = original_text.strip()
        if unit_suffix:
            unit = self.units_map[unit_suffix.strip()]
        elif unit_prefix:
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 5

Instances


Project Name: hellohaptik/chatbot_ner
Commit Name: a1622041867f42a071f1d0711b85f31e3ea6e332
Time: 2018-12-12
Author: amans.rlx@gmail.com
File Name: ner_v2/detectors/numeral/number/standard_number_detector.py
Class Name: BaseNumberDetector
Method Name: _get_unit_from_text


Project Name: hellohaptik/chatbot_ner
Commit Name: e870ef14c590502fb0dc5ff3199e2602a87ec008
Time: 2019-03-18
Author: jain.chirag925@gmail.com
File Name: ner_v1/detectors/numeral/budget/budget_detection.py
Class Name: BudgetDetector
Method Name: _detect_max_budget


Project Name: hellohaptik/chatbot_ner
Commit Name: e870ef14c590502fb0dc5ff3199e2602a87ec008
Time: 2019-03-18
Author: jain.chirag925@gmail.com
File Name: ner_v1/detectors/numeral/budget/budget_detection.py
Class Name: BudgetDetector
Method Name: _detect_min_budget