i've added another virtual method to FeatureFunction:
     virtual void ChangeSource(InputType *&input) const
Override it in your own FF to change the input sentence. You can
  1. add or change a factor. This could be used as a wrapper for a POS
tagger or a simple lookup
  2. delete or add a word
  3. delete the entire sentence and replace it with another 1, or replace
it with another input type (eg. replace a sentence with a tree). This could
be used as a wrapper for a parser that parses the input sentence.

i've added an example feature function
  moses/FF/SkeletonChangeInput.cpp

ps. Not tested in any way. When you run it, it will probably assert that
you don't have the right factors. Comment out that code.



On 1 August 2014 18:31, Marcin Junczys-Dowmunt <[email protected]> wrote:

>  Hi,
> does Moses support source generation steps before translation? I would
> like to accomplish something like that incredible ASCII art below, where t0
> is a surface form phrase table, g0 is the source POS generation model, g1
> taget POS generation model, lm0 is a surface language model, lm1 a POS
> language model, osm0 is a OSM is a defined over the generated POS tags. Is
> that possible?
>
>
> 0  src_word --t0--> trg_word --> lm0
>      |                |
>      g0               g1
>      |                |
>      V                v
> 1  src_pos          trg_pos --> lm1
>          \          /
>           \        /
>            - osm0 -
>
>
>
> _______________________________________________
> Moses-support mailing list
> [email protected]
> http://mailman.mit.edu/mailman/listinfo/moses-support
>
>


-- 
Hieu Hoang
Research Associate
University of Edinburgh
http://www.hoang.co.uk/hieu
_______________________________________________
Moses-support mailing list
[email protected]
http://mailman.mit.edu/mailman/listinfo/moses-support

Reply via email to