|
Jacson | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectde.spieleck.app.ngramj.lm.CategorizerImpl
public class CategorizerImpl
One class to classify a profile against a set of profiles. Note this has a main() method for testing and tuning purposes.
| Field Summary | |
|---|---|
static java.io.FilenameFilter |
LMFilter
|
protected java.util.List |
profiles
|
| Fields inherited from interface de.spieleck.app.ngramj.lm.LMConstants |
|---|
SKIPABLE, USEDNGRAMS |
| Constructor Summary | |
|---|---|
CategorizerImpl()
Construct an uninitialized Categorizer. |
|
CategorizerImpl(java.lang.String dirName)
Construct an Categorizer from a whole Directory of resources. |
|
CategorizerImpl(java.lang.String[] fileNames)
Construct an Categorizer from a List of resource file names. |
|
| Method Summary | |
|---|---|
void |
addProfile(IterableProfile prof)
add an Categorization alternative to the profiles. |
double |
deltaRank(IterableProfile prof1,
Profile prof2)
Calculate "the distance" between two profiles |
protected void |
init(java.io.File fi,
java.lang.String[] names)
Fetch the set of file resources. |
static void |
main(java.lang.String[] args)
Sample application, like the text_cat main mode. |
Profile |
match(Profile prof)
Match a given profile against the Categorizer |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected java.util.List profiles
public static java.io.FilenameFilter LMFilter
| Constructor Detail |
|---|
public CategorizerImpl()
throws java.io.IOException
java.io.IOException
public CategorizerImpl(java.lang.String dirName)
throws NGramException,
java.io.FileNotFoundException
NGramException
java.io.FileNotFoundException
public CategorizerImpl(java.lang.String[] fileNames)
throws NGramException,
java.io.FileNotFoundException
NGramException
java.io.FileNotFoundException| Method Detail |
|---|
protected void init(java.io.File fi,
java.lang.String[] names)
throws NGramException,
java.io.FileNotFoundException
NGramException
java.io.FileNotFoundExceptionpublic void addProfile(IterableProfile prof)
addProfile in interface Categorizerpublic Profile match(Profile prof)
match in interface Categorizer
public double deltaRank(IterableProfile prof1,
Profile prof2)
public static void main(java.lang.String[] args)
throws java.lang.Exception
java.lang.Exception
|
spieleck.de | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||