:return: Word hashing representation of `tri-letters`.
hashing = np.zeros(len(self._term_index) + 1)
counted_tri_letters = collections.Counter(tri_letters)
for key, value in counted_tri_letters.items():
idx = self._term_index.get(key, 0)
hashing[idx] = value
return hashing
After Change
:class:`NgramLetterUnit`.
:return: Word hashing representation of `tri-letters`.
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():