6423b7af778be851da8e27ff0539d1fd6169007c,nltk/corpus/reader/wordnet.py,WordNetCorpusReader,custom_lemmas,#WordNetCorpusReader#Any#Any#,1986
Before Change
l = l.replace("\n", "")
l = l.replace(" ", "_")
if l[0] != "//":
word = l.split("\t")
self._lang_data[lang][0][word[0] ].append(word[2])
self._lang_data[lang][1][word[2].lower()].append(word[0])
// Make sure no more entries are accidentally added subsequently
self._lang_data[lang][0].default_factory = None
After Change
// Support byte-stream files (e.g. as returned by Python 2"s
// open() function) as well as text-stream ones
line = line.decode("utf-8")
if not line.startswith("//"):
offset_pos, lemma_type, lemma = line.strip().split("\t")
lemma = lemma.strip().replace(" ", "_")
self._lang_data[lang][0][offset_pos].append(lemma)
self._lang_data[lang][1][lemma.lower()].append(offset_pos)
// Make sure no more entries are accidentally added subsequently
self._lang_data[lang][0].default_factory = None
self._lang_data[lang][1].default_factory = None
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 6
Instances Project Name: nltk/nltk
Commit Name: 6423b7af778be851da8e27ff0539d1fd6169007c
Time: 2019-05-06
Author: alvations@gmail.com
File Name: nltk/corpus/reader/wordnet.py
Class Name: WordNetCorpusReader
Method Name: custom_lemmas
Project Name: lingpy/lingpy
Commit Name: f65356ce7e624cea941a636a1cb2c912e9ecc186
Time: 2012-11-19
Author: mattis.list@gmail.com
File Name: lingpy/data/ipa/sampa.py
Class Name:
Method Name:
Project Name: NervanaSystems/nlp-architect
Commit Name: f2889ca90ddd60b19070b7e8fbcb0867ae4c47ed
Time: 2019-05-01
Author: peter.izsak@intel.com
File Name: setup.py
Class Name:
Method Name: