T
- A type that extends Span. LinkedSpan and BaseLink are provided to
provide this signature: EntityLinker<LinkedSpan<BaseLink>> as a
defaultpublic interface EntityLinker<T extends Span>
Modifier and Type | Method and Description |
---|---|
List<T> |
find(String doctext,
Span[] sentences,
Span[][] tokensBySentence,
Span[][] namesBySentence)
Links an entire document of named entities to an external source
|
List<T> |
find(String doctext,
Span[] sentences,
Span[][] tokensBySentence,
Span[][] namesBySentence,
int sentenceIndex)
Links the names that correspond to the tokens[] spans.
|
void |
init(EntityLinkerProperties initializationData)
allows for passing properties through the EntityLinkerFactory into all
impls dynamically.
|
void init(EntityLinkerProperties initializationData) throws IOException
initializationData
- the EntityLinkerProperties object that contains
properties needed by the impl, as well as any
other objects required for the implIOException
List<T> find(String doctext, Span[] sentences, Span[][] tokensBySentence, Span[][] namesBySentence)
doctext
- the full text of the documenttokensBySentence
- a list of tokens spans that correspond to each sentence.
The outer array refers to the sentence, the inner
array is the tokens for the outer sentence. Similar
in nature to Map of SentenceIndex keys to Listof
tokens as valuesnamesBySentence
- a list of name spans that correspond to each
sentence. The outer array refers to the sentence,
the inner array refers to the tokens that for the
same sentence.Similar in nature to
Map<SentenceIndex,List<Name Spans For This
Sentence's Tokens>> @ returnList<T> find(String doctext, Span[] sentences, Span[][] tokensBySentence, Span[][] namesBySentence, int sentenceIndex)
doctext
- the full text of the documenttokensBySentence
- a list of tokens spans that correspond to each sentence.
The outer array refers to the sentence, the inner
array is the tokens for the outer sentence. Similar
in nature to Map of SentenceIndex keys to Listof
tokens as valuesnamesBySentence
- a list of name spans that correspond to each
sentence. The outer array refers to the sentence,
the inner array refers to the tokens that for the
same sentence.Similar in nature to
Map<SentenceIndex,List<Name Spans For This
Sentence's Tokens>> @ returnsentenceIndex
- the index to the sentence span that the tokens[]
Span[] corresponds toCopyright © 2020 The Apache Software Foundation. All rights reserved.