Hello all,

I've added a couple of new functions in lttoolbox

void apply_override(int const input, int const old_sym, int const new_sym); void step_override(int const input, int const old_sym, int const new_sym);

The behaviour is as follows:

You can step the transducer using the input "input", and if the output symbol matches "old_sym" it is replaced with "new_sym".

You can use this to implement "copying", for example, if you have the transducer:

0       1       t       t
1       2       a       a
2       3       k       k
3       4       e       e
4       5       ε       #
5       6       ε
6       7       ε       o
7       8       ε       u
8       9       ε       t
9       10      <vblex>   <vblex>
10      11      <ANY_TAG> <ANY_TAG>
11      10      ε       ε
11      12      <$>       <$>
12      13      o       ε
13      14      u       ε
14      15      t       ε
15      16      <ANY_TAG> ε
16      17      <$>       ε
17

And the input

  ^take<vblex><pres><p3><sg>$ ^out<adv>$

Then running step_override(alphabet(L"<pres>"), alphabet(L"<ANY_TAG>"), alphabet(L"<pres>")) when you are in state 10 will result in the output:

  take<vblex><pres> instead of take<vblex><ANY_TAG>

I have implemented this for the separable multiwords project. Please let me know what you think, if you can forsee any problems, or if you can think of a more elegant solution :)

Fran

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Apertium-stuff mailing list
Apertium-stuff@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/apertium-stuff

Reply via email to