You could use the API directly instead of writing to strings.

On Wed, May 2, 2012 at 5:09 PM, Michael Schmitz <[email protected]>wrote:

> Hi, I'm using OpenNLP maxent to train a model.  Features are either
> boolean or float.  As I understand it, OpenNLP maxent want to to have
> a context in the form:
>
> feature1=true feature2=3.5 feature3=false
>
> For example, this JIRA has an example of the context being a string
> that specifies the float values, and the float array also specifying
> the float values.
>
> https://issues.apache.org/jira/browse/OPENNLP-170
>
> Constructing such a string is slow.  I especially want to avoid
> constructing such a string when I an evaluating an instance against
> the model.  Is there any way I can just use an array of float values
> for the evaluation?  This is easy to create, and fast.
>
> 1.0, 3.5, 0.0
>
> Peace.  Michael
>



-- 
Jason Baldridge
Associate Professor, Department of Linguistics
The University of Texas at Austin
http://www.jasonbaldridge.com
http://twitter.com/jasonbaldridge

Reply via email to