b76ebb090ae45ca93604b5e162881932e9ab569a,matchzoo/processor_units/processor_units.py,WordHashingUnit,transform,#WordHashingUnit#Any#,432

Before Change


        else:
            // the input shape for CDSSM is
            // [[word1 ngram, ngram], [word2, ngram, ngram], ...]
            assert isinstance(letters[0], list)
            hashing = np.zeros((len(letters), len(self._term_index) + 1))
            for idx in range(len(letters)):
                counted_letters = collections.Counter(letters[idx])
                for key, value in counted_letters.items():

After Change


            :class:`NgramLetterUnit`.
        :return: Word hashing representation of `tri-letters`.
        
        if any(isinstance(elem, list) for elem in letters):
            // the input shape for CDSSM is
            // [[word1 ngram, ngram], [word2, ngram, ngram], ...]
            hashing = np.zeros((len(letters), len(self._term_index) + 1))
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 4

Instances


Project Name: NTMC-Community/MatchZoo
Commit Name: b76ebb090ae45ca93604b5e162881932e9ab569a
Time: 2019-01-04
Author: 948280670@qq.com
File Name: matchzoo/processor_units/processor_units.py
Class Name: WordHashingUnit
Method Name: transform


Project Name: OpenNMT/OpenNMT-py
Commit Name: 90e5b974a7173ab0bba0990a690e32f25f5b725a
Time: 2019-01-14
Author: benzurdopeters@gmail.com
File Name: tools/embeddings_to_torch.py
Class Name:
Method Name: get_vocabs


Project Name: OpenNMT/OpenNMT-py
Commit Name: 594f66417cf0a2abaead1ce6e5f15a2100441682
Time: 2017-09-21
Author: srush@seas.harvard.edu
File Name: onmt/IO.py
Class Name: ONMTDataset
Method Name: __init__