|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eml.sir.rel.disc.RelatednessRanker
An instance of this class compares a SlimDiscourse (profile) to a corpus of other SlimDiscourses (descriptions) and computes a ranking represented in RelatednessResult.
Field Summary | |
static int |
EQU_COMPARISONS
Equation type of RelatednessRanker. |
static int |
EQU_QUERY_WORDS
Equation type of RelatednessRanker. |
WordRelatednessMap |
wrm
|
Constructor Summary | |
RelatednessRanker()
Create a new RelatednessRanker instance. |
Method Summary | |
int |
getEquation()
Return the type number of the equation used to compute the discourse relatedness. |
int |
getOnlyPositiveProfFeatures()
Return wether to use only positive professional features or not. |
Stemmer |
getStemmer()
Return the stemmer. |
double |
getThreshold()
Word relatedness values that are smaller than the threshold will not be used to compute the discourse relatednesses. |
void |
initSlimCorpus(java.lang.String corpusPath)
Creates a new corpus of SlimDiscourses whose relatedness values to an other SlimDiscourse will be computed. |
void |
initWordRelatednessMap(java.lang.String profilesPath,
WordRelatednessComparator wrc)
Creates a new instance of WordRelatednessMap. |
boolean |
isIgnoreIrrelevantClauses()
Return wether to ignore irrelevant clauses or not. |
boolean |
isUsingStopWords()
Return wether stop words are used. |
boolean |
loadSlimCorpus(java.lang.String filePath)
Load an already computed an serialized instance of a corpus. |
boolean |
loadWordRelatednessMap(java.lang.String filePath)
Load an already computed an serialized instance of a WordRelatednessMap. |
RelatednessResult |
rank(SlimDiscourse profile)
|
boolean |
saveSlimCorpus(java.lang.String filePath)
Saerialize an save an already computed instance of a corpus. |
boolean |
saveWordRelatednessMap(java.lang.String filePath)
Serialize an save an already computed instance of a WordRelatednessMap. |
void |
setEquation(int equationNumber)
Set the type number of the equation used to compute the discourse relatedness. |
void |
setIgnoreIrrelevantClauses(boolean ignoreIrrelevantClauses)
Set wether to ignore irrelevant clauses or not. |
void |
setOnlyPositiveProfFeatures(int onlyPositiveProfFeatures)
Set wether to use only positive professional features or not. |
void |
setStemmer(Stemmer stemmer)
Set the stemmer. |
void |
setThreshold(double threshold)
Word relatedness values that are smaller than the threshold will not be used to compute the discourse relatednesses. |
void |
setUseStopWords(boolean useStopWords)
Set wether to use stop words or not. |
java.lang.String |
toString()
Return a String that contains importnat infomration about this instance of RelatednessRanker. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
public static final int EQU_COMPARISONS
public static final int EQU_QUERY_WORDS
public WordRelatednessMap wrm
Constructor Detail |
public RelatednessRanker()
Method Detail |
public Stemmer getStemmer()
public void setStemmer(Stemmer stemmer)
public boolean isIgnoreIrrelevantClauses()
public void setIgnoreIrrelevantClauses(boolean ignoreIrrelevantClauses)
ignoreIrrelevantClauses
- The ignoreIrrelevantClauses to set.public int getOnlyPositiveProfFeatures()
public void setOnlyPositiveProfFeatures(int onlyPositiveProfFeatures)
onlyPositiveProfFeatures
- The onlyPositiveProfFeatures to set.public boolean isUsingStopWords()
public void setUseStopWords(boolean useStopWords)
public double getThreshold()
public void setThreshold(double threshold)
threshold
- The threshold to set.public int getEquation()
public void setEquation(int equationNumber)
equationNumber
- The equation to set.public void initSlimCorpus(java.lang.String corpusPath)
corpusPath
- path of the directory that contains the discourses
of the corpus.public boolean loadSlimCorpus(java.lang.String filePath)
filePath
-
public boolean saveSlimCorpus(java.lang.String filePath)
filePath
-
public void initWordRelatednessMap(java.lang.String profilesPath, WordRelatednessComparator wrc)
profilesPath
- wrc
- public boolean loadWordRelatednessMap(java.lang.String filePath)
public boolean saveWordRelatednessMap(java.lang.String filePath)
filePath
-
public RelatednessResult rank(SlimDiscourse profile)
profile
- ungestemmt. profile wird intern gestemmt und
ggflls. um stoppwoerter bereinigtpublic java.lang.String toString()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |