|
Carrot2 v3.6.0-SNAPSHOT
API Documentation |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.carrot2.text.linguistic.DefaultLexicalDataFactory
public class DefaultLexicalDataFactory
The default management of lexical resources. Resources are read from disk, cached and shared
between all threads using this class. Additional attributes control resource reloading
and merging: resourceLookup, reloadResources,
mergeResources.
| Field Summary | |
|---|---|
boolean |
mergeResources
Merges stop words and stop labels from all known languages. |
boolean |
reloadResources
|
ResourceLookup |
resourceLookup
|
| Constructor Summary | |
|---|---|
DefaultLexicalDataFactory()
|
|
| Method Summary | |
|---|---|
ILexicalData |
getLexicalData(LanguageCode languageCode)
The main logic for acquiring a shared ILexicalData instance. |
static HashSet<String> |
load(IResource resource)
Loads words from a given IResource (UTF-8, one word per line, #-starting lines
are considered comments). |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
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.
public ResourceLookup resourceLookup
| Constructor Detail |
|---|
public DefaultLexicalDataFactory()
| Method Detail |
|---|
public ILexicalData getLexicalData(LanguageCode languageCode)
ILexicalData instance.
getLexicalData in interface ILexicalDataFactory
public static HashSet<String> load(IResource resource)
throws IOException
IResource (UTF-8, one word per line, #-starting lines
are considered comments).
IOException
|
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 | ||||||||