|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.gcube.indexmanagement.common.linguistics.lemmatizerplugin.DummyLemmatizerPlugin
public class DummyLemmatizerPlugin
The class that provides methods for language identification. The init method can be called once to initialize lemmatizers for the different languages. To add a new language after the init has been called, use the addLanguage method.
| Constructor Summary | |
|---|---|
DummyLemmatizerPlugin()
Constructor, creates the lemmatizerMap. |
|
| Method Summary | |
|---|---|
void |
add_language(Language language)
Add a lemmatizer for the language |
void |
init(String configFile,
Vector<Language> languages)
Method that initialises the implementation of the language id |
String |
lemmatize_string(String document,
Language language)
Detects the language in the document |
String |
lemmatize_word(String word,
Language language)
Detects the language in the document |
static void |
main(String[] args)
Test main method to test the loading of the language id plugin and functions in the class |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public DummyLemmatizerPlugin()
| Method Detail |
|---|
public void init(String configFile,
Vector<Language> languages)
throws IndexException
init in interface LemmatizerPluginconfigFile - The config file needed by the identify languagelanguages - The languages that shall be supported by the lemmatizer
IndexException - when the language_identifier can not be created
If the init is called with a vector of languages, and one or several
of the lemmatizers can not be created, the init method will
throw an IndexException with the lanuages that failed like this:
IndexExecption("en","fr","it")
public String lemmatize_word(String word,
Language language)
throws IndexException
lemmatize_word in interface LemmatizerPluginword - The documentlanguage - The language for the lemmatizer
IndexException - in case of a failure
public String lemmatize_string(String document,
Language language)
throws IndexException
lemmatize_string in interface LemmatizerPlugindocument - The document to lemmatizelanguage - The language for the lemmatizer
IndexException - in case of a failure
public void add_language(Language language)
throws IndexException
add_language in interface LemmatizerPluginlanguage - The language for the lemmatizer
IndexException - in case of a failurepublic static void main(String[] args)
args - - The main method input arguments
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||