I was thinking about that yesterday evening. Ideally, I would have liked to start writing transfer rules to add eo -> fr direction to eo-fr pair last summer. But then, there was no wiki page speaking enough of that aspect of Apertium and trying to read an old pdf of more than 100 pages (in fact its translation from English to French through Spanish) did not gave me more informations.
So I was pleased when during last automn, Francis wrote the "A long introduction to transfer rules" page. After translating it, I thought it was the time to start writing rules. But if Francis wiki page gives a good idea about the structure of a .t1x file and the way tags are selected and transfered when there is no rule, the meaning of what to write in a rule to change something was not clear enough for me. May be the idea of using part="whole" instead of generating the output tag by tag is counterproductive. A problem is the XML syntax of rules is not explained enough. For instance, when I saw <clip pos="1" ...> (and there are other older wiki pages giving this kind of syntax) : - the word "clip" had no special meaning for me - for "pos" attribute, I was first thinking to the position of a tag into the analysis of a word, and not the the position of a word in a pattern. So things should be explained with more details. But finally, with several questions on this list, I wrote my first rules about one week ago an Kevin indicate me a page to get informations about conditions in rules. With examples in fr -> eo direction .t1x file, I found simple to write conditional rules. And as a group of two conditions was used quite the same (only the pos attribute changed) in 3 of my rules, I changed it to a macro called 3 times. So, even if quite 3 months after putting on the wiki I would work work on eo -> fr translation direction, I still wrote only 5 rules, I think now I know enough about .t1x file syntax to write other rules more easily. And I thought yesterday evening, it was time to share this new knowledge on the wiki. There was 2 options for that : - adding information on Francis wiki page - making a new page I thought to write on Francis wiki discussion page to ask his opinion between these two options. Finally I did not do it. He will learn that at the same time as the others. My preference is the second option (more I think to that, more I think it is the best solution) : having on the same page examples from two different language pairs may be confuse and it would be easier to explain things differently on another page, quite line by line for transfer rules, indicating also : - what I get from source language analysis - what gives analysis of the translation I want (it is what I need to generate). I think to start this work before writing other rules. The first version will be in French and the title may be something like "Exemples de règles de transfert". Then it could be translated to English. An if I put wrong things, Francis and Kevin may correct them. May be not before next Thursday to start that. If Per wants to see a not too much complicated transfer file, before it becomes bigger it is : http://apertium.svn.sourceforge.net/viewvc/apertium/incubator/apertium-eo-fr/apertium-eo-fr.eo-fr.t1x?revision=42639&view=markup but with explainations, it would be better. > X-Mailer: MessagingEngine.com Webmail Interface - html > Date: Mon, 11 Feb 2013 08:01:06 +0100 > From: Per Tunedal <[email protected]> > To: Apertium Stuff <[email protected]> > Reply-To: [email protected] > Subject: Re: [Apertium-stuff] attribute for a word in a pattern > > Hi, > this remark nails down the main reason why I have large difficulties > learning the syntax of transfer rules. I have to reverse engineer > complex examples and try to deduce the meaning of "lexemes" and > "words". > > It would be very helpful if someone could write a wiki page with an > explanation of the constituents of the "transfer-rule-language", > including some very basic examples. > > Yours, > Per Tunedal > > On Sun, Feb 10, 2013, at 17:41, Bernard Chardonneau wrote: > > Yes it works. In fact, I found this idea after looking to fr -> eo rules. > > > --- snip -- > > 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 > > > --snip-- > > > > -------------------------------- > > 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 > > ------------------------------------------------------------------------------ > 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 > -------------------------------- 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
