public class WordDictionaryLookup
extends com.exalead.gni.GNINativeObject
Constructor and Description |
---|
WordDictionaryLookup(WordDictionaryResource resource) |
WordDictionaryLookup(WordDictionaryResource resource,
boolean useBloomFilter) |
WordDictionaryLookup(WordDictionaryResource resource,
boolean useBloomFilter,
boolean prefix) |
Modifier and Type | Method and Description |
---|---|
WordDictionaryEntry[] |
approximate(java.lang.String word,
int nbElements,
int maxDist,
int timeoutMS,
boolean malusOnFirstLetter)
Retrieve each entry whose word is at a maximum edition distance from a specific word
|
void |
destroy() |
long |
getEntry(java.lang.String word)
Retrieve the frequency associated to a word
|
long |
getEntry(java.lang.String word,
int lang)
Retrieve the frequency associated to a word in a specific language
|
long |
getEntryFromByteArray(byte[] word,
int lang)
Retrieve the frequency associated to a word in a specific language
|
FreqDForm |
getEntryWithDisplayForm(java.lang.String word)
Retrieve the frequency and the unique display form associated to a word
|
FreqDForm |
getEntryWithDisplayForm(java.lang.String word,
int lang)
Retrieve the frequency and the unique display form associated to a word in a specific language
|
FreqDForm[] |
getEntryWithMultipleDisplayForms(java.lang.String word)
Retrieve frequency and the display forms associated to a word
|
FreqDForm[] |
getEntryWithMultipleDisplayForms(java.lang.String word,
int lang)
Retrieve frequency and the display forms associated to a word
|
boolean |
hasEntry(java.lang.String word)
Check if a word is part of the dictionary
|
boolean |
hasEntry(java.lang.String word,
int lang)
Check if a word in a specific language is part of the dictionary
|
protected void |
init(WordDictionaryResource resource,
boolean useBloomFilter,
boolean prefix) |
WordDictionaryEntry[] |
match(java.lang.String word,
int nbElements,
int timeoutMS)
Retrieve each entry whose word matches exactly the input word
|
public WordDictionaryLookup(WordDictionaryResource resource, boolean useBloomFilter, boolean prefix)
public WordDictionaryLookup(WordDictionaryResource resource, boolean useBloomFilter)
public WordDictionaryLookup(WordDictionaryResource resource)
public boolean hasEntry(java.lang.String word)
word
- the word to be testedpublic long getEntry(java.lang.String word)
word
- the entry to be foundpublic FreqDForm getEntryWithDisplayForm(java.lang.String word)
word
- the entry to be foundpublic FreqDForm[] getEntryWithMultipleDisplayForms(java.lang.String word)
word
- the entry to be foundpublic boolean hasEntry(java.lang.String word, int lang)
word
- the word to be testedlang
- the language of the wordpublic long getEntry(java.lang.String word, int lang)
word
- the word to be foundlang
- the language of the wordpublic long getEntryFromByteArray(byte[] word, int lang)
word
- the word to be found (as a byte[])lang
- the language of the wordpublic FreqDForm getEntryWithDisplayForm(java.lang.String word, int lang)
word
- the entry to be foundlang
- the language of the wordpublic FreqDForm[] getEntryWithMultipleDisplayForms(java.lang.String word, int lang)
word
- the entry to be foundlang
- the language of the wordpublic WordDictionaryEntry[] approximate(java.lang.String word, int nbElements, int maxDist, int timeoutMS, boolean malusOnFirstLetter)
word
- the reference wordnbElements
- maximum number of returned entriesmaxDist
- maximum edition distancetimeoutMS
- timeout in millisecondsmalusOnFirstLetter
- if true, edition operations on the first letter of the reference word are more expensivepublic WordDictionaryEntry[] match(java.lang.String word, int nbElements, int timeoutMS)
word
- the input wordnbElements
- maximum number of returned entriestimeoutMS
- timeout in millisecondsprotected void init(WordDictionaryResource resource, boolean useBloomFilter, boolean prefix)
public void destroy()
Copyright © 2013 Dassault Systèmes, All Rights Reserved.