El dj 22 de 03 de 2012 a les 09:29 +0100, en/na Jacob Nordfalk va
escriure:
> 
> 
> 2012/3/21 Aaron Rubin <[email protected]>
>         
>         But not all of those would necessarily take up a week, and
>         there's no way that all of this will take 12 weeks! So I've
>         been thinking about common errors that might show up in
>         transfer rules files, but nothing's really come to mind. Has
>         anyone else noticed common mistakes in .dix or transfer rules
>         files that would be suitable for this kind of program to look
>         for? 
>         
>         
> 
> 
> This might not strictly be a lint checkers job, but have a look at
> 'beginner errors' like breaking the XML or not following the XML
> Schema:
>  - forgetting an end tag (like  writing <s n="adj"> instead of <s
> n="adj"/>
>  - messing up the " 's, like writing <s n="adj> 
>  - mis-naming an attribute
>  - forgetting  attributes 
> 
> 
> etc. 
> 
> 
> I am not sure these kinds of errors are always reported to the user in
> a meaningfull way by the compiler. 
> 
> 
> However, I am sure that there are some users that use a lot of time
> struggling with such errors.
> 
> 
> So I'd suggest leaving a week for seeing if there is something you
> could do to help out dix editor novices.
> 

Another thing in transfer is (a) looking for a tag in a def-attr that
isn't there. (b) Or using <lit> when you mean <lit-tag> because what
you're checking against can only be a tag.

(a)

<def-attr n="case">
  <attr-item tags="nom"/>
  <attr-item tags="acc"/>
</def-attr>

...

<test>
  <equal>
   <clip pos="1" side="sl" part="case"/>
   <lit-tag v="gen"/> 
  </equal>
</test> 

(This will never be "true" even if you see a <gen> tag in the input,
because "gen" is not defined in the def-attr for "case")

(b)

<def-attr n="case">
  <attr-item tags="nom"/>
  <attr-item tags="acc"/>
</def-attr>

...

<test>
  <equal>
   <clip pos="1" side="sl" part="case"/>
   <lit v="nom"/> (should be <lit-tag v="nom"/>)
  </equal>
</test>

Fran


------------------------------------------------------------------------------
This SF email is sponsosred by:
Try Windows Azure free for 90 days Click Here 
http://p.sf.net/sfu/sfd2d-msazure
_______________________________________________
Apertium-stuff mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/apertium-stuff

Reply via email to