Automattic / Automattic/harper

"etc." is not recognized as the end of a sentence.

Open
#1,306 2 comments 1 reaction 0 assignees View on GitHub
bug punctuation
Dominant language
Rust
Stars
15.4k
Forks
627
Avg merge
1d 15h
Merged PRs (30d)
106

Description

"etc." nor "etc.." seem to be recognized as the end of a sentence.

`long.md`:
```
This sentence is way too long for Harper, because it uses many words, but also
repeats itself, make overly long lists, insert nonsense, tell random stories
about life, etc. But it would help if it detected that it's actually two
sentences and not just one.
```

```
cargo run --bin harper-cli lint /tmp/long.md
Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.08s
Running `target/debug/harper-cli lint /tmp/long.md`
/home/ux/.config/harper-ls/dictionary.txt: No such file or directory (os error 2)
/home/ux/.local/share/harper-ls/file_dictionaries/tmp%long.md%: No such file or directory (os error 2)
Advice:
╭─[long.md:1:1]

1 │ ╭─▶ This sentence is way too long for Harper, because it uses many words, but also
┆ ┆
4 │ ├─▶ sentences and not just one.
│ │
│ ╰───────────────────────────────── This sentence is 45 words long.
───╯
```

Tested with: Harper 0.37.0

Contributor guide

Open the contributing guide

Research direction

Reproduce the report with the shown long.md content and run `cargo run --bin harper-cli lint /tmp/long.md`. Read the sentence-length diagnostic and the sentence-boundary handling it reaches. Done means the example is treated as two sentences when it contains `etc.` or `etc..`, rather than as one 45-word sentence.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
devtools
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.