How about TemplatedFeatures[V] rather than FeatureTemplateVariable[V]?


On Nov 19, 2013, at 12:51 PM, Andrew McCallum <notifications@github.com> wrote:

> In src/main/scala/cc/factorie/app/classify/backend/FeatureTemplates.scala:
> 
> > +
> > +  //this computes the features and caches their strings (in input_variable.map) for future use
> > +  def getAndUpdateFeatures(v: V, ftv: FeatureTemplateVariable[V]): Seq[String] = {
> > +    ftv.map.getOrElseUpdate(this, computeFeatures(v, ftv))
> > +  }
> > +
> > +  //this computes the features and adds them to the input variable as a proper factorie FeatureVectorVar
> > +  def addFeatureVector(v: V, ftv: FeatureTemplateVariable[V], d: FeatureTemplateDomain): Unit = {
> > +    val f = d.newFeatureVector(this)
> > +    f ++= computeFeatures(v, ftv)
> > +    ftv.featureVectorMap(this) = f
> > +  }
> > +}
> > +
> > +//This is basically a map from feature templates to the features computed w.r.t to these templates
> > +class FeatureTemplateVariable[V]{
> I'm confused. This is named "Variable" but isn't a Variable.
> 
> —
> Reply to this email directly or view it on GitHub.
>