nlp: use new vector representation
authorAlexandre Terrasa <alexandre@moz-code.org>
Fri, 6 Oct 2017 17:46:36 +0000 (13:46 -0400)
committerAlexandre Terrasa <alexandre@moz-code.org>
Fri, 6 Oct 2017 17:46:36 +0000 (13:46 -0400)
Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>

lib/nlp/nlp.nit

index 7f9510a..0e4dba3 100644 (file)
@@ -31,9 +31,9 @@ redef class NLPDocument
                                var lemma = token.lemma
                                if lemma_black_list.has(lemma) then continue
                                if not vector.has_key(lemma) then
-                                       vector[lemma] = 1
+                                       vector[lemma] = 1.0
                                else
-                                       vector[lemma] += 1
+                                       vector[lemma] += 1.0
                                end
                        end
                end