|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectinfo.ephyra.questionanalysis.TermExtractor
public class TermExtractor
Extracts single- and multi-token terms from a sentence. Multi-token terms are named entities or compound terms found in dictionaries.
| Field Summary | |
|---|---|
private static int |
MAX_TERM_LENGTH
Maximum length of a term in tokens. |
| Constructor Summary | |
|---|---|
TermExtractor()
|
|
| Method Summary | |
|---|---|
static java.lang.String[][] |
getNes(java.lang.String sentence)
Extracts named entities from the given sentence. |
static java.lang.String[][] |
getNes(java.lang.String sentence,
java.lang.String context)
Extracts named entities from the given sentence and context string. |
private static java.lang.String[] |
getNeTypes(java.lang.String term,
java.lang.String[][] nes)
Checks if the given term is among the named entities and returns the types of the entities that match it. |
static Term[] |
getSingleTokenTerms(java.lang.String sentence)
Extracts single-token terms from the given sentence. |
static Term[] |
getTerms(java.lang.String sentence,
Dictionary[] dicts)
Extracts terms from the given sentence. |
static Term[] |
getTerms(java.lang.String sentence,
java.lang.String[][] nes,
Dictionary[] dicts)
Extracts terms from the given sentence, reusing named entities that have been extracted before. |
static Term[] |
getTerms(java.lang.String sentence,
java.lang.String context,
java.lang.String[][] nes,
Dictionary[] dicts)
Extracts terms from the given sentence and context string. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private static final int MAX_TERM_LENGTH
| Constructor Detail |
|---|
public TermExtractor()
| Method Detail |
|---|
private static java.lang.String[] getNeTypes(java.lang.String term,
java.lang.String[][] nes)
term - a term, potentially a named entitynes - named entities
public static java.lang.String[][] getNes(java.lang.String sentence)
sentence - sentence to analyze
public static java.lang.String[][] getNes(java.lang.String sentence,
java.lang.String context)
sentence - sentence to analyzecontext - context string
public static Term[] getTerms(java.lang.String sentence,
Dictionary[] dicts)
sentence - sentence to analyzedicts - dictionaries with compound terms
public static Term[] getTerms(java.lang.String sentence,
java.lang.String[][] nes,
Dictionary[] dicts)
sentence - sentence to analyzenes - named entities in the sentencedicts - dictionaries with compound terms
public static Term[] getTerms(java.lang.String sentence,
java.lang.String context,
java.lang.String[][] nes,
Dictionary[] dicts)
sentence - sentence to analyzecontext - context stringnes - named entities in the sentence and context stringdicts - dictionaries with compound terms
public static Term[] getSingleTokenTerms(java.lang.String sentence)
sentence - sentence to analyze
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||