|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.itc.irst.tcc.sre.util.StemmerFactory
public class StemmerFactory
Factory class for vending standard Stemmer
objects. Wherever possible, this factory will hand out
references to shared Stemmer
instances.
Field Summary | |
---|---|
private java.util.Properties |
initParams
|
(package private) static org.apache.log4j.Logger |
logger
Define a static logger variable so that it references the Logger instance named StemmerFactory . |
private static StemmerFactory |
stemmerFactory
A prototype for a stemmer factory such that only one instance class can ever exist. |
Constructor Summary | |
---|---|
private |
StemmerFactory()
Constructs a StemmerFactory object. |
Method Summary | |
---|---|
void |
addStemmer(java.lang.String stemmerName,
java.lang.String stemmerClass)
|
Stemmer |
getInstance(java.lang.String name)
Returns the id of the specified stemmer and adds the stemmer to the lexicon if it is not present yet. |
static StemmerFactory |
getStemmerFactory()
Returns StemmerFactory object; only
one StemmerFactory instance can
exist. |
static void |
main(java.lang.String[] args)
|
java.lang.String |
toString()
Returns a String object representing this
StemmerFactory . |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
static org.apache.log4j.Logger logger
StemmerFactory
.
private static StemmerFactory stemmerFactory
private java.util.Properties initParams
Constructor Detail |
---|
private StemmerFactory()
StemmerFactory
object.
Method Detail |
---|
public void addStemmer(java.lang.String stemmerName, java.lang.String stemmerClass)
public Stemmer getInstance(java.lang.String name) throws StemmerNotFoundException
If the
lexicon is read only, stemmers not already present in the
lexicon will not be added and a null
id
will be returned.
name
- the string representation of the stemmer.
StemmerNotFoundException
public java.lang.String toString()
String
object representing this
StemmerFactory
.
toString
in class java.lang.Object
public static StemmerFactory getStemmerFactory()
StemmerFactory
object; only
one StemmerFactory
instance can
exist.
StemmerFactory
objectpublic static void main(java.lang.String[] args) throws java.lang.Exception
java.lang.Exception
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |