Hi Thu

You're using quite an old version of moses chart, which doesn't have a good 
interface for adding feature functions.

If you check out a recent version of moses, then adding a feature function to 
the chart decoder is similar to the phrase decoder
http://www.statmt.org/moses/?n=Moses.FeatureFunctions
except that you implement EvaluateChart() instead of Evaluate(),

cheers - Barry


On Thursday 01 December 2011 17:34:12 Hoai-Thu Vuong wrote:
> Hello Mr,
> 
> Thank you for your support. Currently, I'm using moses decoder with
> reversion 3420 to develop new feature. I think I understood what I should
> do with moses chart. In ChartHypothesis, value of Scorebreakdown is
> calculated by CalScore function, and trace back, the real function calscore
> is the setscore function in class TargetPhrase
> 
> This function is
> void TargetPhrase::SetScore
> 
> (const ScoreProducer* translationScoreProducer,  const Scores &scoreVector,
> 
> const vector<float> &weightT, float weightWP, const LMList &languageModels)
> 
> On Thu, Dec 1, 2011 at 12:26 PM, Hieu Hoang <[email protected]> wrote:
> > Hi thu
> >
> > Can u send me your code via personal mail and I'll try and see what's
> > wrong
> >
> > Best if its on GitHub so I can just pull it
> >
> > Hieu
> > Sent from my flying horse
> >
> > On 30 Nov 2011, at 06:52 PM, Hoai-Thu Vuong <[email protected]> wrote:
> >
> >  my feature has value 0, I did exactly as the manual, but the evaluate
> > function of my feature isn't called
> >
> > On Wed, Nov 30, 2011 at 6:38 PM, Barry Haddow 
<[email protected]>wrote:
> >> Hi Thu
> >>
> >> Have you verified that your feature is being called, and inserting
> >> values into
> >> the feature vector?
> >>
> >> What do you mean when you say that "element of score in ScoreComponent
> >> doesn't
> >> change" ? Do you mean that your new feature has value 0? Or is it
> >> missing?
> >>
> >> To add a feature to moses chart decoder, you have to implement
> >> EvaluateChart()
> >> (which may not be documented) and make sure that StaticData constructs
> >> and registers the feature (which is documented),
> >>
> >> cheers - Barry
> >>
> >> On Wednesday 30 Nov 2011 10:55:31 Hoai-Thu Vuong wrote:
> >> > Hi everyone,
> >> >
> >> > currently, I want to add new feature into moses decoder with chart
> >> > decoding, I did as document, but  I found that not work, the value of
> >>
> >> total
> >>
> >> > score and element of score in ScoreComponent doesn't change. I used
> >> > GetScoreBreakDown() and print all value in vector, then I saw that
> >>
> >> value of
> >>
> >> > new feature didn't changed.Could you please give me some suggest to
> >> > add
> >>
> >> new
> >>
> >> > feature into moses decoder with chart decoding. Thank you very much.
> >
> > --
> > Thu.
> >
> > _______________________________________________
> > Moses-support mailing list
> > [email protected]
> > http://mailman.mit.edu/mailman/listinfo/moses-support
> 
 
--
Barry Haddow
University of Edinburgh
+44 (0) 131 651 3173

-- 
The University of Edinburgh is a charitable body, registered in
Scotland, with registration number SC005336.

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

Reply via email to