self.lower = lower
self.tokenize = tokenize
self.append_eos = append_eos
self.tokens = Counter()
for text in sample:
self.tokens.update(self._preprocess(text))
self.stoi = RESERVED_STOI.copy()
self.itos = RESERVED_ITOS[:]
for token, count in self.tokens.items():
After Change
for text in sample:
self.tokens.update(self.tokenize(text))
self.stoi = RESERVED_STOI.copy()
self.itos = RESERVED_ITOS[:]
for token, count in self.tokens.items():
if count >= min_occurrences: