factorie/factorie — pull request #95 by davidBelanger (2013-11-19 16:42:48+00:00)
Title: adding feature templates

This is work on support for feature templates that Alex and I have done. There are comments in the code, so looking at that is the best way to learn about it. The basic idea is that templates are just a factory for features; they have no state. We have variables that are basically a container for features in the form of a map from templates to FeatureVectorVars. This provides all sorts of useful stuff, like templates that depend on cached computation from other templates, and having some templates use hashed features and some not. We have implemented a Multiclass classifier model that uses these templates, and adding this to others would be straightforward as well.

Since each template is a associated with a Weights in the model, probably the next step would be to implement things in the optimizer that handle things separately for each Weights. For example, you could have different regularization for each feature template.

Let me know if you have any tips or suggestions.