Package cc.mallet.types
Class FeatureVectorSequence
- java.lang.Object
-
- cc.mallet.types.FeatureVectorSequence
-
- All Implemented Interfaces:
AlphabetCarrying
,Sequence<FeatureVector>
,java.io.Serializable
- Direct Known Subclasses:
StringEditFeatureVectorSequence
public class FeatureVectorSequence extends java.lang.Object implements Sequence<FeatureVector>, java.io.Serializable, AlphabetCarrying
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description class
FeatureVectorSequence.Iterator
An iterator over the FeatureVectors in the sequence.
-
Constructor Summary
Constructors Constructor Description FeatureVectorSequence(Alphabet dict, TokenSequence tokens)
FeatureVectorSequence(Alphabet dict, TokenSequence tokens, boolean binary, boolean augmentable)
FeatureVectorSequence(Alphabet dict, TokenSequence tokens, boolean binary, boolean augmentable, boolean growAlphabet)
FeatureVectorSequence(FeatureVector[] featureVectors)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description double
dotProduct(int sequencePosition, Vector weights)
FeatureVector
get(int i)
Alphabet
getAlphabet()
Alphabet[]
getAlphabets()
FeatureVector
getFeatureVector(int i)
FeatureVectorSequence.Iterator
iterator()
int
size()
java.lang.String
toString()
-
-
-
Constructor Detail
-
FeatureVectorSequence
public FeatureVectorSequence(FeatureVector[] featureVectors)
-
FeatureVectorSequence
public FeatureVectorSequence(Alphabet dict, TokenSequence tokens, boolean binary, boolean augmentable, boolean growAlphabet)
-
FeatureVectorSequence
public FeatureVectorSequence(Alphabet dict, TokenSequence tokens, boolean binary, boolean augmentable)
-
FeatureVectorSequence
public FeatureVectorSequence(Alphabet dict, TokenSequence tokens)
-
-
Method Detail
-
getAlphabet
public Alphabet getAlphabet()
- Specified by:
getAlphabet
in interfaceAlphabetCarrying
-
getAlphabets
public Alphabet[] getAlphabets()
- Specified by:
getAlphabets
in interfaceAlphabetCarrying
-
size
public int size()
- Specified by:
size
in interfaceSequence<FeatureVector>
-
get
public FeatureVector get(int i)
- Specified by:
get
in interfaceSequence<FeatureVector>
-
getFeatureVector
public FeatureVector getFeatureVector(int i)
-
dotProduct
public double dotProduct(int sequencePosition, Vector weights)
-
iterator
public FeatureVectorSequence.Iterator iterator()
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-