|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectde.aitools.ir.retrievalmodels.representation.suffixtree.SuffixParser
public class SuffixParser
This class contains several helper methods which are often used during construction of a suffix tree.
Constructor Summary | |
---|---|
SuffixParser()
|
Method Summary | |
---|---|
static java.lang.String |
getCommonPrefix(java.util.List<Suffix> suffixes)
Returns the common prefix shared by all texts which are represented by this node. |
static java.lang.String |
getCommonPrefix(java.util.List<Suffix> suffixes,
int commonPrefixLength)
Returns the supposed common prefix of the suffixes . |
static java.util.List<java.lang.String> |
getCommonPrefixWords(java.util.List<Suffix> suffixes,
int commonPrefixLength)
|
static java.lang.String |
getFirstWord(Suffix currSuffix)
Returns the first word of the suffix currSuffix as
String . |
static java.util.List<Suffix> |
getSuffixReferences(java.lang.Iterable<java.lang.String> texts)
Returns all references to all suffixes of the texts inside the Collection texts . |
static java.util.List<Suffix> |
getSuffixReferences(java.lang.String text)
|
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SuffixParser()
Method Detail |
---|
public static java.util.List<Suffix> getSuffixReferences(java.lang.Iterable<java.lang.String> texts)
Collection texts
. The references to each suffix is an
instance of Suffix
.
texts
- The set of texts to get references to its suffixes for.
Suffix
instances.public static java.util.List<Suffix> getSuffixReferences(java.lang.String text)
public static java.lang.String getFirstWord(Suffix currSuffix)
currSuffix
as
String
.
currSuffix
- The suffix to get the first word of.
public static java.lang.String getCommonPrefix(java.util.List<Suffix> suffixes, int commonPrefixLength)
suffixes
. This
method does not compute whether the prefix is really common to all of the
suffixes. It will just return the first commonPrefixLength
letters.
suffixes
- The suffixes to get the common prefix for.commonPrefixLength
- The length of the common prefix.
public static java.util.List<java.lang.String> getCommonPrefixWords(java.util.List<Suffix> suffixes, int commonPrefixLength)
public static java.lang.String getCommonPrefix(java.util.List<Suffix> suffixes)
suffixes
- The suffixes to get the common prefix for.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |