public class LuceneQuerierWT extends LuceneInterface
indexDir, lan, PROCESS_START, verbose| Constructor and Description |
|---|
LuceneQuerierWT(java.util.Locale language,
java.lang.String indexDir,
float pct) |
LuceneQuerierWT(java.lang.String indexDir) |
LuceneQuerierWT(java.lang.String indexDir,
float pct)
Default invocation for English
|
LuceneQuerierWT(java.lang.String language,
java.lang.String indexDir) |
LuceneQuerierWT(java.lang.String language,
java.lang.String indexDir,
float pct) |
| Modifier and Type | Method and Description |
|---|---|
void |
loadIndex(java.util.Locale lan)
Loads the Lucene index (previously created) with the reference
corpus.
|
static void |
main(java.lang.String[] args) |
java.lang.String |
queryIDs(java.lang.String text)
Queries Lucene with the query
text and returns a String
with the ID of those documents that have a score larger than
max_score/percentage |
java.util.LinkedHashMap<java.lang.Float,java.lang.String> |
queryScoreDoc(java.lang.String text)
Queries Lucene with the query
text and returns a LinkedHashMap
with the pairs (score, filename) for those documents that have a score
larger than max_score/percentage |
void |
setAnalyzer()
Sets the analyzer as a new instance of WTAnalyzer
|
setIndexDir, setLanguage, setLanguage, setVerbosepublic LuceneQuerierWT(java.lang.String indexDir,
float pct)
public LuceneQuerierWT(java.lang.String indexDir)
public LuceneQuerierWT(java.lang.String language,
java.lang.String indexDir,
float pct)
public LuceneQuerierWT(java.lang.String language,
java.lang.String indexDir)
public LuceneQuerierWT(java.util.Locale language,
java.lang.String indexDir,
float pct)
public void setAnalyzer()
LUCENE_VERSION - lan - public void loadIndex(java.util.Locale lan)
java.io.IOExceptionpublic java.util.LinkedHashMap<java.lang.Float,java.lang.String> queryScoreDoc(java.lang.String text)
text and returns a LinkedHashMap
with the pairs (score, filename) for those documents that have a score
larger than max_score/percentagetext - public java.lang.String queryIDs(java.lang.String text)
text and returns a String
with the ID of those documents that have a score larger than
max_score/percentagetext - public static void main(java.lang.String[] args)