vsm :: IndexMatch
request
in an Index
vsm :: IndexMatch :: defaultinit
vsm :: IndexMatch :: document=
Document matching therequest_vector
vsm :: IndexMatch :: similarity=
Similarity between therequest
and the doc
.
vsm $ IndexMatch :: SELF
Type of this instance, automatically specialized in every classcore :: Object :: class_factory
Implementation used byget_class
to create the specific class.
vsm :: IndexMatch :: defaultinit
core :: Object :: defaultinit
core :: Comparable :: defaultinit
vsm :: IndexMatch :: document=
Document matching therequest_vector
core :: Object :: is_same_instance
Return true ifself
and other
are the same instance (i.e. same identity).
core :: Object :: is_same_serialized
Isself
the same as other
in a serialization context?
core :: Object :: is_same_type
Return true ifself
and other
have the same dynamic type.
core :: Object :: output_class_name
Display class name on stdout (debug only).vsm :: IndexMatch :: similarity=
Similarity between therequest
and the doc
.
# A match to a `request` in an `Index`
class IndexMatch[DOC: Document]
super Comparable
# Document matching the `request_vector`
var document: DOC
# Similarity between the `request` and the `doc`.
#
# Result is in the range 0.0 .. 1.1 where 0.0 means no similarity and 1.0
# means perfect similarity.
var similarity: Float
redef fun to_s do return "{document} ({similarity})"
end
lib/vsm/vsm.nit:375,1--389,3