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

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

There is a newer version: 6.4
Show newest version
<?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" ?>
<!--
American English Grammar and Typo Rules for LanguageTool
See tagset.txt for the meaning of the POS tags
Copyright (C) 2012 Marcin Miłkowski (http://www.languagetool.org)

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
-->
<!--suppress CheckTagEmptyBody -->

<!DOCTYPE rules [
        <!ENTITY weekdays "Monday|Tuesday|Wednesday|Thursday|Friday|Saturday|Sunday">
        <!ENTITY abbrevWeekdays "Mon|Mo|Tue|Tu|Wed|We|Thu|Th|Fri|Fr|Sat|Sa|Sun|Su">
        <!ENTITY months "January|February|March|April|May|June|July|August|September|October|November|December">
        <!ENTITY abbrevMonths "Jan|Feb|Mar|Apr|Jun|Jul|Aug|Sep|Sept|Oct|Nov|Dec">
        ]>

<rules lang="en-US" xsi:noNamespaceSchemaLocation="../../../../../../../../../../languagetool-core/src/main/resources/org/languagetool/rules/rules.xsd"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <!-- ====================================================================== -->
    <!-- Possible typos -->
    <!-- ====================================================================== -->
    <category id="US_SPECIFIC_TYPOS" name="Possible Typo" type="misspelling">
          <rule id="ANY_MORE" name="any more (anymore)">
              <pattern>
                  <marker>
                     <token>any</token>
                     <token>more</token>
                  </marker>
                  <token><exception regexp="yes">of|than</exception><exception postag="NN.*" postag_regexp="yes"/></token>
              </pattern>
              <message>Did you mean <suggestion>\1\2</suggestion>?</message>
              <url>http://www.whichenglish.com/Better-English-Grammar/Online-Usage-Letter-A.html</url>
              <short>Possible typo</short>
              <example correction="anymore">I couldn't find my way around in it <marker>any more</marker>.</example>
          </rule>
    </category>

    <category id="AMERICAN_ENGLISH_STYLE" name="American English Style" type="style">
        <rule id="MISSING_COMMA_AFTER_YEAR" name="Potentially missing comma after year">
            <pattern>
                <token regexp="yes">&months;</token>
                <token regexp="yes">[0123]?[0-9]</token>
                <token min="0">,</token>
                <marker>
                    <token regexp="yes">[0-9]{4}</token>
                </marker>
                <token regexp="yes">[a-z]+</token>
            </pattern>
            <message>Some style guides suggest that commas should set off the year in a month-day-year date: <suggestion>\4,</suggestion>.</message>
            <url>http://www.thepunctuationguide.com/comma.html#dates</url>
            <short>Potentially missing comma</short>
            <example correction="2011,">The meeting scheduled for July 10, <marker>2011</marker> was canceled.</example>
            <example>My birthday is October 8, <marker>1983,</marker> but I usually do not celebrate.</example>
        </rule>
    </category>
    
    <category id="BRITISH_ENGLISH" name="British English phrases" type="locale-violation">
        <rule id="GROUND_FIRST_FLOOR" name="ground floor/first floor">
            <pattern>
                <marker>
                    <token>ground</token>
                </marker>
                <token regexp="yes">floors?</token>
            </pattern>
            <message>This word is British English. Did you mean <suggestion>first</suggestion>?</message>
            <url>http://www.learnenglish.de/mistakes/USvsBrEnglish.html</url>
            <example correction="first">The room is on the <marker>ground</marker> floor.</example>
            <example correction="first">Historic Buildings: insulating solid <marker>ground</marker> floors.</example>
            <example>The room is on the <marker>first</marker> floor.</example>
        </rule>
        <rule id="MASTERS_DISSERTATION_THESIS" name="master's dissertation (thesis)">
            <pattern>
                <token>master</token>
                <token spacebefore="no" regexp="yes">['’]</token>
                <token>s</token>
                <token inflected="yes">dissertation</token>
            </pattern>
            <message>In the US, the word '\4' is usually for doctoral degrees. Did you mean <suggestion>\1\2\3 <match no="4" postag="(NN.*)" postag_replace="$1">thesis</match></suggestion>?</message>
            <url>https://en.wikipedia.org/wiki/Thesis#United_States</url>
            <short>BrE/AmE: dissertation/thesis</short>
            <example correction="master's thesis">Her <marker>master's dissertation</marker> is excellent.</example>
            <example correction="Master’s theses"><marker>Master’s dissertations</marker> are not easy to write.</example>
            <example correction="master's thesis">Example sentence with no full stop: <marker>master's dissertation</marker></example>
        </rule>
    </category>

</rules>




© 2015 - 2024 Weber Informatics LLC | Privacy Policy