cd1167b2085bbc51f606e9bac647c8ac0ad21576,estnltk/wiki/internalLink.py,,addIntLinks,#Any#,146
Before Change
nextStart = spans[index+1][0]
except IndexError:
nextStart = None
linktext = t[start+2:end-2]
if "|" in linktext:
linktext = linktext.split("|")
label = linktext[1]
title = linktext[0]
After Change
//TODO: FULL LABEL ISSUE
t = sectionObj["text"]
spans = [(m.start(), m.end()) for m in intLinkRegex.finditer(t)]
if spans:
text = ""
links = []
link = {}
lastEnd = 0
for index in range(len(spans)):
start = spans[index][0]
end = spans[index][1]
try:
nextStart = spans[index+1][0]
except IndexError:
nextStart = None
linktext = t[start:end].replace("[", "").strip("{:;-., ")
if "|" in linktext:
linktext = linktext.split("|")
label = linktext[1].replace("]", "")
title = linktext[0]
url = urlBegin + title
else:
label = linktext.replace("]", "")
title = linktext[:linktext.index("]")]
url = urlBegin+title
text+=t[lastEnd:start]+label
//text+=t[end:nextStart]
lastEnd = end
link["start"] =1+ len(text)- len(label)
link["end"] = len(text)
link["label"] = label
link["title"] = title
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 6
Instances
Project Name: estnltk/estnltk
Commit Name: cd1167b2085bbc51f606e9bac647c8ac0ad21576
Time: 2015-07-06
Author: amatsin@gmail.com
File Name: estnltk/wiki/internalLink.py
Class Name:
Method Name: addIntLinks
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: 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