Permalink
Browse files

remove mono and bi grams

  • Loading branch information...
1 parent e8f76ba commit 2bd6b66fe763fb4f51380ada002aef872bb15bd7 Simon Tokumine committed May 25, 2011
Showing with 3 additions and 2 deletions.
  1. +1 −1 examples/js/trigram.json
  2. +2 −1 src/trigram_search.rb
View

Large diffs are not rendered by default.

Oops, something went wrong.
View
@@ -73,7 +73,8 @@ class String
def to_trigrams
trigrams = Set.new
self.clean_up.split.each do |p|
- word = " " + p.downcase + " "
+# word = " " + p.downcase + " "
+ word = p.downcase
(0..word.length - 3).each do |idx|
trigrams.add(word[idx, 3])
end

0 comments on commit 2bd6b66

Please sign in to comment.