Hi,

I have found a problem with unification. I'm using this pattern:

 <rule id="DAAN_" name="det + adj + adj + nom">
       <pattern>
           <unify>
               <feature id="nombre"/>
               <feature id="genere"/>
               <marker>
               <token postag="D[^R].*" postag_regexp="yes"/>
                <token postag="A.*" postag_regexp="yes"/>
               <token postag="A.*" postag_regexp="yes"/>
               <token postag="N.*" postag_regexp="yes"/>
               </marker>
           </unify>
           </pattern>
           <disambig action="filterall" />
       </rule>

The disambig action is not relevant here. The question is whether the
pattern matches a sentence or not.

The sentence I want to match in Catalan is: "La part superior esquerra".

What's going on here? This sentence matches the pattern Det-Adj-Adj-Noun,
and at the same time the sentence is unified in number and gender (feminine
singular). However  the pattern as a whole should not match because both
conditions are not satisfied by the same readings but by different readings.

The second word of the sentence ("part") is adjective masculine singular
(which satisfies the D-A-A-N pattern), and it is noun feminine singular
(which satisfies the unification condition). But "part" is not adjective
feminine singular which would satisfy the pattern as a whole. So I think
the pattern should not match this sentence.

I tried to debug the code (AbstractPatternRule.java, Unifier.java), but to
no avail so far.

PS For debugging I put the rule at the start of the Catalan disambiguation
file and the sentence at the start of a JUnit inside assertCorrect("").

Regards,
Jaume Ortolà
------------------------------------------------------------------------------
Master Java SE, Java EE, Eclipse, Spring, Hibernate, JavaScript, jQuery
and much more. Keep your Java skills current with LearnJavaNow -
200+ hours of step-by-step video tutorials by Java experts.
SALE $49.99 this month only -- learn more at:
http://p.sf.net/sfu/learnmore_122612 
_______________________________________________
Languagetool-devel mailing list
Languagetool-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/languagetool-devel

Reply via email to