563ef6eac21afc6caf62577ee76acd673536176b,soynlp/pos/_dictionary.py,Dictionary,remove_words,#Dictionary#Any#Any#,80
Before Change
elif type(words) != set:
words = set(words)
words_in_domain_dictionary = self._pos_domain.get(tag, {})
words_in_domain_dictionary = {w:s for w,s in words_in_domain_dictionary.items() if not (w in words)}
self._pos_domain[tag] = words_in_domain_dictionary
words_in_dictionary = self._pos.get(tag, {})
words_in_dictionary = {w:s for w,s in words_in_dictionary.items() if not (w in words)}
self._pos[tag] = words_in_dictionary
After Change
self.pos_dict[tag] = dictionary
def remove_words(self, tag, words=None):
if not (tag in self.pos_dict):
raise ValueError("tag {} does not exist".format(tag))
if words == None:
self.pos_dict.pop(tag)
return
words = self._type_check(words)
dictionary = self.pos_dict[tag]
dictionary -= words
return
def _type_check(self, words):
if isinstance(words, str):
In pattern: SUPERPATTERN
Frequency: 5
Non-data size: 9
Instances Project Name: lovit/soynlp
Commit Name: 563ef6eac21afc6caf62577ee76acd673536176b
Time: 2018-01-07
Author: soy.lovit@gmail.com
File Name: soynlp/pos/_dictionary.py
Class Name: Dictionary
Method Name: remove_words
Project Name: scikit-image/scikit-image
Commit Name: c0130cf79d4d702ac25d398052191d00b47b13b0
Time: 2017-07-29
Author: grlee77@gmail.com
File Name: skimage/restoration/_denoise.py
Class Name:
Method Name: _wavelet_threshold
Project Name: vatlab/SoS
Commit Name: 6f75127f8ef3bbc8fc6c2b06f507aa4ac71c8195
Time: 2016-10-12
Author: ben.bog@gmail.com
File Name: pysos/sos_step.py
Class Name:
Method Name: analyze_section
Project Name: deepgram/kur
Commit Name: bc6c691202e5f8755de7b13d88f86286ff878abb
Time: 2017-05-10
Author: ajsyp@syptech.net
File Name: kur/backend/pytorch_backend.py
Class Name: PyTorchBackend
Method Name: process_loss
Project Name: deepgram/kur
Commit Name: bc6c691202e5f8755de7b13d88f86286ff878abb
Time: 2017-05-10
Author: ajsyp@syptech.net
File Name: kur/backend/keras_backend.py
Class Name: KerasBackend
Method Name: process_loss