b858e124f53677a0956257b4b7077c407c3d4d88,solutions/set_expansion/set_expand.py,SetExpand,in_vocab,#SetExpand#Any#,99

Before Change


        return [self.__id2term(id) for id in self.np2vec_model.vocab]

    def in_vocab(self, term):
        norm = None
        logger.info("check is in vocab: " + term)
        if term in self.np2id.keys():
            norm = self.np2id[term]
        if norm is None or norm not in self.id2rep or self.__term2id(
                    self.id2rep[norm]) not in self.np2vec_model.vocab:
            return False
        return True

    def get_group(self, term):
        logger.info("check is in vocab: " + term)

After Change


        return [self.__id2term(id) for id in self.np2vec_model.vocab]

    def in_vocab(self, term):
        id = self.__term2id(term)
        if id is None:
            return False
        return True

    def get_group(self, term):
        logger.info("get group of: " + term)
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 6

Instances


Project Name: NervanaSystems/nlp-architect
Commit Name: b858e124f53677a0956257b4b7077c407c3d4d88
Time: 2018-07-23
Author: shira.guskin@intel.com
File Name: solutions/set_expansion/set_expand.py
Class Name: SetExpand
Method Name: in_vocab


Project Name: chainer/chainercv
Commit Name: 1cd87b67822c94c49d30ce1eabce792b3db7c272
Time: 2017-06-14
Author: yuyuniitani@gmail.com
File Name: chainercv/links/model/vgg/vgg.py
Class Name: VGG16Layers
Method Name: __init__


Project Name: microsoft/nni
Commit Name: 4e21e721a65d0ac7c8465c6b7842dd39338bb3d0
Time: 2020-02-09
Author: 656569648@qq.com
File Name: src/sdk/pynni/nni/compression/torch/pruners.py
Class Name: LevelPruner
Method Name: calc_mask