public class MikheevLearner extends POSBaselineLearner
{ NN, JJ }
.Modifier and Type | Class and Description |
---|---|
static class |
MikheevLearner.Parameters
Empty class, since there are no parameters
|
Modifier and Type | Field and Description |
---|---|
protected HashMap<String,TreeMap<String,Integer>> |
firstCapitalized
A map for capitalized words appearing first in the sentence.
|
protected HashMap<String,TreeMap<String,Integer>> |
notFirstCapitalized
A map for capitalized words not appearing first in the sentence.
|
table
Constructor and Description |
---|
MikheevLearner()
Default constructor; sets the name to the empty string.
|
MikheevLearner(MikheevLearner.Parameters p)
Does nothing, as there are not parameters.
|
MikheevLearner(String n)
Constructor setting the name of the classifier.
|
Modifier and Type | Method and Description |
---|---|
Set<String> |
allowableTags(Word word)
Returns the set of tags that the given word's suffix has been observed with, or a reasonable
default if the suffix has never been observed.
|
void |
doneLearning()
Runs after all learning is complete.
|
edu.illinois.cs.cogcomp.lbjava.learn.Learner |
emptyClone()
Returns a new, emtpy learner into which all of the parameters that control the behavior of
the algorithm have been copied.
|
void |
forget()
Clears out the table to start fresh.
|
void |
learn(Object example)
Trains the learning algorithm given an object as an example.
|
void |
prune(HashMap<String,TreeMap<String,Integer>> table)
Prunes the specified table.
|
void |
read(ExceptionlessInputStream in)
Reads the binary representation of a learner with this object's run-time type, overwriting
any and all learned or manually specified parameters as well as the label lexicon but without
modifying the feature lexicon.
|
void |
write(ExceptionlessOutputStream out)
Writes the learned function's internal representation in binary form.
|
void |
write(PrintStream out)
Writes the algorithm's internal representation as text.
|
allowableTags, classify, classify, computePrediction, discreteValue, featureValue, getInputType, learn, looksLikeNumber, observed, observedCount, read, scores, write, write
classify, classify, classify, clone, countFeatures, createPrediction, createPrediction, demandLexicon, discreteValue, discreteValue, doneWithRound, featureValue, featureValue, getCurrentLexicon, getExampleArray, getExampleArray, getExtractor, getLabeler, getLabelLexicon, getLexicon, getLexiconDiscardCounts, getLexiconLocation, getModelLocation, getParameters, getPrunedLexiconSize, initialize, learn, learn, learn, read, readLabelLexicon, readLearner, readLearner, readLearner, readLearner, readLearner, readLearner, readLexicon, readLexicon, readLexiconOnDemand, readLexiconOnDemand, readModel, readModel, readParameters, realValue, realValue, realValue, save, saveLexicon, saveModel, scores, scores, scoresAugmented, setCandidates, setEncoding, setExtractor, setLabeler, setLabelLexicon, setLexicon, setLexiconLocation, setLexiconLocation, setLossFlag, setModelLocation, setModelLocation, setParameters, setReadLexiconOnDemand, unclone, unsetLossFlag, write, writeLexicon, writeModel, writeParameters
protected HashMap<String,TreeMap<String,Integer>> firstCapitalized
public MikheevLearner()
public MikheevLearner(String n)
n
- The name of the classifier.public MikheevLearner(MikheevLearner.Parameters p)
public edu.illinois.cs.cogcomp.lbjava.learn.Learner emptyClone()
emptyClone
in class POSBaselineLearner
public void learn(Object example)
learn
in class POSBaselineLearner
example
- An example of the desired learned classifier's behavior.public void doneLearning()
doneLearning
in class edu.illinois.cs.cogcomp.lbjava.learn.Learner
public void forget()
forget
in class POSBaselineLearner
public void prune(HashMap<String,TreeMap<String,Integer>> table)
table
- The table.public Set<String> allowableTags(Word word)
word
- The word.public void write(PrintStream out)
write
in class POSBaselineLearner
out
- The output stream.public void write(ExceptionlessOutputStream out)
write
in class POSBaselineLearner
out
- The output stream.public void read(ExceptionlessInputStream in)
read
in class POSBaselineLearner
in
- The input stream.Copyright © 2017. All rights reserved.