0b9a5f4074f2b6f5ad3322234a82ac921fe1f358,spacy/lang/zh/__init__.py,Chinese,make_doc,#Chinese#,26

Before Change


            words = [x for x in words if x]
            return Doc(self.vocab, words=words, spaces=[False] * len(words))
        else:
            words = []
            spaces = []
            for token in self.tokenizer(text):
                words.extend(list(token.text))
                spaces.extend([False] * len(token.text))
                spaces[-1] = bool(token.whitespace_)
            return Doc(self.vocab, words=words, spaces=spaces)


__all__ = ["Chinese"]

After Change


    Defaults = ChineseDefaults  // override defaults

    def make_doc(self, text):
        return self.tokenizer(text)


__all__ = ["Chinese"]
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 7

Instances


Project Name: explosion/spaCy
Commit Name: 0b9a5f4074f2b6f5ad3322234a82ac921fe1f358
Time: 2019-11-11
Author: adrianeboyd@gmail.com
File Name: spacy/lang/zh/__init__.py
Class Name: Chinese
Method Name: make_doc


Project Name: nilmtk/nilmtk
Commit Name: b2c5784dad5c79639b0c5fe9a8a93a3946d1ae01
Time: 2015-07-21
Author: jack-list@xlk.org.uk
File Name: nilmtk/electric.py
Class Name: Electric
Method Name: activation_series


Project Name: dmlc/dgl
Commit Name: cf8a3fb30547d6e980ecd8182f64a51df8e55c62
Time: 2021-02-10
Author: expye@outlook.com
File Name: python/dgl/backend/pytorch/tensor.py
Class Name:
Method Name: pack_padded_tensor