e870ef14c590502fb0dc5ff3199e2602a87ec008,ner_v1/detectors/numeral/budget/budget_detection.py,BudgetDetector,_detect_min_budget,#BudgetDetector#Any#Any#,182
Before Change
}
if any([unit in pattern[3] for unit in self.unit_present_list]):
replace_comma = re.sub(",", "", pattern[3])
amount = int(self.regex_object.unit_substitute(replace_comma))
else:
replace_comma = re.sub(",", "", pattern[3])
amount = int(replace_comma)
After Change
r")(?:\b|\.|\s)", flags=re.UNICODE | re.IGNORECASE)
for match in pattern.finditer(self.processed_text):
original, amount, unit = match.groups()
budget = {
"min_budget": 0,
"max_budget": 0,
"type": BUDGET_TYPE_NORMAL
}
scale = self.get_scale(unit)
if amount.replace(",", "").replace(".", "").isdigit():
amount = float(amount.replace(",", "")) * scale
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 4
Instances
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
Project Name: estnltk/estnltk
Commit Name: 65c6e38fa1d0f0d49a3b0dea22047b01bb0d5b13
Time: 2015-07-10
Author: amatsin@gmail.com
File Name: estnltk/wiki/images.py
Class Name:
Method Name: imageParser
Project Name: keras-team/keras
Commit Name: 8532744ad3de309e807ade1b9b6eff9603305b1a
Time: 2018-05-15
Author: contact@stefanocappellini.com
File Name: docs/autogen.py
Class Name:
Method Name: process_docstring