Class: TfIdfSimilarity::Tokenizer
- Inherits:
-
Object
- Object
- TfIdfSimilarity::Tokenizer
- Defined in:
- lib/tf-idf-similarity/tokenizer.rb
Instance Method Summary collapse
-
#tokenize(text) ⇒ Enumerator
Tokenizes a text.
Instance Method Details
#tokenize(text) ⇒ Enumerator
Tokenizes a text.
13 14 15 16 17 |
# File 'lib/tf-idf-similarity/tokenizer.rb', line 13 def tokenize(text) UnicodeUtils.each_word(text).map do |word| Token.new(word) end end |