Hi Lane

There's a lot of very similar methods in ScoreComponentCollection making 
it rather confusing.

The method you are calling will only work for sparse features. You want 
GetScoresForProducer() for dense features.

cheers - Barry

On 19/02/13 17:16, Lane Schwartz wrote:
> Hi,
>
> I'm writing some code where I'd like to extract and print the feature
> values for each hypothesis. I've run into some trouble in doing this.
>
> const Hypothesis* hypo
> const FeatureFunction* ff
>
> Given the above, I can successfully get the hypo to print its information:
>
> out << hypo;
>
> But if I try to extract the features for the given feature function,
> all of the returned values are always zero:
>
> out << (hypo->GetScoreBreakdown().GetVectorForProducer(ff));
>
> How can I get the feature values for a particular feature function at
> a hypothesis?
>
> Thanks,
> Lane
> _______________________________________________
> 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