RE: [en] Maven error when approximately 820 lines are added to grammar.xml
On 2016-08-17 14:01, Mike Unwalla wrote: > I am confused. Does 'nightly build' mean the snapshots on > https://languagetool.org/download/snapshots/?C=M;O=D? Yes. There's not really a good solution, but I've now added a parameter "-DdisableHardcodedTests" which you can add when you call Maven to skip these tests. For example, instead of "mvn test", you'd call "mvn -DdisableHardcodedTests test". This is only useful for developing rules outside of the standard set (STE etc.). If a rule in the standard set triggers this test, it should probably be made more strict, as the sentence as not supposed to have an error. Regards Daniel -- ___ Languagetool-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/languagetool-devel
RE: [en] Maven error when approximately 820 lines are added to grammar.xml
Runner.java:288) at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58) at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268) at org.junit.runners.ParentRunner.run(ParentRunner.java:363) at org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java: 367) at org.apache.maven.surefire.junit4.JUnit4Provider.executeWithRerun(JUnit4Provi der.java:274) at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provide r.java:238) at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:1 61) at org.apache.maven.surefire.booter.ForkedBooter.invokeProviderInSameClassLoade r(ForkedBooter.java:290) at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBoote r.java:242) at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:121) Running org.languagetool.rules.en.EnglishPatternRuleTest Failed tests: JLanguageToolTest.testEnglish:86->assertNoError:112 Did not expect an error in test sentence: 'Dog mushing is more of a sport than a true means of transportation.', but got: [EUPUB_OF:20-22:Many of our authors use 'of' as an all-purpose p reposition in the place of 'from', 'by', 'in' , 'on', 'at' etc., Moreover, phrases with 'of' are often used instead of possessive '-s' constructions or noun-noun compounds. This can lead to ambiguity even where it is not grammatically w rong; for example, in the phrase 'the system of control of the Commission', is the Commission being controlled (audited? ) or is it doing the controlling?, EUPUB_OF:49-51:Many of our authors use 'of' as an all-purpose preposition in the plac e of 'from', 'by', 'in', 'on', 'at' etc., Moreover, phrases with 'of' are often used instead of possessive '-s' con structions or noun-noun compounds. This can lead to ambiguity even where it is not grammatically wrong; for example, in the phrase 'the system of control of the Commission', is the Commission being controlled (audited?) or is it doing the c ontrolling?] expected:<0> but was:<2> Tests run: 64, Failures: 1, Errors: 0, Skipped: 4 [INFO] ------------ [INFO] Reactor Summary: [INFO] [INFO] languagetool-parent .... SUCCESS [ 0.400 s] [INFO] LanguageTool Style and Grammar Checker Core SUCCESS [ 31.073 s] [INFO] English module for LanguageTool FAILURE [ 30.423 s] [INFO] Regards, Mike -Original Message- From: Daniel Naber [mailto:[email protected]] Sent: 15 August 2016 15:31 To: development discussion for LanguageTool Subject: RE: [en] Maven error when approximately 820 lines are added to grammar.xml On 2016-08-15 15:50, Mike Unwalla wrote: > Sure enough, the exception for 'something' prevents the Maven error > message. But why? How can I know (without guessing) the cause of a > Maven error message in the context of the test sentences? If you're using a recent nightly build, the message should be something like: Did not expect an error in test sentence: '...', but got: ... It should display both the sentences and the errors detected. If that doesn't work, please post the output of Maven. -- ___ Languagetool-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/languagetool-devel
RE: [en] Maven error when approximately 820 lines are added to grammar.xml
On 2016-08-15 15:50, Mike Unwalla wrote: > Sure enough, the exception for 'something' prevents the Maven error > message. But why? How can I know (without guessing) the cause of a > Maven error message in the context of the test sentences? If you're using a recent nightly build, the message should be something like: Did not expect an error in test sentence: '...', but got: ... It should display both the sentences and the errors detected. If that doesn't work, please post the output of Maven. Regards Daniel -- What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic patterns at an interface-level. Reveals which users, apps, and protocols are consuming the most bandwidth. Provides multi-vendor support for NetFlow, J-Flow, sFlow and other flows. Make informed decisions using capacity planning reports. http://sdm.link/zohodev2dev ___ Languagetool-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/languagetool-devel
Re: [en] Maven error when approximately 820 lines are added to grammar.xml
Perhaps "shall and Maven" is telling you something but for me it’s telling me nothing. But it makes my happy if I could be of some help. I’m always asking myself how you can correct a language you don’t know. This must be leading to mistakes most of French speaking people do when they speak Dutch. I can speak four languages just like that and three more with a little effort. And I have feeling for most of them as I would have spoken these languages since ever which is true for some of them. > Op 15 aug. 2016, om 15:50 heeft Mike Unwalla het > volgende geschreven: > > Thanks. I corrected the rule for 'shall' and Maven gives no errors. > > For 'establish', I guessed that by adding an exception for the postag JJ, > (=established), Maven would not give an error. My guess was correct. (And the > original rule was faulty, because it should have been about the verb only.) > > For 'do', the related test sentence > (https://github.com/languagetool-org/languagetool/commit/03cadb4fb393c042104d2dcce63662ce9e63402f) > is "Anatomy and geometry are fused in one, and each does something to the > other." I guessed that if I add an exception for 'something', Maven would not > give an error: > > >do postag="NNS?"/> > >not postag="PRP"/>something > > > Sure enough, the exception for 'something' prevents the Maven error message. > But why? How can I know (without guessing) the cause of a Maven error message > in the context of the test sentences? (The Surefire message in > org.languagetool.JLanguageToolTest.txt is the same as the Maven message.) > > Thanks and regards, > > Mike > > -Original Message- > From: Daniel Naber [mailto:[email protected]] > Sent: 12 August 2016 20:10 > > Here it's used with the second person, so I assume the rule doesn't > apply and should maybe be made more strict? > > Regards > Daniel > > > -- > What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic > patterns at an interface-level. Reveals which users, apps, and protocols are > consuming the most bandwidth. Provides multi-vendor support for NetFlow, > J-Flow, sFlow and other flows. Make informed decisions using capacity > planning reports. http://sdm.link/zohodev2dev > ___ > Languagetool-devel mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/languagetool-devel -- What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic patterns at an interface-level. Reveals which users, apps, and protocols are consuming the most bandwidth. Provides multi-vendor support for NetFlow, J-Flow, sFlow and other flows. Make informed decisions using capacity planning reports. http://sdm.link/zohodev2dev___ Languagetool-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/languagetool-devel
RE: [en] Maven error when approximately 820 lines are added to grammar.xml
Thanks. I corrected the rule for 'shall' and Maven gives no errors. For 'establish', I guessed that by adding an exception for the postag JJ, (=established), Maven would not give an error. My guess was correct. (And the original rule was faulty, because it should have been about the verb only.) For 'do', the related test sentence (https://github.com/languagetool-org/languagetool/commit/03cadb4fb393c042104d2dcce63662ce9e63402f) is "Anatomy and geometry are fused in one, and each does something to the other." I guessed that if I add an exception for 'something', Maven would not give an error: do notsomething Sure enough, the exception for 'something' prevents the Maven error message. But why? How can I know (without guessing) the cause of a Maven error message in the context of the test sentences? (The Surefire message in org.languagetool.JLanguageToolTest.txt is the same as the Maven message.) Thanks and regards, Mike -Original Message- From: Daniel Naber [mailto:[email protected]] Sent: 12 August 2016 20:10 Here it's used with the second person, so I assume the rule doesn't apply and should maybe be made more strict? Regards Daniel -- What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic patterns at an interface-level. Reveals which users, apps, and protocols are consuming the most bandwidth. Provides multi-vendor support for NetFlow, J-Flow, sFlow and other flows. Make informed decisions using capacity planning reports. http://sdm.link/zohodev2dev ___ Languagetool-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/languagetool-devel
RE: [en] Maven error when approximately 820 lines are added to grammar.xml
On 2016-08-12 20:41, Mike Unwalla wrote: > The rules are for Gardner's 'Misused terms in EU publications' > (http://euenglish.webs.com), which I want to commit to LT. It says "The use of ‘shall’ in the third person (he/she/it/they) is archaic". > Here is a test rule: > > > shall > > Alternatives: must, should. > error in test sentence: 'Later, you shall know it better.', Here it's used with the second person, so I assume the rule doesn't apply and should maybe be made more strict? Regards Daniel -- What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic patterns at an interface-level. Reveals which users, apps, and protocols are consuming the most bandwidth. Provides multi-vendor support for NetFlow, J-Flow, sFlow and other flows. Make informed decisions using capacity planning reports. http://sdm.link/zohodev2dev ___ Languagetool-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/languagetool-devel
RE: [en] Maven error when approximately 820 lines are added to grammar.xml
My rules do not use the test sentences. The rules are for Gardner's 'Misused terms in EU publications' (http://euenglish.webs.com), which I want to commit to LT. Here is a test rule: shall Alternatives: must, should. Test: shall Causes error: shall. It must also include, where appropriate, … Here are the Maven error messages: --- T E S T S --- Running org.languagetool.JLanguageToolTest Tests run: 9, Failures: 1, Errors: 0, Skipped: 2, Time elapsed: 2.5 sec <<< FAILURE! - in org.languagetool.JLanguageTool Test testEnglish(org.languagetool.JLanguageToolTest) Time elapsed: 1.65 sec <<< FAILURE! java.lang.AssertionError: Did not expect an error in test sentence: 'Later, you shall know it better.', but got: [TEST_S HALL:11-16:Alternatives: must, should.] expected:<0> but was:<1> at org.junit.Assert.fail(Assert.java:88) at org.junit.Assert.failNotEquals(Assert.java:834) at org.junit.Assert.assertEquals(Assert.java:645) at org.languagetool.JLanguageToolTest.assertNoError(JLanguageToolTest.java:112) at org.languagetool.JLanguageToolTest.testEnglish(JLanguageToolTest.java:92) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62 ) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl .java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod. java:50) at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.j ava:12) at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.ja va:47) at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.jav a:17) at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325) at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.jav a:78) at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.jav a:57) at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290) at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71) at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288) at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58) at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268) at org.junit.runners.ParentRunner.run(ParentRunner.java:363) at org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java: 367) at org.apache.maven.surefire.junit4.JUnit4Provider.executeWithRerun(JUnit4Provi der.java:274) at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provide r.java:238) at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:1 61) at org.apache.maven.surefire.booter.ForkedBooter.invokeProviderInSameClassLoade r(ForkedBooter.java:290) at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBoote r.java:242) at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:121) Running org.languagetool.rules.en.EnglishPatternRuleTest Failed tests: JLanguageToolTest.testEnglish:92->assertNoError:112 Did not expect an error in test sentence: 'Later, you shall know i t better.', but got: [TEST_SHALL:11-16:Alternatives: must, should.] expected:<0> but was:<1> Tests run: 64, Failures: 1, Errors: 0, Skipped: 4 [INFO] [INFO] Reactor Summary: Regards, Mike -Original Message- From: Daniel Naber [mailto:[email protected]] Sent: 12 August 2016 18:52 To: development discussion for LanguageTool Subject: RE: [en] Maven error when approximately 820 lines are added to grammar.xml On 2016-08-12 10:58, Mike Unwalla wrote: > My rules for these words cause the Maven errors: do, establish, of, > shall. Could you be more specific, i.e. why does the rule match the sentence? Is this a rule you're going to commit to LT or is it a "private" rule? > "Anatomy and geometry are fused in one, and each does something to the > other." Regards Daniel -- What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic patterns at an interface-level. Reveals which users, apps, and protocols are consuming the most bandwidth. Provides multi-vendor support for NetFlow, J-Flow, sFlow and other flows. Make informed decisions using capac
RE: [en] Maven error when approximately 820 lines are added to grammar.xml
On 2016-08-12 10:58, Mike Unwalla wrote: > My rules for these words cause the Maven errors: do, establish, of, > shall. Could you be more specific, i.e. why does the rule match the sentence? Is this a rule you're going to commit to LT or is it a "private" rule? > "Anatomy and geometry are fused in one, and each does something to the > other." Regards Daniel -- What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic patterns at an interface-level. Reveals which users, apps, and protocols are consuming the most bandwidth. Provides multi-vendor support for NetFlow, J-Flow, sFlow and other flows. Make informed decisions using capacity planning reports. http://sdm.link/zohodev2dev ___ Languagetool-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/languagetool-devel
RE: [en] Maven error when approximately 820 lines are added to grammar.xml
Thank you. The new message lets me find the source of the errors. When I put the applicable rules into comments, Maven gives no errors. My rules for these words cause the Maven errors: do, establish, of, shall. Is it possible to create rules for those words and get Maven to give a success message? * If yes, how? * If no, is it possible to add an attribute to the rule element to tell Maven to ignore the rule when Maven does its tests on the test sentences? Regards, Mike Unwalla Contact: www.techscribe.co.uk/techw/contact.htm -Original Message- From: Daniel Naber [mailto:[email protected]] Sent: 11 August 2016 20:03 To: development discussion for LanguageTool Subject: Re: [en] Maven error when approximately 820 lines are added to grammar.xml On 2016-08-11 14:57, Mike Unwalla wrote: > org.languagetool.JLanguageToolTest.testEnglish(JLanguageToolTest.java:84) We have a small number of test sentences in the Java code (instead of in the grammar.xml). In this case, this sentence now leads to an error, either because there's an actual error in it or because the new rule causes a false alarm: "Anatomy and geometry are fused in one, and each does something to the other." I've improved the error message now. -- What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic patterns at an interface-level. Reveals which users, apps, and protocols are consuming the most bandwidth. Provides multi-vendor support for NetFlow, J-Flow, sFlow and other flows. Make informed decisions using capacity planning reports. http://sdm.link/zohodev2dev ___ Languagetool-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/languagetool-devel
Re: [en] Maven error when approximately 820 lines are added to grammar.xml
On 2016-08-11 14:57, Mike Unwalla wrote: > org.languagetool.JLanguageToolTest.testEnglish(JLanguageToolTest.java:84) We have a small number of test sentences in the Java code (instead of in the grammar.xml). In this case, this sentence now leads to an error, either because there's an actual error in it or because the new rule causes a false alarm: "Anatomy and geometry are fused in one, and each does something to the other." I've improved the error message now. Regards Daniel -- What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic patterns at an interface-level. Reveals which users, apps, and protocols are consuming the most bandwidth. Provides multi-vendor support for NetFlow, J-Flow, sFlow and other flows. Make informed decisions using capacity planning reports. http://sdm.link/zohodev2dev ___ Languagetool-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/languagetool-devel
