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

Before Change


        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):
        if word not in self._cache:
            if word not in self.special_tokens:

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: 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: _word_to_hashes


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