nitlanguage
/
nit.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
14207b2
)
nlp: use new vector representation
author
Alexandre Terrasa
<alexandre@moz-code.org>
Fri, 6 Oct 2017 17:46:36 +0000
(13:46 -0400)
committer
Alexandre 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
patch
|
blob
|
history
diff --git
a/lib/nlp/nlp.nit
b/lib/nlp/nlp.nit
index
7f9510a
..
0e4dba3
100644
(file)
--- a/
lib/nlp/nlp.nit
+++ b/
lib/nlp/nlp.nit
@@
-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