public class DummyLemmatizerPlugin extends Object implements LemmatizerPlugin
| Constructor and Description |
|---|
DummyLemmatizerPlugin()
Constructor, creates the lemmatizerMap.
|
| Modifier and Type | Method and Description |
|---|---|
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
|
public DummyLemmatizerPlugin()
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 lemmatizerIndexException - 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 lemmatizerIndexException - in case of a failurepublic String lemmatize_string(String document, Language language) throws IndexException
lemmatize_string in interface LemmatizerPlugindocument - The document to lemmatizelanguage - The language for the lemmatizerIndexException - in case of a failurepublic void add_language(Language language) throws IndexException
add_language in interface LemmatizerPluginlanguage - The language for the lemmatizerIndexException - in case of a failurepublic static void main(String[] args)
args - - The main method input argumentsCopyright © 2014. All Rights Reserved.