|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.eaglei.lexical.lucene.LuceneEntityExtractionIndexer
public abstract class LuceneEntityExtractionIndexer
Wrapper class for a Lucene index that is used for entity extraction and auto-suggestion. The following index schema is used:
| Field Summary | |
|---|---|
static java.lang.String |
LABEL
|
static java.lang.String |
PREF_LABEL
|
static java.lang.String |
TYPE
|
static java.lang.String |
URI
|
| Constructor Summary | |
|---|---|
LuceneEntityExtractionIndexer(org.apache.lucene.analysis.Analyzer analyzer,
org.apache.lucene.store.Directory directory)
Creates a new LuceneIndexer using the same analyzer for index creation and query execution. |
|
| Method Summary | |
|---|---|
protected abstract void |
addDocuments(org.apache.lucene.index.IndexWriter iwriter)
Adds the documents to the IndexWriter. |
org.apache.lucene.store.Directory |
getDirectory()
|
org.apache.lucene.analysis.Analyzer |
getIndexAnalyzer()
|
void |
index()
Populates the Lucene index. |
protected void |
updateDocument(java.lang.String uri,
java.lang.String prefLabel,
java.util.List<java.lang.String> labels,
java.util.List<java.lang.String> typeURIs,
org.apache.lucene.index.IndexWriter iwriter)
Adds or updates the document for the specified URI. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final java.lang.String URI
public static final java.lang.String LABEL
public static final java.lang.String PREF_LABEL
public static final java.lang.String TYPE
| Constructor Detail |
|---|
public LuceneEntityExtractionIndexer(org.apache.lucene.analysis.Analyzer analyzer,
org.apache.lucene.store.Directory directory)
| Method Detail |
|---|
public org.apache.lucene.analysis.Analyzer getIndexAnalyzer()
public org.apache.lucene.store.Directory getDirectory()
public void index()
throws java.io.IOException
java.io.IOException
protected abstract void addDocuments(org.apache.lucene.index.IndexWriter iwriter)
throws java.io.IOException
iwriter -
java.io.IOException
protected void updateDocument(java.lang.String uri,
java.lang.String prefLabel,
java.util.List<java.lang.String> labels,
java.util.List<java.lang.String> typeURIs,
org.apache.lucene.index.IndexWriter iwriter)
throws java.io.IOException
uri - URI of the resourceprefLabel - The preferred labellabels - All labels to indextypeURIs - All type URIsiwriter - Index writer
java.io.IOException - Thrown if an error occurs
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||