public class EsaGenerator
extends java.lang.Object
| Constructor and Description |
|---|
EsaGenerator(java.io.File indexPath,
java.lang.String language)
Invokes an instance of the EsaGenerator by loading the
index and the analyzer for the required language
TODO whether the indexpath should be established by default depending on the language |
| Modifier and Type | Method and Description |
|---|---|
Vector |
computeVector(java.lang.String text)
Computes the ESA vector representation for the given text.
|
protected void |
finalize()
TODO important: check when to call this process instead of trusting the
garbage collector
Once the process is over, the index is closed
|
int |
getIndexDimension() |
void |
loadIndex()
Loads the Lucene index (previously created) with the reference
corpus.
|
void |
setAnalyzer()
Set the Lucene analyzer to use according to the given language
|
void |
setIndexPath(java.io.File indexPath)
Set the path to Lucene's index
|
void |
setNormalisation(java.lang.Boolean norm)
Determines whether the ESA vectors are going to be normalised.
|
public EsaGenerator(java.io.File indexPath,
java.lang.String language)
indexPath - language - public void setAnalyzer()
myAnalyzer - public void setIndexPath(java.io.File indexPath)
index_path - public void loadIndex()
java.io.IOExceptionpublic int getIndexDimension()
public Vector computeVector(java.lang.String text)
text - public void setNormalisation(java.lang.Boolean norm)
norm - protected void finalize()
finalize in class java.lang.Object