Automattic / Automattic/harper
`CompoundNouns` does not look left: "high school teacher" → "high schoolteacher"
- Dominant language
- Rust
- Stars
- 15.4k
- Forks
- 627
- Avg merge
- 1d 12h
- Merged PRs (30d)
- 106
Description
**What got flagged?**
"high school teacher" → "high schoolteacher"
**Why is this incorrect?**
The join rule (`CompoundNouns`) corrects `school teacher` → `schoolteacher`. Inside the noun
phrase `high school teacher` this produces `high schoolteacher`, which is not
correct — the bigram is matched without considering the word to its left.
Control that shows it is context-blindness rather than a dictionary gap:
`high school student` is clean, because `school student` is not a closed
compound — the rule never consults `high` in either case.
**Example of correct usage:**
When the preceding token forms an established open compound with the
first word of the bigram (`high school`), the join should not fire.
"high school teacher"
Reproduces at default configuration (harper.js 2.4.0)
Contributor guide
Research direction
Start by reproducing the reported transformation with the default harper.js 2.4.0 configuration, comparing “high school teacher” with the “high school student” control. Then trace the CompoundNouns join rule and add regression coverage; done means the established open compound prevents the join while the existing school teacher behavior remains correct.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 68/100