Automattic / Automattic/harper
Introduce a generic way to flag incorrect prepositions
- Dominant language
- Rust
- Stars
- 15.4k
- Forks
- 627
- Avg merge
- 1d 15h
- Merged PRs (30d)
- 106
Description
Prepositions are notoriously hard to get right for non-native speakers, as there are no hard rule for them, you just have to learn every case, one by one.
For example:
- `interested in` is right, while `interested on` isn't
- `good at` is right, while `good in` isn't
- `depends on` is right, while `depends of` isn't
It would thus be nice to have the infrastructure in harper to be able to express this as some kind of map, like:
```python
valid_prepositions = {
"interested": {
"valid": ["in", "to"],
"invalid": ["on", "by"],
},
"good": {
"valid": ["*"],
"invalid": ["in"],
},
"depends": {
"valid": ["on"],
"invalid": ["of"],
},
}
```
Currently, there are a handful of weir files, which isn't optimal.
Contributor guide
Research direction
The issue names no files or tests; start by locating the existing preposition rules and reading how their exceptions are represented. Check the current rule infrastructure and comment history before choosing an approach. Done means Harper can express valid and invalid preposition mappings generically and the existing cases can use that infrastructure.
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
- 25/100