|
Carrot2 v3.3.0
API Documentation |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.carrot2.text.linguistic.DefaultLanguageModelFactory
public final class DefaultLanguageModelFactory
Accessor to all ILanguageModel objects. Default implementation provides support
for all languages listed in LanguageCode, but certain languages may require
additional resources (such as external stemming libraries). Refer to each language's
constant for specific information.
LanguageCode| Field Summary | |
|---|---|
boolean |
mergeResources
Merges stop words and stop labels from all known languages. |
boolean |
reloadResources
Reloads cached stop words and stop labels on every processing request. |
String |
resourcePath
Lexical resources path. |
| Constructor Summary | |
|---|---|
DefaultLanguageModelFactory()
|
|
| Method Summary | |
|---|---|
ILanguageModel |
getLanguageModel(LanguageCode language)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public String resourcePath
/my/custom/resources, stopwords
for English will be loaded from
/my/custom/resources/stopwords.en. Other lexical resources
and other languages will be loaded in the same way.
public boolean reloadResources
public boolean mergeResources
false, only stop words and stop labels of the active language will be
used. If set to true, stop words from all LanguageCodes will
be used together and stop labels from all languages will be used together, no
matter the active language. Lexical resource merging is useful when clustering data
in a mix of different languages and should increase clustering quality in such
settings.
| Constructor Detail |
|---|
public DefaultLanguageModelFactory()
| Method Detail |
|---|
public ILanguageModel getLanguageModel(LanguageCode language)
getLanguageModel in interface ILanguageModelFactoryLanguageCode.
|
Please refer to project documentation at
http://project.carrot2.org |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||