W dniu 2012-06-05 23:01, Daniel Naber pisze:
> On Montag, 4. Juni 2012, Jaume Ortolà i Font wrote:
>
>> I don't fully understand the Unifier.java code. The relation between
>> negated and non-negated unification seems straightforward, but the
>> results are bizarre. Any help?
>
> I cannot directly help, but often it helps to write a small (i.e. minimal)
> unit test that reproduces the problem.

I started writing the test and I guess I've found the cause: the 
negation is applied too soon. Let me explain: the negation attribute 
should be applied after checking everything; otherwise, the result 
becomes "false" very soon. When it is false, it cannot become true again 
(the check is the logical AND). That means, basically, that you cannot 
find match the combinations of tokens that are not unified, if it's not 
the last token that mismatches.

As I'm not entirely sure that this is the cause, and I need more tests, 
I only added a JUnit test case with imaginary Latin examples. Adding 
more tests (to effectively test all combinations) is a good idea. I 
think we should put the tokens to the array, so that a simple loop might 
be used to get full coverage of all possible combinations.

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

Reply via email to