Handle edge-case corpuses with short sentences

This commit is contained in:
Jaiden Mispy 2016-01-21 12:51:33 -08:00
parent dbae6d3499
commit a272bd69ca
3 changed files with 18 additions and 4 deletions

View file

@ -14,7 +14,7 @@ module Ebooks
end
def initialize(sentences)
@sentences = sentences.reject { |s| s.length < 2 }
@sentences = sentences
@unigrams = {}
@bigrams = {}