From Apertium
Jump to navigation Jump to search

Zen Coding for dix?[edit]

I think the Zen Coding syntax is more useful for XML types where you can have nesting, and where the structure changes more than the content; in eg. a bidix you'd probably find more use for a simple YASnippet that let you tab through these places:

<e><p><l>$1<s n="$2"/></l><r>$3<s n="$4"/></r></p></e>

Alternatively, it'd be fun to make a very compact dix expansion syntax…

i dag+adv=today+adv

<e>       <p><l>i<b/>dag<s n="adv"/></l><r>today<s n="adv"/></r></p></e>

<e lm="driven">          <i>driv</i><par n="op/en__adj"/></e>

<e>       <p><l>irsk</l><r>Irish</r></p><par n="__n_adj"/></e>


<e>       <par n="iI"/><p><l>irsk</l><r>Irish</r></p><par n="__n_adj"/></e>

<e r="LR"><p><l>ombudskvinne<s n="n"/><s n="f"/></l><r>ombudsman<s

<skulde( på)+vblex=blame+vblex

<e r="RL"><p><l>skulde<g><b/>på</g><s
n="vblex"/></l><r>blame</g><s n="vblex"/></r></p></e>


<e>       <i>.</i></e>

(basically, the "." switches between adding pardefs and adding i's, a "=" turns an <i> into <p><l></l><r></r></p>, a "+" adds s'es and an initial < or > adds restrictions to e)