Class wais.WAISWeightedRanking
All Packages Class Hierarchy This Package Previous Next Index
Class wais.WAISWeightedRanking
java.lang.Object
|
+----query.ExpNode
|
+----wais.WAISWeightedRanking
- public class WAISWeightedRanking
- extends ExpNode
- implements SourceNode
An ExpNode that represents a weighted ranking in a WAIS ranking
expression. The way we simulate weighted rankings (since WAIS has
no support for ranking expressions is to repeat the child
that descends from the weighted ranking multiple times. The
repetition amount is the (integer) muliple that the weight of the
term is of the lowest weighted term). For example, assume
a STARTS expression like list(("distributed" 0.6)("databases" 0.3))
This terms in to a WAIS expression of:
distribed distributed databases
(OR is implicit between the words).
So a WAISWeightedRanking has one child (the term to be repeated)
and an integer value which is the multiple number of times
this term should be repeated.
-
WAISWeightedRanking(Query, int)
- Create a new WAISWeightedRanking
-
GetRepeat()
-
-
RankBy(Document)
- This is a slot to do some primitive ranking on this sub-tree.
-
Unparse()
- Return the string representation of the subtree
rooted at this weighted ranking
WAISWeightedRanking
public WAISWeightedRanking(Query query,
int repeat)
- Create a new WAISWeightedRanking
- Parameters:
- query - The query context of the word literal
- repeat - "weight" (repeat count) of the child.
GetRepeat
public int GetRepeat()
Unparse
public String Unparse()
- Return the string representation of the subtree
rooted at this weighted ranking
- Overrides:
- Unparse in class ExpNode
RankBy
public float RankBy(Document doc)
- This is a slot to do some primitive ranking on this sub-tree.
Unimplemented now except for the recursion
- Parameters:
- doc - The document to rank using this sub-tree
All Packages Class Hierarchy This Package Previous Next Index