-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add some new rules to en-GB grammar.xml. #10596
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -534,6 +534,55 @@ USA | |
<example type="triggers_error">Explore releases from Ait! at Discogs.</example> | ||
</rule> | ||
|
||
</category> | ||
</category> | ||
|
||
<rule id="YOUR_YOURE" name="Your/You're Usage"> | ||
<pattern> | ||
<token>your</token> | ||
</pattern> | ||
<message>Did you mean <suggestion>you're</suggestion>?</message> | ||
<example correction="you're">I think <marker>your</marker> going to love it.</example> | ||
</rule> | ||
|
||
<rule id="WORD_COLLOCATION_1" name="Inappropriate Word Collocation"> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We would probably want a more descriptive id for this rule than just |
||
<pattern> | ||
<token>strong</token> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is there a way to make this rule more robust so that it covers all (or at least more) instances where an adjective is incorrectly being used to modify a verb? Right now, this rule would apply only to the bi-gram |
||
<token>believe</token> | ||
</pattern> | ||
<message>Consider using <suggestion>strongly believe</suggestion> instead of 'strong believe'. "Strongly" is the adverb form of "strong" and is used to modify verbs like "believe."</message> | ||
<example correction="strongly believe">I strong believe in your abilities.</example> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. You need to include |
||
</rule> | ||
|
||
<rule id="WORD_COLLOCATION_3" name="Inappropriate Word Collocation"> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Same comment as above. We'd want a more descriptive id, and this isn't really a collocation error. |
||
<pattern> | ||
<token>fast</token> | ||
<token>drive</token> | ||
</pattern> | ||
<message>Consider using <suggestion>fast driving</suggestion> instead of 'fast drive'. "Driving" is the gerund form of the verb "drive" and is used after an adjective like "fast" to describe the act of driving.</message> | ||
<example correction="fast driving">He was caught for fast drive.</example> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. You need to include |
||
</rule> | ||
|
||
<rule id="WORD_COLLOCATION_2" name="Inappropriate Word Collocation"> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We'd want a more descriptive id. And this one is a collocation error! :-) |
||
<pattern> | ||
<token>fast</token> | ||
<token>meal</token> | ||
</pattern> | ||
<message>Consider using <suggesiton>fast food</suggestion> instead of 'fast meal'. "Fast food" is a specific type of food that is prepared and served quickly, whereas "fast meal" is not commonly used.</message> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There's a typo here: should be |
||
<example correction="fast food">Let's grab some fast meal.</example> | ||
</rule> | ||
|
||
<rule id="Singular_Subject_Verb_Agreement" name="Singular Subject-Verb Agreement"> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. LT already has rules for subject verb agreement. Additionally, as currently written, this rule will result in some false positives, like in the sentence, |
||
<pattern> | ||
<token postag="DT" min="0" max="1"/> | ||
<token postag="NN">dog</token> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This rule will apply only when the subject is |
||
<token postag="RB" min="0" max="1"/> | ||
<token postag="VBP">run</token> | ||
</pattern> | ||
<message>The verb "run" does not agree with the singular subject "dog". Consider using <suggestion>runs</suggestion> to match the singular subject.</message> | ||
<example correction="runs">The dog <marker>run</marker> in the park.</example> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The |
||
<example correction="runs">The dog quickly <marker>run</marker> in the park.</example> | ||
<example correction="runs">Dog <marker>run</marker> in the park.</example> | ||
<example correction="runs">Dog quickly <marker>run</marker> in the park.</example> | ||
</rule> | ||
|
||
</rules> | ||
</rules> |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -31,6 +31,7 @@ | |
</developer> | ||
</developers> | ||
<modules> | ||
<module>languagetool-client-example</module> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Could you let me know why you added this here? |
||
<module>languagetool-core</module> | ||
<module>languagetool-language-modules/en</module> | ||
<module>languagetool-language-modules/fa</module> | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LT already has rules for {your=>you're}. Additionally, as currently written, this rule will change every instance of
your
toyou're
, which will result in a large number of False Positives.If you want to refine this rule, you should find instances where LT does not successfully correct {your=>you're} (i.e., False Negatives) and refine our already-existing rules for those cases.