2c5f22199b46837b9801378ce172dcd13f125769,gluonnlp/vocab/subwords.py,NGramHashes,fasttext_hash_asbytes,#Any#Any#,201

Before Change


        h = np.uint32(2166136261)
        s = s.encode(encoding)
        old_settings = np.seterr(all="ignore")
        for c in bytearray(s):
            h = h ^ np.uint32(np.int8(c))
            h = h * np.uint32(16777619)
        np.seterr(**old_settings)
        return h

    def _word_to_hashes(self, word):

After Change



    @staticmethod
    def fasttext_hash_asbytes(ngram, encoding="utf-8"):
        ngram_enc = bytearray(ngram.encode(encoding))
        _fasttext_hash(ngram_enc)

    def _word_to_hashes(self, word):
        if word not in self.special_tokens:
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 4

Instances


Project Name: dmlc/gluon-nlp
Commit Name: 2c5f22199b46837b9801378ce172dcd13f125769
Time: 2018-07-17
Author: leonard@lausen.nl
File Name: gluonnlp/vocab/subwords.py
Class Name: NGramHashes
Method Name: fasttext_hash_asbytes


Project Name: dask/distributed
Commit Name: 383ea0326ae103b5d5e0b62ed9c3cb18510c5b9e
Time: 2021-02-17
Author: jakirkham@gmail.com
File Name: distributed/comm/tcp.py
Class Name: TCP
Method Name: read


Project Name: biotite-dev/biotite
Commit Name: 1675e2873db77528ef1dee6fc49aaccfca9a369b
Time: 2020-11-27
Author: tom.mueller@beachouse.de
File Name: src/biotite/structure/dotbracket.py
Class Name:
Method Name: dot_bracket