All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.languagetool.rules.en.grammar-l2-de.xml Maven / Gradle / Ivy

<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" href="../../../../../../../../../languagetool-core/src/main/resources/org/languagetool/rules/print.xsl" ?>
<?xml-stylesheet type="text/css" href="../../../../../../../../../languagetool-core/src/main/resources/org/languagetool/rules/rules.css"
        title="Easy editing stylesheet" ?>
<!--
Rules for LanguageTool when user's native language is German

Copyright (C) 2001-2019 Daniel Naber (http://www.danielnaber.de),
  Marcin Miłkowski and the LanguageTool contributors

This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.

This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301
USA
-->

<rules lang="en" idprefix="L2_" xsi:noNamespaceSchemaLocation="../../../../../../../../../languagetool-core/src/main/resources/org/languagetool/rules/rules.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">

    <category id="GRAMMAR" name="Grammar" type="grammar">
        <rule id="THAN_AS" name="more sales as (than) last year">
            <!--
                TODO: 
                He runs faster as Peter.
            -->
            <antipattern>
                <token>as</token>
                <token chunk_re="B-NP.*" min="0" />
                <token chunk_re="E-NP.*" />
                <token chunk_re=".-VP" />
            </antipattern>
            <antipattern>
                <token>as</token>
                <token>its</token>
                <token postag="JJ" />
            </antipattern>
            <antipattern>
                <token>as</token>
                <token regexp="yes">an?</token>
                <token regexp="yes">percentage|portion|result|protection</token>
            </antipattern>
            <antipattern>
                <token>as</token>
                <token regexp="yes">off?</token>
            </antipattern>
            <antipattern>
                <token>as</token>
                <token chunk_re="B-NP.*" min="0" />
                <token chunk_re="E-NP.*" />
                <token regexp="yes" skip="7">and|n?or|&amp;</token>
                <token chunk_re=".-VP" />
            </antipattern>
            <antipattern>
                <token>as</token>
                <token chunk_re="B-NP.*" min="0" />
                <token chunk_re="E-NP.*" />
                <token skip="4">,</token>
                <token regexp="yes" skip="7">and|n?or|&amp;</token>
                <token chunk_re=".-VP" />
            </antipattern>
            <antipattern>
                <token>as</token>
                <token chunk_re="B-NP.*" min="0" />
                <token chunk_re="E-NP.*" />
                <token postag="IN" skip="7" />
                <token chunk_re=".-VP" />
                <example>The industry faced more setbacks as pollution from the Savannah River in the 1950s contaminated the island oyster beds.</example>
            </antipattern>
            <antipattern>
                <token skip="2">as</token>
                <token>as</token>
            </antipattern>
            <antipattern>
                <token postag="CD" skip="2" />
                <token regexp="yes">or|and|&amp;</token>
                <token regexp="yes">more|less</token>
            </antipattern>
            <antipattern>
                <token skip="-1">as</token>
                <token regexp="yes">th[ea]n</token>
            </antipattern>
            <antipattern>
                <token postag="CD" />
                <token regexp="yes">more|less</token>
                <example>Karami served four more times as Prime Minister throughout the 1960s.</example>
            </antipattern>
            <pattern>
                <token regexp="yes">more|less</token>
                <token chunk_re="B-NP-plural" min="0" />
                <token chunk_re="E-NP-plural" />
                <marker>
                    <token>as</token>
                </marker>
                <token chunk_re="B-NP.*" min="0" />
                <token chunk_re="E-NP.*" postag="NN.*" postag_regexp="yes">
                    <exception regexp="yes">arrives|appears|approaches|exceeds</exception>
                </token>
            </pattern>
            <message>Did you mean <suggestion>than</suggestion>?</message>
            <example correction="than">We had more sales <marker>as</marker> last year.</example>
            <example correction="than">Tom has more bullets <marker>as</marker> Peter ever had.</example>
            <example correction="than">We had more sales <marker>as</marker> 2 years ago.</example>
            <example correction="than">Did you know that when Blizzards game was getting larger they hired more people <marker>as</marker> Game Masters just so that this presence was still felt?</example>
        </rule>
        <rulegroup id="WH_VERB_SUBJECT" name="When comes the bus (does the bus come|is the bus coming)?">
            <antipattern>
                <token>why</token>
                <token postag="VBP" />
                <token>it</token>
            </antipattern>
            <antipattern>
                <token>how</token>
                <token>goes</token>
                <token>it</token>
            </antipattern>
            <antipattern>
                <token regexp="yes">when|where|how</token>
                <token regexp="yes" case_sensitive="yes">[A-Z]|[a-z]</token>
            </antipattern>
            <antipattern>
                <token>how</token>
                <token postag="VB" />
            </antipattern>
            <antipattern>
                <token>where</token>
                <token>lies</token>
            </antipattern>
            <rule>  <!-- subject pronouns, present tense WITH progressive suggestion -->
                <pattern>
                    <token postag="SENT_START|CC|PCT" postag_regexp="yes" />
                    <token regexp="yes">when|where|why|how</token>
                    <marker>
                        <token postag="VB[PZ]" postag_regexp="yes">
                            <exception postag="MD" />
                            <exception regexp="yes" inflected="yes">be|chide|do|have</exception>
                        </token>
                        <token skip="5" postag="PRP_S.*" postag_regexp="yes" chunk_re="B-NP.*" />
                    </marker>
                    <token postag="SENT_END">?</token>
                </pattern>
                <message>Questions require a helping verb (a form of 'do' or 'be') + the main verb ('<match no="3" postag="VB" />').</message>
                <suggestion><match no="3" postag="V.*" postag_regexp="yes">do</match> \4 <match no="3" postag="VB" /></suggestion>
                <suggestion><match no="3" postag="V.*" postag_regexp="yes">be</match> \4 <match no="3" postag="VBG" /></suggestion>
                <example correction="do you go|are you going">When <marker>go you</marker> home?</example>
                <example correction="do you eat|are you eating">Why <marker>eat you</marker> so much?</example>
                <example correction="does he work|is he working">How <marker>works he</marker> so late at night?</example>
                <example>Why use it?</example>
                <example>How goes it?</example>
                <example>Why chide you with me?</example>
            </rule>
            <rule>  <!-- subject pronouns, past tense WITHOUT progressive suggestion -->
                <pattern>
                    <token postag="SENT_START|CC|PCT" postag_regexp="yes" />
                    <token regexp="yes">when|where|why|how</token>
                    <marker>
                        <token postag="VBD">
                            <exception postag="MD" />
                            <exception regexp="yes" inflected="yes">be|do|have</exception>
                        </token>
                        <token skip="5" postag="PRP_S.*" postag_regexp="yes" chunk_re="B-NP.*" />
                    </marker>
                    <token postag="SENT_END">?</token>
                </pattern>
                <message>Past tense questions require a helping verb ('did') + the base form of the main verb ('<match no="3" postag="VB" />').</message>
                <suggestion>did \4 <match no="3" postag="VB" /></suggestion>
                <example correction="did you come">When <marker>came you</marker> home last night?</example>
                <example correction="did she go">Where <marker>went she</marker> on vacation last month?</example>
            </rule>
            <rule>  <!-- other NPs, present tense WITH progressive suggestion -->
                <pattern>
                    <token postag="SENT_START|CC|PCT" postag_regexp="yes" />
                    <token regexp="yes">when|where|how</token>
                    <marker>
                        <token postag="VB[PZ]" postag_regexp="yes" chunk="B-VP">
                            <exception postag="MD" />
                            <exception regexp="yes" inflected="yes">be|do|have</exception>
                        </token>
                        <token chunk_re="B-NP.*" />
                        <token min="0" chunk_re="I-NP.*" />
                        <token min="0" skip="5" chunk_re="E-NP.*" />
                    </marker>
                    <token postag="SENT_END">?</token>
                </pattern>
                <message>Questions require a helping verb (a form of 'do' or 'be') + the main verb ('<match no="3" postag="VB" />').</message>
                <suggestion><match no="3" postag="V.*" postag_regexp="yes">do</match> \4 \5 \6 <match no="3" postag="VB" /></suggestion>
                <suggestion><match no="3" postag="V.*" postag_regexp="yes">be</match> \4 \5 \6 <match no="3" postag="VBG" /></suggestion>
                <example correction="does the bus come|is the bus coming">When <marker>comes the bus</marker>?</example>
                <example correction="do the kids go|are the kids going">Where <marker>go the kids</marker> after school?</example>
                <example correction="does the second domain run|is the second domain running">Where <marker>runs the second domain</marker>?</example>
                <example>Where r u?</example>
                <example>So now where i my tuts+ subscription code?</example>
                <example>How fix it?</example>
                <example>Hmm, how come my post was edited?</example>
                <example>Where lies the problem?</example>
            </rule>
            <rule>  <!-- other NPs, past tense WITHOUT progressive suggestion -->
                <pattern>
                    <token postag="SENT_START|CC|PCT" postag_regexp="yes" />
                    <token regexp="yes">when|where|how</token>
                    <marker>
                        <token postag="VBD" chunk="B-VP">
                            <exception postag="MD" />
                            <exception regexp="yes" inflected="yes">be|do|have</exception>
                        </token>
                        <token chunk_re="B-NP.*" />
                        <token min="0" chunk_re="I-NP.*" />
                        <token min="0" skip="5" chunk_re="E-NP.*" />
                    </marker>
                    <token postag="SENT_END">?</token>
                </pattern>
                <message>Past tense questions require a helping verb ('did') + the base form of the main verb ('<match no="3" postag="VB" />').</message>
                <suggestion>did \4 \5 \6 <match no="3" postag="VB" /></suggestion>
                <example correction="did the cats swim">How <marker>swam the cats</marker> across the lake?</example>
            </rule>
        </rulegroup>
    </category>

</rules>




© 2015 - 2025 Weber Informatics LLC | Privacy Policy