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))