Skip to content

Commit

Permalink
[en] move style rules to style file
Browse files Browse the repository at this point in the history
  • Loading branch information
AzadehSafakish committed Jul 17, 2024
1 parent bb74955 commit 0bfa6e0
Show file tree
Hide file tree
Showing 2 changed files with 55 additions and 53 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -63770,19 +63770,6 @@ USA
<example>We have to google mail providers.</example>
<example>We can't google news.</example>
</rule>
<rule type="style">
<pattern>
<token>
Google
</token>
<token min="0">'s</token>
<token>AdWords</token>
</pattern>
<message>Google renamed their advertising platform to <suggestion><match no="1" case_conversion="startupper" />\2 Ads</suggestion>.</message>
<url>https://en.wikipedia.org/wiki/Google_Ads</url>
<example correction="Google Ads">We use <marker>Google Adwords</marker>.</example>
<example correction="Google's Ads">The city is also home to the headquarters of <marker>Google's AdWords</marker> program.</example>
</rule>
<rule>
<antipattern>
<token>Google</token>
Expand Down Expand Up @@ -64362,25 +64349,6 @@ USA
<message>Did you mean the Microsoft product <suggestion><match no="1" case_conversion="startupper" /> 365</suggestion>?</message>
<example correction="Outlook 365">In our organisation, we use <marker>outlook 360</marker>.</example>
</rule>
<rule type="style">
<antipattern>
<token regexp="yes">Microsoft|MS</token>
<token skip="-1">Ads</token>
<token>Bing</token>
</antipattern>
<antipattern>
<token skip="-1">Bing</token>
<token regexp="yes">Microsoft|MS</token>
<token>Ads</token>
</antipattern>
<pattern>
<token>Bing</token>
<token case_sensitive="yes">Ads</token>
</pattern>
<message>"Bing Ads" has been renamed to <suggestion>Microsoft Ads</suggestion>.</message>
<short>Outdated Name</short>
<example correction="Microsoft Ads">We are using <marker>Bing Ads</marker> in our advertising strategy.</example>
</rule>
</rulegroup>
<rule id="VITAMIN_C" name="vitamin C">
<antipattern case_sensitive="yes">
Expand Down Expand Up @@ -139988,27 +139956,6 @@ The accident victim died from her injuries.
<example correction="“"><marker>„</marker>Test”.</example>
</rule>
</rulegroup>
<rule id="ELLIPSIS" name="Smart ellipsis (…)" tags="picky" type="style">
<antipattern>
<token>.</token>
<token>.</token>
<token>.</token>
<token>.</token>
<token>.</token>
</antipattern>
<pattern>
<token>.</token>
<token>.</token>
<token>.</token>
</pattern>
<message>Consider using the typographical ellipsis character here instead.</message>
<suggestion>…</suggestion>
<url>https://languagetool.org/insights/post/grammar-ellipsis/</url>
<!--<example correction="…">This is important <marker>. . .</marker> as far as I know.</example> doesn't work due to way sentence splitting works -->
<example>This is important – as far as I know.</example>
<example correction="…">This is important<marker>...</marker> as far as I know.</example>
<example>1. Introduction .................................... 3</example>
</rule>

<rule id="TYPOGRAPHICAL_APOSTROPHE" name="require typographical (curly) apostrophe (’)" tags="picky" default="off">
<pattern>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -494,6 +494,61 @@ For more detailed information, including tag definitions, please check out our d
<!-- Style -->
<!-- ====================================================================== -->
<category id="STYLE" name="Style" type="style">
<rule id="ELLIPSIS" name="Smart ellipsis (…)" tags="picky">
<antipattern>
<token>.</token>
<token>.</token>
<token>.</token>
<token>.</token>
<token>.</token>
</antipattern>
<pattern>
<token>.</token>
<token>.</token>
<token>.</token>
</pattern>
<message>Consider using the typographical ellipsis character here instead.</message>
<suggestion>…</suggestion>
<url>https://languagetool.org/insights/post/grammar-ellipsis/</url>
<!--<example correction="…">This is important <marker>. . .</marker> as far as I know.</example> doesn't work due to way sentence splitting works -->
<example>This is important – as far as I know.</example>
<example correction="…">This is important<marker>...</marker> as far as I know.</example>
<example>1. Introduction .................................... 3</example>
</rule>
<rulegroup id="GOOGLE_PRODUCTS_STYLE" name="Google product names (style rules)">
<rule>
<pattern>
<token>Google</token>
<token min="0">'s</token>
<token>AdWords</token>
</pattern>
<message>Google renamed their advertising platform to <suggestion><match no="1" case_conversion="startupper" />\2 Ads</suggestion>.</message>
<url>https://en.wikipedia.org/wiki/Google_Ads</url>
<example correction="Google Ads">We use <marker>Google Adwords</marker>.</example>
<example correction="Google's Ads">The city is also home to the headquarters of <marker>Google's AdWords</marker> program.</example>
</rule>
</rulegroup>
<rulegroup id="MICROSOFT_PRODUCTS_STYLE" name="Microsoft product names (style rules)">
<rule>
<antipattern>
<token regexp="yes">Microsoft|MS</token>
<token skip="-1">Ads</token>
<token>Bing</token>
</antipattern>
<antipattern>
<token skip="-1">Bing</token>
<token regexp="yes">Microsoft|MS</token>
<token>Ads</token>
</antipattern>
<pattern>
<token>Bing</token>
<token case_sensitive="yes">Ads</token>
</pattern>
<message>"Bing Ads" has been renamed to <suggestion>Microsoft Ads</suggestion>.</message>
<short>Outdated Name</short>
<example correction="Microsoft Ads">We are using <marker>Bing Ads</marker> in our advertising strategy.</example>
</rule>
</rulegroup>
<rulegroup id="LIGHTYEAR" name="Light-year as a unit of time" tags="picky">
<rule>
<regexp>\b(light[- ]?years? ago)\b</regexp>
Expand Down

1 comment on commit 0bfa6e0

@AzadehSafakish
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To have them all in one place for QB's annotators.

Please sign in to comment.