Package | Description |
---|---|
edu.illinois.cs.cogcomp.lbjava.classify | |
edu.illinois.cs.cogcomp.lbjava.learn |
Modifier and Type | Method and Description |
---|---|
protected Feature |
RealConjunctiveFeature.getArgumentKey(Feature f,
Lexicon lexicon,
boolean training,
int label)
A helper method for
RealConjunctiveFeature.getFeatureKey(Lexicon,boolean,int) , this method computes the
feature keys corresponding to the arguments of the conjunction. |
protected DiscreteFeature |
DiscreteConjunctiveFeature.getArgumentKey(Feature f,
Lexicon lexicon,
int label)
A helper method for
DiscreteConjunctiveFeature.getFeatureKey(Lexicon,boolean,int) , this method computes the
feature keys corresponding to the arguments of the conjunction. |
Feature |
Feature.getFeatureKey(Lexicon lexicon)
Return the feature that should be used to index this feature into a lexicon.
|
Feature |
RealReferringFeature.getFeatureKey(Lexicon lexicon,
boolean training,
int label)
Return the feature that should be used to index this feature into a lexicon.
|
Feature |
RealPrimitiveStringFeature.getFeatureKey(Lexicon lexicon,
boolean training,
int label)
Return the feature that should be used to index this feature into a lexicon.
|
Feature |
RealConjunctiveFeature.getFeatureKey(Lexicon lexicon,
boolean training,
int label)
Return the feature that should be used to index this feature into a lexicon.
|
Feature |
RealArrayFeature.getFeatureKey(Lexicon lexicon,
boolean training,
int label)
Return the feature that should be used to index this feature into a lexicon.
|
abstract Feature |
Feature.getFeatureKey(Lexicon lexicon,
boolean training,
int label)
Return the feature that should be used to index this feature into a lexicon.
|
Feature |
DiscreteReferringFeature.getFeatureKey(Lexicon lexicon,
boolean training,
int label)
Return the feature that should be used to index this feature into a lexicon.
|
Feature |
DiscretePrimitiveStringFeature.getFeatureKey(Lexicon lexicon,
boolean training,
int label)
Return the feature that should be used to index this feature into a lexicon.
|
Feature |
DiscreteConjunctiveFeature.getFeatureKey(Lexicon lexicon,
boolean training,
int label)
Return the feature that should be used to index this feature into a lexicon.
|
Feature |
DiscreteArrayFeature.getFeatureKey(Lexicon lexicon,
boolean training,
int label)
Return the feature that should be used to index this feature into a lexicon.
|
Feature |
RealReferringStringFeature.getFeatureKey(Lexicon lexicon,
boolean training,
int label)
Return the feature that should be used to index this feature into a lexicon.
|
Feature |
RealPrimitiveFeature.getFeatureKey(Lexicon lexicon,
boolean training,
int label)
Return the feature that should be used to index this feature into a lexicon.
|
Feature |
RealArrayStringFeature.getFeatureKey(Lexicon lexicon,
boolean training,
int label)
Return the feature that should be used to index this feature into a lexicon.
|
Feature |
DiscreteReferringStringFeature.getFeatureKey(Lexicon lexicon,
boolean training,
int label)
Return the feature that should be used to index this feature into a lexicon.
|
Feature |
DiscretePrimitiveFeature.getFeatureKey(Lexicon lexicon,
boolean training,
int label)
Return the feature that should be used to index this feature into a lexicon.
|
Feature |
DiscreteArrayStringFeature.getFeatureKey(Lexicon lexicon,
boolean training,
int label)
Return the feature that should be used to index this feature into a lexicon.
|
void |
RealReferringFeature.lexRead(edu.illinois.cs.cogcomp.core.datastructures.vectors.ExceptionlessInputStream in,
Lexicon lex,
String p,
String g,
String si,
ByteString bi)
Reads the representation of a feature with this object's run-time type as stored by a
lexicon, overwriting the data in this object.
|
void |
RealPrimitiveStringFeature.lexRead(edu.illinois.cs.cogcomp.core.datastructures.vectors.ExceptionlessInputStream in,
Lexicon lex,
String p,
String g,
String si,
ByteString bi)
Reads the representation of a feature with this object's run-time type as stored by a
lexicon, overwriting the data in this object.
|
void |
RealConjunctiveFeature.lexRead(edu.illinois.cs.cogcomp.core.datastructures.vectors.ExceptionlessInputStream in,
Lexicon lex,
String p,
String g,
String si,
ByteString bi)
Reads the representation of a feature with this object's run-time type as stored by a
lexicon, overwriting the data in this object.
|
void |
RealArrayFeature.lexRead(edu.illinois.cs.cogcomp.core.datastructures.vectors.ExceptionlessInputStream in,
Lexicon lex,
String p,
String g,
String si,
ByteString bi)
Reads the representation of a feature with this object's run-time type as stored by a
lexicon, overwriting the data in this object.
|
void |
Feature.lexRead(edu.illinois.cs.cogcomp.core.datastructures.vectors.ExceptionlessInputStream in,
Lexicon lex,
String p,
String g,
String si,
ByteString bi)
Reads the representation of a feature with this object's run-time type as stored by a
lexicon, overwriting the data in this object.
|
void |
DiscreteReferringFeature.lexRead(edu.illinois.cs.cogcomp.core.datastructures.vectors.ExceptionlessInputStream in,
Lexicon lex,
String p,
String g,
String si,
ByteString bi)
Reads the representation of a feature with this object's run-time type as stored by a
lexicon, overwriting the data in this object.
|
void |
DiscretePrimitiveStringFeature.lexRead(edu.illinois.cs.cogcomp.core.datastructures.vectors.ExceptionlessInputStream in,
Lexicon lex,
String p,
String g,
String si,
ByteString bi)
Reads the representation of a feature with this object's run-time type as stored by a
lexicon, overwriting the data in this object.
|
void |
DiscreteConjunctiveFeature.lexRead(edu.illinois.cs.cogcomp.core.datastructures.vectors.ExceptionlessInputStream in,
Lexicon lex,
String p,
String g,
String si,
ByteString bi)
Reads the representation of a feature with this object's run-time type as stored by a
lexicon, overwriting the data in this object.
|
void |
DiscreteArrayFeature.lexRead(edu.illinois.cs.cogcomp.core.datastructures.vectors.ExceptionlessInputStream in,
Lexicon lex,
String p,
String g,
String si,
ByteString bi)
Reads the representation of a feature with this object's run-time type as stored by a
lexicon, overwriting the data in this object.
|
void |
RealReferringStringFeature.lexRead(edu.illinois.cs.cogcomp.core.datastructures.vectors.ExceptionlessInputStream in,
Lexicon lex,
String p,
String g,
String si,
ByteString bi)
Reads the representation of a feature with this object's run-time type as stored by a
lexicon, overwriting the data in this object.
|
void |
RealReferrer.lexRead(edu.illinois.cs.cogcomp.core.datastructures.vectors.ExceptionlessInputStream in,
Lexicon lex,
String p,
String g,
String si,
ByteString bi)
Reads the representation of a feature with this object's run-time type as stored by a
lexicon, overwriting the data in this object.
|
void |
RealPrimitiveFeature.lexRead(edu.illinois.cs.cogcomp.core.datastructures.vectors.ExceptionlessInputStream in,
Lexicon lex,
String p,
String g,
String si,
ByteString bi)
Reads the representation of a feature with this object's run-time type as stored by a
lexicon, overwriting the data in this object.
|
void |
RealArrayStringFeature.lexRead(edu.illinois.cs.cogcomp.core.datastructures.vectors.ExceptionlessInputStream in,
Lexicon lex,
String p,
String g,
String si,
ByteString bi)
Reads the representation of a feature with this object's run-time type as stored by a
lexicon, overwriting the data in this object.
|
void |
DiscreteReferringStringFeature.lexRead(edu.illinois.cs.cogcomp.core.datastructures.vectors.ExceptionlessInputStream in,
Lexicon lex,
String p,
String g,
String si,
ByteString bi)
Reads the representation of a feature with this object's run-time type as stored by a
lexicon, overwriting the data in this object.
|
void |
DiscreteReferrer.lexRead(edu.illinois.cs.cogcomp.core.datastructures.vectors.ExceptionlessInputStream in,
Lexicon lex,
String p,
String g,
String si,
ByteString bi)
Reads the representation of a feature with this object's run-time type as stored by a
lexicon, overwriting the data in this object.
|
void |
DiscretePrimitiveFeature.lexRead(edu.illinois.cs.cogcomp.core.datastructures.vectors.ExceptionlessInputStream in,
Lexicon lex,
String p,
String g,
String si,
ByteString bi)
Reads the representation of a feature with this object's run-time type as stored by a
lexicon, overwriting the data in this object.
|
void |
DiscreteFeature.lexRead(edu.illinois.cs.cogcomp.core.datastructures.vectors.ExceptionlessInputStream in,
Lexicon lex,
String p,
String g,
String si,
ByteString bi)
Reads the representation of a feature with this object's run-time type as stored by a
lexicon, overwriting the data in this object.
|
void |
DiscreteArrayStringFeature.lexRead(edu.illinois.cs.cogcomp.core.datastructures.vectors.ExceptionlessInputStream in,
Lexicon lex,
String p,
String g,
String si,
ByteString bi)
Reads the representation of a feature with this object's run-time type as stored by a
lexicon, overwriting the data in this object.
|
static Feature |
Feature.lexReadFeature(edu.illinois.cs.cogcomp.core.datastructures.vectors.ExceptionlessInputStream in,
Lexicon lex,
Class c,
String p,
String g,
String si,
ByteString bi)
Reads the representation of a feature of any type as stored by a lexicon, omitting redundant
information.
|
String |
RealReferringFeature.lexWrite(edu.illinois.cs.cogcomp.core.datastructures.vectors.ExceptionlessOutputStream out,
Lexicon lex,
String c,
String p,
String g,
String si,
ByteString bi)
Writes a binary representation of the feature intended for use by a lexicon, omitting
redundant information when possible.
|
String |
RealPrimitiveStringFeature.lexWrite(edu.illinois.cs.cogcomp.core.datastructures.vectors.ExceptionlessOutputStream out,
Lexicon lex,
String c,
String p,
String g,
String si,
ByteString bi)
Writes a binary representation of the feature intended for use by a lexicon, omitting
redundant information when possible.
|
String |
RealConjunctiveFeature.lexWrite(edu.illinois.cs.cogcomp.core.datastructures.vectors.ExceptionlessOutputStream out,
Lexicon lex,
String c,
String p,
String g,
String si,
ByteString bi)
Writes a binary representation of the feature intended for use by a lexicon, omitting
redundant information when possible.
|
String |
RealArrayFeature.lexWrite(edu.illinois.cs.cogcomp.core.datastructures.vectors.ExceptionlessOutputStream out,
Lexicon lex,
String c,
String p,
String g,
String si,
ByteString bi)
Writes a binary representation of the feature intended for use by a lexicon, omitting
redundant information when possible.
|
String |
Feature.lexWrite(edu.illinois.cs.cogcomp.core.datastructures.vectors.ExceptionlessOutputStream out,
Lexicon lex,
String c,
String p,
String g,
String si,
ByteString bi)
Writes a binary representation of the feature intended for use by a lexicon, omitting
redundant information when possible.
|
String |
DiscreteReferringFeature.lexWrite(edu.illinois.cs.cogcomp.core.datastructures.vectors.ExceptionlessOutputStream out,
Lexicon lex,
String c,
String p,
String g,
String si,
ByteString bi)
Writes a binary representation of the feature intended for use by a lexicon, omitting
redundant information when possible.
|
String |
DiscretePrimitiveStringFeature.lexWrite(edu.illinois.cs.cogcomp.core.datastructures.vectors.ExceptionlessOutputStream out,
Lexicon lex,
String c,
String p,
String g,
String si,
ByteString bi)
Writes a binary representation of the feature intended for use by a lexicon, omitting
redundant information when possible.
|
String |
DiscreteConjunctiveFeature.lexWrite(edu.illinois.cs.cogcomp.core.datastructures.vectors.ExceptionlessOutputStream out,
Lexicon lex,
String c,
String p,
String g,
String si,
ByteString bi)
Writes a binary representation of the feature intended for use by a lexicon, omitting
redundant information when possible.
|
String |
DiscreteArrayFeature.lexWrite(edu.illinois.cs.cogcomp.core.datastructures.vectors.ExceptionlessOutputStream out,
Lexicon lex,
String c,
String p,
String g,
String si,
ByteString bi)
Writes a binary representation of the feature intended for use by a lexicon, omitting
redundant information when possible.
|
String |
RealReferringStringFeature.lexWrite(edu.illinois.cs.cogcomp.core.datastructures.vectors.ExceptionlessOutputStream out,
Lexicon lex,
String c,
String p,
String g,
String si,
ByteString bi)
Writes a binary representation of the feature intended for use by a lexicon, omitting
redundant information when possible.
|
String |
RealReferrer.lexWrite(edu.illinois.cs.cogcomp.core.datastructures.vectors.ExceptionlessOutputStream out,
Lexicon lex,
String c,
String p,
String g,
String si,
ByteString bi)
Writes a binary representation of the feature intended for use by a lexicon, omitting
redundant information when possible.
|
String |
RealPrimitiveFeature.lexWrite(edu.illinois.cs.cogcomp.core.datastructures.vectors.ExceptionlessOutputStream out,
Lexicon lex,
String c,
String p,
String g,
String si,
ByteString bi)
Writes a binary representation of the feature intended for use by a lexicon, omitting
redundant information when possible.
|
String |
RealArrayStringFeature.lexWrite(edu.illinois.cs.cogcomp.core.datastructures.vectors.ExceptionlessOutputStream out,
Lexicon lex,
String c,
String p,
String g,
String si,
ByteString bi)
Writes a binary representation of the feature intended for use by a lexicon, omitting
redundant information when possible.
|
String |
DiscreteReferringStringFeature.lexWrite(edu.illinois.cs.cogcomp.core.datastructures.vectors.ExceptionlessOutputStream out,
Lexicon lex,
String c,
String p,
String g,
String si,
ByteString bi)
Writes a binary representation of the feature intended for use by a lexicon, omitting
redundant information when possible.
|
String |
DiscreteReferrer.lexWrite(edu.illinois.cs.cogcomp.core.datastructures.vectors.ExceptionlessOutputStream out,
Lexicon lex,
String c,
String p,
String g,
String si,
ByteString bi)
Writes a binary representation of the feature intended for use by a lexicon, omitting
redundant information when possible.
|
String |
DiscretePrimitiveFeature.lexWrite(edu.illinois.cs.cogcomp.core.datastructures.vectors.ExceptionlessOutputStream out,
Lexicon lex,
String c,
String p,
String g,
String si,
ByteString bi)
Writes a binary representation of the feature intended for use by a lexicon, omitting
redundant information when possible.
|
String |
DiscreteFeature.lexWrite(edu.illinois.cs.cogcomp.core.datastructures.vectors.ExceptionlessOutputStream out,
Lexicon lex,
String c,
String p,
String g,
String si,
ByteString bi)
Writes a binary representation of the feature intended for use by a lexicon, omitting
redundant information when possible.
|
String |
DiscreteArrayStringFeature.lexWrite(edu.illinois.cs.cogcomp.core.datastructures.vectors.ExceptionlessOutputStream out,
Lexicon lex,
String c,
String p,
String g,
String si,
ByteString bi)
Writes a binary representation of the feature intended for use by a lexicon, omitting
redundant information when possible.
|
Constructor and Description |
---|
FeatureVector(Object[] ex,
Lexicon lex,
Lexicon llex)
Instantiates a feature vector from example arrays and lexicons.
|
Modifier and Type | Class and Description |
---|---|
class |
ChildLexicon
Instances of this class are intended to store features that are children of other features and
which do not correspond to their own weights in any learner's weight vector.
|
Modifier and Type | Field and Description |
---|---|
protected Lexicon |
Learner.labelLexicon
Stores the label
Lexicon . |
protected Lexicon |
Learner.lexicon
Stores the feature
Lexicon . |
protected Lexicon |
SupportVectorMachine.newLabelLexicon
Created during
SupportVectorMachine.doneLearning() in case the training examples observed by
SupportVectorMachine.learn(int[],double[],int[],double[]) are only a subset of a larger, pre-extracted
set. |
Modifier and Type | Method and Description |
---|---|
Lexicon |
Learner.demandLexicon()
Forces this learner to read in its lexicon representation, but only if the lexicon currently
available in this object is empty and the learner has been scheduled to read its lexicon on
demand with
Learner.readLexiconOnDemand(URL) . |
Lexicon |
Learner.getCurrentLexicon()
Returns the feature lexicon in memory, rather than reading from disk
|
Lexicon |
Learner.getLabelLexicon()
Returns the label lexicon.
|
Lexicon |
Learner.getLexicon()
Returns the feature lexicon.
|
Lexicon |
Learner.getLexiconDiscardCounts()
Returns this learner's feature lexicon after discarding any feature counts it may have been
storing.
|
Lexicon |
BatchTrainer.preExtract(String exampleFile)
Performs labeled feature vector pre-extraction into the specified
file (or memory), replacing
BatchTrainer.parser with one that reads from that file (or memory). |
Lexicon |
BatchTrainer.preExtract(String exampleFile,
boolean zip)
Performs labeled feature vector pre-extraction into the
specified file (or memory), replacing
BatchTrainer.parser with one that reads from that file (or
memory). |
static Lexicon |
Lexicon.readLexicon(edu.illinois.cs.cogcomp.core.datastructures.vectors.ExceptionlessInputStream in)
Reads a feature lexicon from the
specified stream.
|
static Lexicon |
Lexicon.readLexicon(edu.illinois.cs.cogcomp.core.datastructures.vectors.ExceptionlessInputStream in,
boolean readCounts)
Reads a feature lexicon from the
specified stream, with the option to ignore the feature counts by setting the second argument
to
false . |
static Lexicon |
Lexicon.readLexicon(String filename)
Reads and returns a feature lexicon from the specified file.
|
static Lexicon |
Lexicon.readLexicon(URL url)
Reads a feature lexicon from the specified location.
|
static Lexicon |
Lexicon.readLexicon(URL url,
boolean readCounts)
Reads a feature lexicon from the specified location, with
the option to ignore the feature counts by setting the second argument to
false . |
Modifier and Type | Method and Description |
---|---|
protected void |
Learner.createPrediction(Lexicon lex,
int index)
If it hasn't been created already, this method will create the prediction feature in
Learner.predictions associated with the label feature at the given index of lex
. |
void |
MuxLearner.setLabelLexicon(Lexicon l)
Sets the label lexicon.
|
void |
Learner.setLabelLexicon(Lexicon l)
Sets the label lexicon.
|
void |
Learner.setLexicon(Lexicon l)
Sets the feature lexicon.
|
void |
ChildLexicon.setParent(Lexicon p)
Sets the value of
ChildLexicon.parentLexicon and makes sure that any features marked for removal
in this lexicon are the identical objects also present in the parent. |
String |
SparseWeightVector.toString(Lexicon lex)
Creates a string representation of this
SparseWeightVector . |
void |
SparseWeightVector.toStringJustWeights(PrintStream out,
int min,
Lexicon lex)
Outputs a textual representation of this
SparseWeightVector to a stream just
like SparseWeightVector.write(PrintStream) , but without the "Begin" and "End"
annotations. |
void |
RandomWeightVector.write(PrintStream out,
Lexicon lex)
Outputs the contents of this vector into the specified
PrintStream . |
void |
BiasedWeightVector.write(PrintStream out,
Lexicon lex)
Outputs the contents of this
BiasedWeightVector into the specified
PrintStream . |
void |
NaiveBayes.NaiveBayesVector.write(PrintStream out,
Lexicon lex)
Outputs the contents of this vector into the specified
PrintStream . |
void |
SparseWeightVector.write(PrintStream out,
Lexicon lex)
Outputs the contents of this
SparseWeightVector into the specified
PrintStream . |
void |
SparseAveragedPerceptron.AveragedWeightVector.write(PrintStream out,
Lexicon lex)
Outputs the contents of this
SparseWeightVector into the specified
PrintStream . |
void |
BiasedRandomWeightVector.write(PrintStream out,
Lexicon lex)
Outputs a textual representation of this vector to the specified stream.
|
static void |
BatchTrainer.writeExample(edu.illinois.cs.cogcomp.core.datastructures.vectors.ExceptionlessOutputStream out,
int[] featureIndexes,
double[] featureValues,
int[] labelIndexes,
double[] labelValues,
int unpruned,
Lexicon lexicon)
Writes an example vector contained in an object array to the underlying output stream, with
features sorted according to their representations in the given lexicon if present, or in the
order they appear in the vector otherwise.
|
static void |
BatchTrainer.writeExample(edu.illinois.cs.cogcomp.core.datastructures.vectors.ExceptionlessOutputStream out,
int[] featureIndexes,
double[] featureValues,
int[] labelIndexes,
double[] labelValues,
Lexicon lex)
Writes
an example vector contained in an object array to the underlying output stream, with features
sorted according to their representations in the given lexicon if present, or in the order
they appear in the vector otherwise.
|
Constructor and Description |
---|
ChildLexicon(Lexicon p)
Creates an empty lexicon.
|
ChildLexicon(Lexicon p,
String e)
Creates an empty lexicon with the given encoding.
|
Copyright © 2016. All rights reserved.