Sevilay Bayatlı <[email protected]> čálii:
> Hi all,
>
> how should <case-of> work inside <modify-case>?
> It's un-logical to place it there since clip will do the job because case
> of only return one of three strings : aa , AA , Aa.
> The right thing to do is just change the string returned by case of by the
> right part of modify-case , which is useless
I'm not sure what you're asking, but this snippet will make the second
lexical unit get the case of the first one:
<modify-case><clip pos="2" side="tl" part="lemh"/><case-of pos="1" side="sl"
part="lemh"/></modify-case>
But I don't normally use it; I typically place the case in a variable,
and make that the chunk case, e.g.
<def-macro n="set_caseFirstWord" npar="1" c="Store the case in
caseFirstWord, then lowercase">
<let><var n="caseFirstWord"/><get-case-from pos="1"><lit
v="aa"/></get-case-from></let>
<modify-case><clip pos="1" side="tl" part="lemh"/><lit
v="aa"/></modify-case>
</def-macro>
<call-macro n="set_caseFirstWord"><with-param pos="1"/></call-macro>
<out>
<chunk name="adv" case="caseFirstWord">
…
I suppose that <let> might have been written
<let><var n="caseFirstWord"/><case-of pos="1" side="sl"
part="lemh"/></let>
instead, haven't tried.
signature.asc
Description: PGP signature
_______________________________________________ Apertium-stuff mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/apertium-stuff
