cc.mallet.grmm.learning.templates
Class SimilarTokensTemplate

java.lang.Object
  extended by cc.mallet.grmm.learning.ACRF.Template
      extended by cc.mallet.grmm.learning.ACRF.SequenceTemplate
          extended by cc.mallet.grmm.learning.templates.SimilarTokensTemplate
All Implemented Interfaces:
java.io.Serializable

public class SimilarTokensTemplate
extends ACRF.SequenceTemplate

Template for adding "skip edges" as in

Version:
$Id: SimilarTokensTemplate.java,v 1.1 2007/10/22 21:38:02 mccallum Exp $
Author:
Charles Sutton
See Also:
Serialized Form

Nested Class Summary
static class SimilarTokensTemplate.CapWordsBinner
           
static interface SimilarTokensTemplate.FeatureVectorBinner
          Interface for classes that ssigns each features vector to a String-valued bin.
static class SimilarTokensTemplate.WordFeatureBinner
           
 
Field Summary
 
Fields inherited from class cc.mallet.grmm.learning.ACRF.Template
index, weights
 
Constructor Summary
SimilarTokensTemplate(int factor)
           
SimilarTokensTemplate(int factor, boolean distinguishEndpoints)
           
SimilarTokensTemplate(int factor, boolean distinguishEndpoints, boolean wordFeaturesOnly)
           
SimilarTokensTemplate(int factor, boolean distinguishEndpoints, boolean wordFeaturesOnly, SimilarTokensTemplate.FeatureVectorBinner binner)
           
SimilarTokensTemplate(int factor, boolean distinguishEndpoints, SimilarTokensTemplate.FeatureVectorBinner binner)
           
 
Method Summary
 void addInstantiatedCliques(ACRF.UnrolledGraph graph, FeatureVectorSequence fvs, LabelsAssignment lblseq)
          Adds all instiated cliques for an instance.
 boolean isDistinguishEndpts()
           
 boolean isExcludeAdjacent()
           
 void setBinner(SimilarTokensTemplate.FeatureVectorBinner binner)
           
 void setDistinguishEndpts(boolean distinguishEndpts)
           
 void setExcludeAdjacent(boolean excludeAdjacent)
           
 
Methods inherited from class cc.mallet.grmm.learning.ACRF.SequenceTemplate
addInstantiatedCliques
 
Methods inherited from class cc.mallet.grmm.learning.ACRF.Template
addSomeUnsupportedWeights, computeAssignment, computeFactor, createFactorMatrix, getAssignmentsPresent, getDefaultWeight, getDefaultWeights, getWeights, initWeights, isSupportedOnly, isTrainable, isUnsupportedWeightsAdded, modifyPotential, setDefaultWeight, setDefaultWeights, setTrainable, setWeights
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SimilarTokensTemplate

public SimilarTokensTemplate(int factor)

SimilarTokensTemplate

public SimilarTokensTemplate(int factor,
                             boolean distinguishEndpoints)

SimilarTokensTemplate

public SimilarTokensTemplate(int factor,
                             boolean distinguishEndpoints,
                             boolean wordFeaturesOnly)

SimilarTokensTemplate

public SimilarTokensTemplate(int factor,
                             boolean distinguishEndpoints,
                             SimilarTokensTemplate.FeatureVectorBinner binner)

SimilarTokensTemplate

public SimilarTokensTemplate(int factor,
                             boolean distinguishEndpoints,
                             boolean wordFeaturesOnly,
                             SimilarTokensTemplate.FeatureVectorBinner binner)
Method Detail

addInstantiatedCliques

public void addInstantiatedCliques(ACRF.UnrolledGraph graph,
                                   FeatureVectorSequence fvs,
                                   LabelsAssignment lblseq)
Description copied from class: ACRF.SequenceTemplate
Adds all instiated cliques for an instance. This method is called as a graph is being unrolled for an instance.

Specified by:
addInstantiatedCliques in class ACRF.SequenceTemplate
Parameters:
graph - The graph that the cliques will be added to.
fvs - The input features of the instance to unroll the cliques for.
lblseq - The label sequence of the instance being unrolled.

setBinner

public void setBinner(SimilarTokensTemplate.FeatureVectorBinner binner)

isExcludeAdjacent

public boolean isExcludeAdjacent()

setExcludeAdjacent

public void setExcludeAdjacent(boolean excludeAdjacent)

isDistinguishEndpts

public boolean isDistinguishEndpts()

setDistinguishEndpts

public void setDistinguishEndpts(boolean distinguishEndpts)