I suppose you're read the page
    http://www.statmt.org/moses/?n=Moses.SparseFeatures

I small, fairly clear feature function that uses sparse feature is
    TargetBigramFeature
The main thing to note
    1. It has not dense feature, from the 0 in the constructor
           TargetBigramFeature::TargetBigramFeature(const std::string &line)
               :StatefulFeatureFunction(0, line)

    2. In Evaluate(), adding a score to the score component is done by 
calling
                 PlusEquals(this, sparse-feature-name, score);
        For dense features, it would have been
                 PlusEquals(this, vector-of-scores);

On 21/01/2014 09:12, Marcin Junczys-Dowmunt wrote:
> Hi,
> I am increasingly interested in trying out sparse feature in Moses and
> now I am wondering how to approach this. There is not much information
> on the webpage. Can somebody share a nice article about the benefits and
> maybe some basic implementation as a working example?
>
> Thanks,
> Marcin
> _______________________________________________
> Moses-support mailing list
> [email protected]
> http://mailman.mit.edu/mailman/listinfo/moses-support
>

_______________________________________________
Moses-support mailing list
[email protected]
http://mailman.mit.edu/mailman/listinfo/moses-support

Reply via email to