Thanks for the report! That bug is my fault. When I wrote the rule, I tacitly assumed that SENT_END would always be a punctuation mark, I wasn't aware that it can ever be a word.
If we revert Daniel's last change and use (something like) the following to match a period or an exclamation mark at the sentence end in FRAGE_OHNE_FRAGEZEICHEN: <token postag="SENT_END" regexp="yes">\.|!</token> I think we can keep the suggestion. We could then have another rule that covers the case when a sentence ends with no punctuation mark at all. I am thinking of a rule that matches something like this: <token postag="SENT_END" regexp="yes">[^\.!\?]</token> I'm not sure if the last regex will work, the intention is to match a SENT_END that isn't a period, exclamation mark or question mark. Maybe we would have to add a colon and/or an ellipsis. Am 18.01.2016 18:11, schrieb Rick Genter: > I'm experimenting with LanguageTool-3.2 and have discovered what I > believe to be a problem with one of the German rules. > > If I give the text "Wie geht es dir", the LanguageTool UI shows: > > Inline image 1 > > While I understand why "dir" is underlined, I feel like the column > information is wrong and that the error is actually in column 16, where > the ? is missing. > > I'm trying to use LanguageTool via API for batch processing of text, and > I would like to be able to apply suggestions for correcting the text > when LanguageTool detects an error. For most errors that have > suggestions this works, but for FRAGE_OHNE_FRAGEZEICHEN this doesn't; if > I apply the suggestion the above becomes "Wie geht es ?" (the "dir" is > lost). > > I looked at de/grammar.xml but it wasn't clear how I would change it to > fix this, and if I did change it I think the UI would lose the red > underline under "dir". > > What's the best way to solve this? > -- > Rick Genter > rick.gen...@gmail.com <mailto:rick.gen...@gmail.com> > > > ------------------------------------------------------------------------------ > Site24x7 APM Insight: Get Deep Visibility into Application Performance > APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month > Monitor end-to-end web transactions and take corrective actions now > Troubleshoot faster and improve end-user experience. Signup Now! > http://pubads.g.doubleclick.net/gampad/clk?id=267308311&iu=/4140 > > > > _______________________________________________ > Languagetool-devel mailing list > Languagetool-devel@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/languagetool-devel > ------------------------------------------------------------------------------ Site24x7 APM Insight: Get Deep Visibility into Application Performance APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month Monitor end-to-end web transactions and take corrective actions now Troubleshoot faster and improve end-user experience. Signup Now! http://pubads.g.doubleclick.net/gampad/clk?id=267308311&iu=/4140 _______________________________________________ Languagetool-devel mailing list Languagetool-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/languagetool-devel