Open MikeUnwalla opened 4 years ago
Update: I put the AP into THAT_MD_MD and got this:
Tests finished!
Running disambiguator rule tests...
Running disambiguation tests for English...
Exception in thread "main" java.lang.AssertionError: Disambiguated sentence is equal to the input sentence for rule: THAT_MD_MD. The sentence was: <S> That[that/DT,that/RP,that/WDT,that/WP,B-NP-singular|E-NP-singular] might[might/MD,might/NN:U,B-VP] be[be/VB,I-VP] the[the/DT,B-NP-singular] most[most/NN:U,much/JJS,much/RBS,I-NP-singular] painful[painful/JJ,I-NP-singular] experience[experience/NN:U,experience/VB,experience/VBP,E-NP-singular] in[in/IN,B-PP] my[my/PRP$,B-NP-singular] life[life/NN:UN,E-NP-singular].[./.,</S>./PCT,O]
at org.junit.Assert.fail(Assert.java:88)
Does this still happen? When I add the antipattern to DT_VB_NN
, I don't get any error. Is there anything else I need to do to reproduce this?
@danielnaber , yes, the error still occurs.
There is nothing else to do. Just add the AP.
For DT_VB_NN, I don't get an error message now.
For THAT_MD_MD, I get an error message. (Using snapshot 2020-03-09.)
Strange, I still cannot reproduce with current master. If it still occurs in a few days, please add the code (but comment it out), so that I don't miss anything when trying to reproduce.
I synced a few minutes ago. I put the AP in THAT_MD_MD in my GitHub, and got this Maven message:
[ERROR] Failures:
[ERROR] EnglishTest.testLanguage:47->LanguageSpecificTest.runTests:40->LanguageSpecificTest.runTests:52 Disambiguated sentence is equal to the input sentence for rule: THAT_MD_MD. The sentence was: <S> That[that/DT,that/RP,that/WDT,that/WP,B-NP-singular|E-NP-singular] might[might/MD,might/NN:U,B-VP] be[be/VB,I-VP] the[the/DT,B-NP-singular] most[most/NN:U,much/JJS,much/RBS,I-NP-singular] painful[painful/JJ,I-NP-singular] experience[experience/NN:U,experience/VB,experience/VBP,E-NP-singular] in[in/IN,B-PP] my[my/PRP$,B-NP-singular] life[life/NN:UN,E-NP-singular].[./.,</S>./PCT,O]
[INFO]
[ERROR] Tests run: 92, Failures: 1, Errors: 0, Skipped: 6
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary for languagetool-parent 4.9-SNAPSHOT:
[INFO]
[INFO] languagetool-parent ................................ SUCCESS [ 1.736 s]
[INFO] LanguageTool Style and Grammar Checker Core ........ SUCCESS [ 52.417 s]
[INFO] English module for LanguageTool .................... FAILURE [01:26 min]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
What command exactly do you run, testrules.bat en
?
I ran:
>mvn --projects languagetool-language-modules/en --also-make clean test
The Maven result is in THAT_MD_MD_with_AP.txt
Noted while fixing #2521. I get an unexpected error when I add this AP to DT_VB_NN:
I get this unexpected testrules error:
I tried with LT 4.8, and got a similar result.
The unexpected error does not occur if I remove
case_sensitive="yes"
from the AP.One other disambiguation rule (STATUS_QUO) uses
<antipattern case_sensitive="yes">
, and that rule works fine.