Yes it works. In fact, I found this idea after looking to fr -> eo rules.
I put in the file :
<def-cat n="nom_sujet">
<cat-item tags="n.*.nom"/>
</def-cat>
but "n.*.nom.*" is more general.
After succeeding I thought here was a mistake in Francis wiki page. But finally,
after reading the line again :
<cat-item tags="vblex.*.*.lp.*"/>
It is correct. The problem was before, I was ALWAYS reading :
<cat-item tags="vblex.*.*lp.*"/> :-((
may be because later, he speaks of the meaning of .*.* but not of the . before
lp
Another thing for my 2nd question. In fact :
<cat-item tags="n.*.nom"/>
works as much for something like :
^la<det><def><sp>$ ^aŭto<n><sg><nom>$ ^ruli<vbtr><pres>$
than for something like
^la<det><def><sp>$ ^viro<n><m><sg><nom>$ ^paroli<vbtr><pres>$
That may mean now .* is enough in the middle of a cat-item to say "one or more"
or may be "zero, one or more" tags before .nom
> Date: Sun, 10 Feb 2013 18:34:59 +0300
> From: Hèctor Alòs i Font <[email protected]>
> To: [email protected]
> Reply-To: [email protected]
> Subject: Re: [Apertium-stuff] attribute for a word in a pattern
>
> I'd try to use not n.*nom.*, but n.*.nom.*
> Hèctor
>
> 2013/2/10 Bernard Chardonneau <[email protected]>
>
> > Hello,
> >
> > Here is a part of my transfert file :
> >
> > <section-def-cats>
> > <def-cat n="det">
> > <cat-item tags="det.*"/>
> > </def-cat>
> >
> > <def-cat n="nom_commun">
> > <cat-item tags="n.*"/>
> > </def-cat>
> >
> > <def-cat n="nom_sujet">
> > <cat-item tags="n.*nom"/>
> > </def-cat>
> >
> > (.....)
> >
> > <def-cat n="verbe">
> > <cat-item tags="vbser.*"/>
> > <cat-item tags="vblex.*"/>
> > <cat-item tags="vbtr.*"/>
> > <cat-item tags="vbntr.*"/>
> > <cat-item tags="vbtr_ntr.*"/>
> > </def-cat>
> > </section-def-cats>
> >
> >
> > <section-def-attrs>
> > (.....)
> >
> > <def-attr n="nom_acc">
> > <attr-item tags="nom"/>
> > <attr-item tags="acc"/>
> > </def-attr>
> >
> > (.....)
> > </section-def-attrs>
> >
> > <section-rules>
> > (.....)
> > <rule>
> > <pattern>
> > <pattern-item n="det"/>
> > <pattern-item n="nom_commun"/>
> > <pattern-item n="verbe"/>
> > </pattern>
> >
> > <action>
> > (.....)
> > </action>
> > </rule>
> > (.....)
> >
> > It works.
> >
> > But if I put :
> >
> > <rule>
> > <pattern>
> > <pattern-item n="det"/>
> > <pattern-item n="nom_sujet"/>
> > <pattern-item n="verbe"/>
> > </pattern>
> >
> > a pattern like this :
> > ^la<det><def><sp>$ ^aŭto<n><sg><nom>$ ^ruli<vbtr><pres>$
> > is never found.
> >
> > It is the same problem if I put :
> > <def-cat n="nom_sujet">
> > <cat-item tags="n.*nom.*"/>
> > </def-cat>
> >
> > So, what is not working ? and how to correct it ?
> >
> > Another problem. For several nouns, there is a gender attribute added
> > in the middle.
> > So, the tag <nom> is farther from <n> tag. Like this :
> >
> > ^la<det><def><sp>$ ^viro<n><m><sg><nom>$ ^paroli<vbtr><pres>$
> >
> > If I want to avoid big changes in dictionnaries and transfer rules
> > for the other translation side, will I have to duplicate the same
> > rules for "n.*nom" and "n.*.*nom" analysis ?
> >
> >
--------------------------------
Bernard Chardonneau (France)
Phone : [33] 1 64 90 87 04 or [33] 9 72 36 32 90
(from Sept to June except holidays)
GSM phone : [33] 6 49 95 13 95 (french scholl holidays, C zone)
Multilingual websites for my free softwares :
http://libremail.free.fr and http://libremail.tuxfamily.org
http://cyloop.tuxfamily.org (mainly translated with Apertium)
My general website (in french only)
http://bech.free.fr
------------------------------------------------------------------------------
Free Next-Gen Firewall Hardware Offer
Buy your Sophos next-gen firewall before the end March 2013
and get the hardware for free! Learn more.
http://p.sf.net/sfu/sophos-d2d-feb
_______________________________________________
Apertium-stuff mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/apertium-stuff