Automattic / Automattic/harper
Correct "source codes", "a source code", etc
- Dominant language
- Rust
- Stars
- 15.4k
- Forks
- 627
- Avg merge
- 1d 15h
- Merged PRs (30d)
- 106
Description
## Description
Many non-native English speakers assume every noun has singular and plural and can be counted. Some native speakers have recently started to follow this lead.
Native English speakers intuitively know that many nouns don't have plurals, and wouldn't say "a dirt" or "there are dirts on my clothes", but they aren't taught such rules and can't explain them.
Unless they've studied grammar, linguistics, a foreign language, or taught English to foreign learners.
"Source code", like "dirt", is what linguists call a "mass noun" or "non-count noun".
Fixes are various:
- If changing plural to singular and it's the subject of a verb, the verb form will also have to change.
- It might be able to be changed to "Some source code" or "A piece of source code", "Many pieces of source code", etc.
## Examples
- This is **a source code** for basic C++ created in 2015.
- **Source Codes** For Tutorials On Coding With ArsenTech
- Detect the programming language of **a source code**.
- Programming **source codes** of M. Shojafar (papers, reports, patents).
## Potential False Positives
The most common false positive will be things like "a source code editor", where the indefinite article is legit because "source code" is a qualifier for another noun.
Contributor guide
Research direction
Start by locating how Harper represents and tests grammar corrections for phrases such as “source code.” Check the listed singular and plural examples, including the “source code editor” false positive. Done means the mass-noun usages are corrected without flagging the qualifier case.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- tooling
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100