W dniu 2012-06-06 16:11, Jaume Ortolà i Font pisze: > 2012/6/6 Marcin Miłkowski <milekplo...@gmail.com > <mailto:milekplo...@gmail.com>> > > I think I have the solution. See the repository. Marcin > > > Hi Marcin, > > I have seen the changes in the code. The UnifierTest seems OK, but I > don't get the correct results in the GUI. Before the last changes I got > 48 (of 60 expected) matches. Now I get 12 (the missing ones before). > These 12 have the same pattern: first and second token agree, third > token doesn't agree. > > My intuition. > > In AbstractPatternRule.java, lines 177 and 204 (and other places), you > have something like: > > thisMatched &= > > This causes that only the agreeing first and seconf tokens match. I > think the solution could be to invert the logic everywhere when we are > in negated unification, and use " |= " instead of " &= " here and in > some other places (?). Does it make sense?
Now I think I can see what you mean. I think there was a mistake in principle, and that it will be fixed by my another attempt. It replicates the behavior of the UnifierTest in XML rules, so it should work. I added some fictional unification to the demo language, as a kind of additional test. I will commit it in a minute. Regards, Marcin ------------------------------------------------------------------------------ Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ _______________________________________________ Languagetool-devel mailing list Languagetool-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/languagetool-devel