Interface LexicalClusteringStrategy
-
- All Superinterfaces:
ClusteringStrategy
,Serializable
- All Known Implementing Classes:
ChainedLexicalClusteringStrategy
,ContiguousLexicalStrategy
public interface LexicalClusteringStrategy extends ClusteringStrategy
A way to associate a term with a local index out of a given set.A
LexicalCluster
needs a way to retrieve, given a term, the corresponding local index.- Author:
- Alessandro Arrabito, Sebastiano Vigna
- See Also:
LexicalPartitioningStrategy
-
-
Method Summary
Modifier and Type Method Description long
globalNumber(int localIndex, long localNumber)
Returns the global term number given a local index and a local term number (optional operation).int
localIndex(CharSequence term)
Returns the index to which a given term is be mapped by this strategy.-
Methods inherited from interface it.unimi.di.big.mg4j.index.cluster.ClusteringStrategy
numberOfLocalIndices
-
-
-
-
Method Detail
-
localIndex
int localIndex(CharSequence term)
Returns the index to which a given term is be mapped by this strategy.- Parameters:
term
- a term.- Returns:
- the corresponding local index, or -1 if no index contains the term.
-
globalNumber
long globalNumber(int localIndex, long localNumber)
Returns the global term number given a local index and a local term number (optional operation).This operation is not, in general, necessary for a
LexicalCluster
to work, as no action on a local index returns local numbers. It is defined here mainly for completeness and for debugging purposes (in case it is implemented).- Parameters:
localIndex
- the local index.localNumber
- the local term number.- Returns:
- the global term number.
-
-