Modifier and Type | Field and Description |
---|---|
static double |
ORIGINAL_FACTOR |
static double |
WORDNET_FACTOR |
Constructor and Description |
---|
TokenTree() |
Modifier and Type | Method and Description |
---|---|
void |
add(List<Token> tokens,
org.semanticweb.owlapi.model.OWLEntity entity)
Adds the given entity to the tree.
|
void |
add(List<Token> tokens,
org.semanticweb.owlapi.model.OWLEntity entity,
List<Token> originalTokens) |
void |
add(List<Token> tokens,
Set<org.semanticweb.owlapi.model.OWLEntity> entities) |
void |
add(List<Token> tokens,
Set<org.semanticweb.owlapi.model.OWLEntity> entities,
List<Token> originalTokens)
Adds all given entities to the end of the path resulting from the given tokens.
|
Set<org.semanticweb.owlapi.model.OWLEntity> |
get(List<Token> tokens)
Returns the set of entities located by the given list of tokens.
|
Set<org.semanticweb.owlapi.model.OWLEntity> |
getAllEntities(List<Token> tokens) |
void |
getAllEntitiesRec(List<Token> tokens,
int curPosition,
TokenTree curTree,
HashSet<org.semanticweb.owlapi.model.OWLEntity> resEntities) |
Set<EntityScorePair> |
getAllEntitiesScored(List<Token> tokens) |
void |
getAllEntitiesScoredRec(List<Token> tokens,
int curPosition,
TokenTree curTree,
HashSet<EntityScorePair> resEntities,
Double curScore) |
Set<org.semanticweb.owlapi.model.OWLEntity> |
getEntitiesForLongestMatch(List<Token> tokens)
Returns the set of entities assigned to the longest matching token subsequence of the given token sequence.
|
List<Token> |
getLongestMatch(List<Token> tokens)
Returns the list of tokens which are the longest match with entities assigned in this tree.
|
List<Token> |
getOriginalTokensForLongestMatch(List<Token> tokens)
Returns the original ontology tokens for the longest match
|
static void |
main(String[] args) |
void |
setIgnoreStopWords(boolean ignoreStopWords)
If set to TRUE, stopwords like 'of, on' are ignored during creation and retrieval operations.
|
String |
toString() |
String |
toString(int indent) |
public static final double WORDNET_FACTOR
public static final double ORIGINAL_FACTOR
public TokenTree()
public void setIgnoreStopWords(boolean ignoreStopWords)
ignoreStopWords
- the ignoreStopWords to setpublic void add(List<Token> tokens, Set<org.semanticweb.owlapi.model.OWLEntity> entities, List<Token> originalTokens)
tokens
- tokens to locate insertion point for entitiesentities
- entities to addpublic void add(List<Token> tokens, org.semanticweb.owlapi.model.OWLEntity entity)
tokens
- tokens to locate insertion point for entitiesentity
- entity to addpublic void add(List<Token> tokens, org.semanticweb.owlapi.model.OWLEntity entity, List<Token> originalTokens)
public Set<org.semanticweb.owlapi.model.OWLEntity> get(List<Token> tokens)
tokens
- tokens to locate the information to getpublic Set<EntityScorePair> getAllEntitiesScored(List<Token> tokens)
public void getAllEntitiesScoredRec(List<Token> tokens, int curPosition, TokenTree curTree, HashSet<EntityScorePair> resEntities, Double curScore)
public Set<org.semanticweb.owlapi.model.OWLEntity> getAllEntities(List<Token> tokens)
public void getAllEntitiesRec(List<Token> tokens, int curPosition, TokenTree curTree, HashSet<org.semanticweb.owlapi.model.OWLEntity> resEntities)
public List<Token> getLongestMatch(List<Token> tokens)
tokens
- list of tokens to check for longest matchtokens
anchored at the first tokenpublic Set<org.semanticweb.owlapi.model.OWLEntity> getEntitiesForLongestMatch(List<Token> tokens)
tokens
- token sequence to search for longest matchpublic List<Token> getOriginalTokensForLongestMatch(List<Token> tokens)
DL-Learner is licenced under the terms of the GNU General Public License.
Copyright © 2007-2019 Jens Lehmann