Automattic / Automattic/harper
Support for collective nouns for linters
- Dominant language
- Rust
- Stars
- 15.4k
- Forks
- 627
- Avg merge
- 1d 15h
- Merged PRs (30d)
- 102
Description
Looking at https://github.com/Automattic/harper/pull/2837 made me think it could be handy for linters to be able to determine which words are collective nouns such as "group", "bunch", "pile", "team", "flock", "set", etc.
There are two ways to do this:
1. Add a new dictionary annotation flag to `dictionary.dict` and `annotations.json` and as `k` is the last available plain Latin letter and a very good mnemonic for "collection", it would be the perfect choice.
2. Add an `Expr` (or a `Pattern`) that consists of a `WordSet` containing all the collective nouns.
# Pros and Cons
Dictionary flag makes sense if there are many such words.
`Expr` or `Pattern` makes sense if there are few such words.
Dictionary flag uses up a plain Latin letter that might be better used for another concept.
Dictionary flags are easy to check from `DictWordMetadata` and `TokenKind`
`TokenKind` methods combine easily, for checking if a word is a collective noun but not also a verb, or a plural collective noun, etc.
Thoughts?
Contributor guide
Research direction
Start by reading dictionary.dict, annotations.json, DictWordMetadata, and TokenKind, then compare the proposed dictionary annotation flag with the Expr or Pattern WordSet approach. The issue does not select an approach or name tests; done would require an agreed representation for collective nouns and validation that the resulting metadata or expression supports the described combinations.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- devtools
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100