2012/10/8 Mikel Forcada <m...@dlsi.ua.es>

>
> > http://pastebin.com/GGzfM5qc
> >
> > Calling a <list> would just involve putting it's contents in the rule.
> > So with <or> it would work like an OR, but without, it would work like a
> > sequence.
> I don't like this at all. This is very opaque. I would not use the tag
> <list>. If it is a set from where you choose, call it <set> or
> <option>... if it is a <sequence> define it as a sequence. But don't
> overload something called a <list> that really isn't.
>

I was also confused about the

   1.     <or>
   2.         <list v="weather"/>
   3.       </or>


I understand the simple copy-paste philosophy that you propose, but how
often would you ever need to re-use a sequence of more than, say 4 words,
making it actually worthwile to put it into a list for re-use? I'd guess:
Never.

I'd say that lists have an implicit <or> so the rule could be written


   1.
       <rule>
   2.       <match lemma="estació" tags="n.f.*"><select lemma="season" tags=
   "n.*"/></match>
   3.       <match tags="pr"/>
   4.       <list v="weather"/>
   5.     </rule>



I imagine that its much more common that you need to mix lists of words
with lemmas like this


   1.     <rule>
   2.       <match list="spatial_prepositions"/>
   3.       <match list="nouns_that_might_be_spatial"/>
   4. ...
   5.     </rule>

(I just made this up, hope it gives sense)

Note also that if we leave the simple copy-paste philosophy that you
propose it would be better to use the above syntax.


If we keep the simple copy-paste philosophy that you propose, I'd use
another word, like <include>, that clearly indicates that there is no logic
beyound copy-paste
Then it would look like: http://pastebin.com/Mc172B5N



   1.  <include-defs>
   2.     <include-def n="weather">
   3.       <or>
   4.       <match lemma="pluja"/>
   5.       <match lemma="núvol"/>
   6.       </or>
   7.     </include-def>



...

   1.     <rule>
   2.       <match lemma="estació" tags="n.f.*"><select lemma="season" tags=
   "n.*"/></match>
   3.       <match tags="pr"/>
   4.       <include v="weather"/>
   5.     </rule>




-- 
Jacob Nordfalk <http://profiles.google.com/jacob.nordfalk>
javabog.dk
Androidudvikler og -underviser på
IHK<http://cv.ihk.dk/diplomuddannelser/itd/vf/MAU>og
Lund&Bendsen <https://www.lundogbendsen.dk/undervisning/beskrivelse/LB1809/>
------------------------------------------------------------------------------
Don't let slow site performance ruin your business. Deploy New Relic APM
Deploy New Relic app performance management and know exactly
what is happening inside your Ruby, Python, PHP, Java, and .NET app
Try New Relic at no cost today and get our sweet Data Nerd shirt too!
http://p.sf.net/sfu/newrelic-dev2dev
_______________________________________________
Apertium-stuff mailing list
Apertium-stuff@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/apertium-stuff

Reply via email to