32df727166dc81eea151f657d44fd92857329976,newspaper/text.py,StopWords,remove_punctuation,#StopWords#Any#,73
Before Change
stripped_input = content.translate(
self.TRANS_TABLE, string.punctuation)
if content_is_unicode:
return stripped_input.decode("utf-8")
return stripped_input
def candidate_words(self, stripped_input):
return stripped_input.split(" ")
After Change
content_is_unicode = isinstance(content, str)
if content_is_unicode:
content = content.encode("utf-8")
trans_table = {ord(c): None for c in string.punctuation}
stripped_input = content.decode("utf-8").translate(trans_table)
return stripped_input
In pattern: SUPERPATTERN
Frequency: 4
Non-data size: 5
Instances
Project Name: codelucas/newspaper
Commit Name: 32df727166dc81eea151f657d44fd92857329976
Time: 2014-11-11
Author: paul@onfrst.com
File Name: newspaper/text.py
Class Name: StopWords
Method Name: remove_punctuation
Project Name: deepmipt/DeepPavlov
Commit Name: cb0c025ab87216d35b68a2b4b36d61621acd76ba
Time: 2018-01-31
Author: arkhipov@yahoo.com
File Name: deeppavlov/models/ner/slotfill.py
Class Name: DstcSlotFillingNetwork
Method Name: infer
Project Name: google/language-resources
Commit Name: 1a0c8ee08d03397b3e08d6421427afdcbde88945
Time: 2016-06-12
Author: mjansche@google.com
File Name: my/grapheme_cluster.py
Class Name:
Method Name:
Project Name: mittagessen/kraken
Commit Name: d1e6f8655410239f50cdda35f31377839cf630fb
Time: 2017-07-11
Author: andreas.buettner@uni-wuerzburg.de
File Name: kraken/ketos.py
Class Name:
Method Name: train