nitlanguage
/
nit.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
20caa05
)
lib/vsm: actually use tf.idf when matching documents
author
Alexandre Terrasa
<alexandre@moz-code.org>
Thu, 12 Oct 2017 00:48:27 +0000
(20:48 -0400)
committer
Alexandre Terrasa
<alexandre@moz-code.org>
Thu, 12 Oct 2017 00:49:00 +0000
(20:49 -0400)
Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>
lib/vsm/vsm.nit
patch
|
blob
|
history
diff --git
a/lib/vsm/vsm.nit
b/lib/vsm/vsm.nit
index
8eaeca8
..
4a64f99
100644
(file)
--- a/
lib/vsm/vsm.nit
+++ b/
lib/vsm/vsm.nit
@@
-208,7
+208,8
@@
class StringIndex
# See `match_vector`.
fun match_string(query: String): Array[IndexMatch] do
var vector = parse_string(query)
- return match_vector(vector)
+ var doc = new Document("", "", vector)
+ return match_vector(doc.terms_frequency)
end
# Parse the `string` as a Vector