View Single Post
Old 01-23-2017, 12:37 PM   #73
AnselmD
Zealot
AnselmD began at the beginning.
 
Posts: 105
Karma: 10
Join Date: Oct 2013
Device: none
Quote:
Originally Posted by Doitsu View Post
@AnselmD: BTW, my LanguageTool Sigil plugin, will flag straight apostrophes and acute accents. For example, you'll get the following message for the first error in line 11:
This is interesting.
Can i copy the (complete) error message to the clipboard. If there are suggestions i would like to copy them and not to type them again with a false apostrophe ;-)

I think the default workflow is:
1) correct spelling errors
2) test for grammar (with the language tool)

And if the spelling tool seems to make mysterious things: use the language tool.


Quote:
Originally Posted by Doitsu View Post
I realize that the plugin implementation isn't exactly very user-friendly, but it works and it's relatively easy to write your own rules.
Easy? I am afraid for side effects. If i change one rule, i may disable another rule.

The following one seems to be easy:
This is a false positive (mach’s gut, macht’s gut, mach’s besser; mach es gut, macht es gut, mach es besser), the rule detects this falsely as plural (no apostrophe for plural), but is only an omitting apostrophe:


Code:
 <rulegroup id="PLURAL_APOSTROPH" name="AGB's (AGBs) etc.">
            <antipattern>
                <token regexp="yes">King|Queen</token>
                <token regexp="yes">'|’|`|´|‘</token>
                <token>s</token>
                <token>College</token>
            </antipattern>
            <antipattern>
                <token>Queen</token>
                <token regexp="yes">'|’|`|´|‘</token>
                <token>s</token>
                <token>University</token>
            </antipattern>
            <rule>
                <!-- detected by GIRLS_DAY with better message -->
                <antipattern>
                    <token regexp="yes">Girl|Boy</token>
                    <token regexp="yes">'|’|`|´|‘</token>
                    <token>s</token>
                    <token>Day</token>
                </antipattern>
                <pattern>
                    <or>
                        <token>DVD</token>
                        <token postag_regexp="yes" postag="SUB:.*"><exception>Halt</exception></token>
                    </or>
                    <token regexp="yes">'|’|`|´|‘</token>
                    <token>s</token>
                </pattern>
                <message>Meinten Sie <suggestion>\1\3</suggestion> oder <suggestion>\1</suggestion>? Normalerweise wird im Deutschen vor einem Plural-s kein Apostroph gesetzt</message>
                <short>Normalerweise wird im Deutschen vor einem Plural-s kein Apostroph gesetzt</short>
                <example correction="AGBs|AGB">Es gelten die <marker>AGB`s</marker>.</example>
                <example correction="AGBs|AGB">Es gelten die <marker>AGB’s</marker>.</example>
                <example correction="Hits|Hit">Die Gruppe hatte viele <marker>Hit’s</marker>.</example>
                <!-- vgl. http://web.archive.org/web/20110214064020/http://www.duden.de/deutsche_sprache/sprachberatung/newsletter/archiv.php?id=54 -->
                <example>Der <marker>Girls’</marker> Day findet jährlich statt.</example>
            </rule>
        </rulegroup>
I can add an anti pattern:
Code:
  	    <antipattern>
                <token regexp="yes">Mach|Macht</token>
                <token regexp="yes">'|’|`|´|‘</token>
                <token>s</token>
            </antipattern>
Fine, now the false positive is gone.
Attached Thumbnails
Click image for larger version

Name:	2017-01-23 18_21_13-testcase.epub - epub2.0 - Sigil_plural_Macht's.png
Views:	1219
Size:	36.0 KB
ID:	154444  
AnselmD is offline   Reply With Quote