public abstract class AbstractRanker extends Object implements Ranker
Modifier and Type | Field and Description |
---|---|
static String |
INDEX_OPTION |
static String |
LIMIT_OPTION |
Constructor and Description |
---|
AbstractRanker()
Empty constructor
Use setFinder before using this class
|
AbstractRanker(Finder aFinder) |
Modifier and Type | Method and Description |
---|---|
static List<DecompoundedWord> |
filterAndSort(List<DecompoundedWord> aSplits)
Expects that the splits list contains at least one element and that this is the unsplit word.
|
protected BigInteger |
freq(Fragment aWord)
Gets the frequency of a Split Element
|
protected BigInteger |
freq(Fragment aWord1,
Fragment aWord2)
Returns the frequency of n-grams that contain both split elements
|
protected BigInteger |
freq(String[] aWords)
Returns the frequency for a array of words
|
Finder |
getFinder() |
static String |
getIndexPathOption(org.apache.ivy.util.cli.CommandLine aCmd) |
static int |
getLimitOption(org.apache.ivy.util.cli.CommandLine aCmd) |
DecompoundedWord |
highestRank(DecompoundingTree aTree)
Returns the highest ranked split
|
abstract DecompoundedWord |
highestRank(ValueNode<DecompoundedWord> aParent,
List<DecompoundedWord> aPath) |
void |
setFinder(Finder aFinder)
Sets the finder to the ranking algorithm
|
public static final String INDEX_OPTION
public static final String LIMIT_OPTION
public AbstractRanker()
public AbstractRanker(Finder aFinder)
public Finder getFinder()
protected BigInteger freq(Fragment aWord)
protected BigInteger freq(Fragment aWord1, Fragment aWord2)
protected BigInteger freq(String[] aWords)
public static int getLimitOption(org.apache.ivy.util.cli.CommandLine aCmd)
public static String getIndexPathOption(org.apache.ivy.util.cli.CommandLine aCmd)
public void setFinder(Finder aFinder)
Ranker
public static List<DecompoundedWord> filterAndSort(List<DecompoundedWord> aSplits)
public DecompoundedWord highestRank(DecompoundingTree aTree)
Ranker
highestRank
in interface Ranker
aTree
- A split tree generated by a splitting algorithmpublic abstract DecompoundedWord highestRank(ValueNode<DecompoundedWord> aParent, List<DecompoundedWord> aPath)
Copyright © 2011–2015. All rights reserved.