redhat-documentation / vale-at-red-hat

Vale config files, styles, and docs to help individuals and teams roll out Vale
https://redhat-documentation.github.io/vale-at-red-hat/
MIT License
39 stars 59 forks source link

Create a vale rule for ambiguous pronouns #881

Open aireilly opened 2 months ago

aireilly commented 2 months ago

https://www.inpressionedit.com/2016/11/12/fix-ambiguous-pronouns/

aireilly commented 2 months ago

I don't think this is possible with Vale, especially when the ambiguous pronoun might require the context of the previous sentence(s).

A rudimentary attempt at linting ambiguous pronouns in the sentence scope is here: https://studio.vale.sh/s/a1cba1f1cef1ff38e95f309a0895ac45

---
extends: sequence
message: "Avoid ambiguous pronouns"
level: suggestion
ignorecase: true
tokens:
  - tag: NN|NNP|NNPS|NNS
    skip: 8
    negate: true
  - tag: NN|NNP|NNPS|NNS
    skip: 8
    negate: true
  - tag: PRP|PRP$
    pattern: he|she|its?|they|his|her|their