Commit graph

30 commits

Author SHA1 Message Date
Elijah Potter
c0426a7349
feat(core): more rules (#2107) 2025-11-05 08:27:25 -07:00
Elijah Potter
a292474706
feat(core): create SplitWords linter (#2118)
Some checks failed
Binaries / harper-cli - Linux-x86_64-musl (push) Has been cancelled
Binaries / harper-cli - Windows-x86_64 (push) Has been cancelled
Binaries / harper-ls - macOS-aarch64 (push) Has been cancelled
Binaries / harper-ls - Linux-aarch64-GNU (push) Has been cancelled
Binaries / harper-ls - Linux-aarch64-musl (push) Has been cancelled
Binaries / harper-ls - macOS-x86_64 (push) Has been cancelled
Binaries / harper-ls - Linux-x86_64-GNU (push) Has been cancelled
Binaries / harper-ls - Linux-x86_64-musl (push) Has been cancelled
Binaries / harper-ls - Windows-x86_64 (push) Has been cancelled
Build Web / build-web (push) Has been cancelled
Chrome Plugin / chrome-plugin (push) Has been cancelled
Just Checks / just build-obsidian (push) Has been cancelled
Just Checks / just check-js (push) Has been cancelled
Just Checks / just check-rust (push) Has been cancelled
Just Checks / just test-chrome-plugin (push) Has been cancelled
Just Checks / just test-firefox-plugin (push) Has been cancelled
VS Code Plugin / alpine-x64 (push) Has been cancelled
VS Code Plugin / darwin-arm64 (push) Has been cancelled
VS Code Plugin / darwin-x64 (push) Has been cancelled
VS Code Plugin / linux-x64 (push) Has been cancelled
VS Code Plugin / win32-arm64 (push) Has been cancelled
VS Code Plugin / win32-x64 (push) Has been cancelled
WordPress Plugin / wp-plugin (push) Has been cancelled
Just Checks / just test-harperjs (push) Has been cancelled
Just Checks / just test-obsidian (push) Has been cancelled
Just Checks / just test-rust (push) Has been cancelled
Just Checks / just test-vscode (push) Has been cancelled
VS Code Plugin / alpine-arm64 (push) Has been cancelled
VS Code Plugin / linux-arm64 (push) Has been cancelled
VS Code Plugin / linux-armhf (push) Has been cancelled
2025-10-29 16:43:17 -06:00
Andrew Dunbar
c6dec17c3c
feat:many more variants of "for/to all intents and purposes" (#1964)
Some checks failed
Build Chrome Plugin / package (push) Has been cancelled
Build Binaries / Release harper-cli - macOS-aarch64 (push) Has been cancelled
Build Binaries / Release harper-cli - Linux-aarch64-GNU (push) Has been cancelled
Build Binaries / Release harper-cli - macOS-x86_64 (push) Has been cancelled
Build Binaries / Release harper-cli - Linux-aarch64-musl (push) Has been cancelled
Build Binaries / Release harper-cli - Linux-x86_64-musl (push) Has been cancelled
Build Binaries / Release harper-cli - Windows-x86_64 (push) Has been cancelled
Build Binaries / Release harper-ls - macOS-aarch64 (push) Has been cancelled
Build Binaries / Release harper-cli - Linux-x86_64-GNU (push) Has been cancelled
Build Binaries / Release harper-ls - Linux-aarch64-GNU (push) Has been cancelled
Build Binaries / Release harper-ls - Linux-aarch64-musl (push) Has been cancelled
Build Binaries / Release harper-ls - macOS-x86_64 (push) Has been cancelled
Build Binaries / Release harper-ls - Linux-x86_64-GNU (push) Has been cancelled
Build Web / build (push) Has been cancelled
Package VS Code Plugin / Package - darwin-arm64 (push) Has been cancelled
Package VS Code Plugin / Package - darwin-x64 (push) Has been cancelled
Package VS Code Plugin / Package - linux-arm64 (push) Has been cancelled
Build Binaries / Release harper-ls - Linux-x86_64-musl (push) Has been cancelled
Build Binaries / Release harper-ls - Windows-x86_64 (push) Has been cancelled
Package VS Code Plugin / Package - linux-x64 (push) Has been cancelled
Package VS Code Plugin / Package - win32-x64 (push) Has been cancelled
Package WordPress Plugin / package (push) Has been cancelled
Precommit / precommit (push) Has been cancelled
* feat:many more variants of "for/to all intents and purposes"

* chore: another variant
2025-09-19 15:39:07 +00:00
Andrew Dunbar
10c552a547
chore: curate dict; improve POS tag snapshots (#1928)
* chore: curate dict; improve POS tag snapshots

* chore: snapshots, remove commented-out code

* chore: missing words from the snapshots

* chore: more curation

* fix: snapshots
2025-09-15 14:29:32 +00:00
Andrew Dunbar
d249169414
chore: normalize flags, +noun & verb flags (#1891)
* chore: normalize flags, +noun & verb flags

* feat: curate annotation flags

* chore: missing words from snapshots

- Noun and verb curation
- Added adjective POS property for the -able/-ible suffix

* fix: linters broke with "not" set to adverb

* fix(ci): update snapshots

---------

Co-authored-by: Elijah Potter <me@elijahpotter.dev>
2025-09-12 18:09:22 +00:00
Elijah Potter
85a8efa2e9
feat(chrome-ext): show hints randomly (#1909)
Co-authored-by: ethqnol <ethqnol@users.noreply.github.com>
2025-09-12 09:15:46 -06:00
Andrew Dunbar
8664ecb580
chore: mostly annotating verbs and nouns (#1874)
* chore: mostly annotating verbs and nouns

Fixes #1873

* fix: added `.vscode/settings.json` instead of `dictionary.dict`

* chore: verb work, POS snapshot fmt

* fix: "repurpose"

Fixes #1874

* chore: add and fix noun properties
2025-09-08 12:20:49 +00:00
Andrew Dunbar
3d6a6a5b04
fix: don't make compounds with conjunctions (#1735) 2025-08-11 15:03:25 +00:00
Andrew Dunbar
0ddaa76d1c
chore: noun attrs, words from trending GitHub readmes (#1662)
Some checks are pending
Build Chrome Plugin / package (push) Waiting to run
Build Binaries / Release harper-cli - macOS-aarch64 (push) Waiting to run
Build Binaries / Release harper-cli - Linux-aarch64-GNU (push) Waiting to run
Build Binaries / Release harper-cli - Linux-aarch64-musl (push) Waiting to run
Build Binaries / Release harper-cli - Linux-x86_64-GNU (push) Waiting to run
Build Binaries / Release harper-cli - Linux-x86_64-musl (push) Waiting to run
Build Binaries / Release harper-cli - Windows-x86_64 (push) Waiting to run
Build Binaries / Release harper-ls - Linux-aarch64-musl (push) Waiting to run
Build Binaries / Release harper-ls - macOS-x86_64 (push) Waiting to run
Build Binaries / Release harper-ls - Linux-x86_64-GNU (push) Waiting to run
Build Binaries / Release harper-ls - Linux-x86_64-musl (push) Waiting to run
Build Web / build (push) Waiting to run
Package VS Code Plugin / Package - darwin-arm64 (push) Waiting to run
Package VS Code Plugin / Package - darwin-x64 (push) Waiting to run
Package VS Code Plugin / Package - linux-x64 (push) Waiting to run
Package VS Code Plugin / Package - win32-x64 (push) Waiting to run
Package WordPress Plugin / package (push) Waiting to run
Build Binaries / Release harper-cli - macOS-x86_64 (push) Waiting to run
Build Binaries / Release harper-ls - macOS-aarch64 (push) Waiting to run
Build Binaries / Release harper-ls - Linux-aarch64-GNU (push) Waiting to run
Build Binaries / Release harper-ls - Windows-x86_64 (push) Waiting to run
Package VS Code Plugin / Package - linux-arm64 (push) Waiting to run
Precommit / precommit (push) Waiting to run
* chore: noun attrs, words from trending GitHub readmes

* chore: snapshots

* chore: words from trending repos, noun countability

* chore: words from trending repos, noun countability

* chore: noun countability, new words from trending repos

* chore: words suggested in discord grammar spotting

https://discord.com/channels/1335035237213671495/1383092274002526262

* chore: word from trending repos, annotation fixes

* chore: words from trending repos, noun annotations

* chore: add most words from #1683

Fixes #1683

I mostly only added ones I found in Wiktionary. Most in the specialist section.

* chore: snapshots

* chore: add a few missing words

including `quaternion`

---------

Co-authored-by: Elijah Potter <me@elijahpotter.dev>
2025-08-06 16:26:55 +00:00
Elijah Potter
2d358c24d0
feat(core): create rule that fixes it's -> its (#1622) 2025-07-23 12:59:14 -06:00
Andrew Dunbar
f0f9d068b3
feat: new LintKinds, optional LintKind param for phrase_corrections (#1596)
* feat: new `LintKind`s, optional `LintKind` param for `phrase_corrections`

Added more preferable→preferable linter with `LintKind::Redundancy`

Adding them to existing phrase corrections

* fix: fix and add test for more preferable→preferable

* feat: `LintKind::Grammar`

Finish adding `LintKind` to most phrase and phrase set corrections

* chore: revised based on github review
2025-07-22 17:56:01 +00:00
Andrew Dunbar
7a9d1ac4da
chore: new words from trending GitHub readmes (#1584)
Some checks are pending
Build Chrome Plugin / package (push) Waiting to run
Build Binaries / Release harper-ls - Linux-aarch64-musl (push) Waiting to run
Build Binaries / Release harper-ls - macOS-x86_64 (push) Waiting to run
Build Binaries / Release harper-ls - Linux-x86_64-GNU (push) Waiting to run
Build Binaries / Release harper-ls - Linux-x86_64-musl (push) Waiting to run
Build Binaries / Release harper-ls - Windows-x86_64 (push) Waiting to run
Build Binaries / Release harper-cli - Windows-x86_64 (push) Waiting to run
Build Binaries / Release harper-ls - macOS-aarch64 (push) Waiting to run
Build Binaries / Release harper-ls - Linux-aarch64-GNU (push) Waiting to run
Build Binaries / Release harper-cli - macOS-aarch64 (push) Waiting to run
Build Binaries / Release harper-cli - Linux-aarch64-GNU (push) Waiting to run
Build Binaries / Release harper-cli - Linux-aarch64-musl (push) Waiting to run
Build Binaries / Release harper-cli - macOS-x86_64 (push) Waiting to run
Build Binaries / Release harper-cli - Linux-x86_64-GNU (push) Waiting to run
Build Binaries / Release harper-cli - Linux-x86_64-musl (push) Waiting to run
Build Web / build (push) Waiting to run
Package VS Code Plugin / Package - darwin-arm64 (push) Waiting to run
Package VS Code Plugin / Package - darwin-x64 (push) Waiting to run
Package VS Code Plugin / Package - linux-arm64 (push) Waiting to run
Package VS Code Plugin / Package - linux-x64 (push) Waiting to run
Package VS Code Plugin / Package - win32-x64 (push) Waiting to run
Package WordPress Plugin / package (push) Waiting to run
Precommit / precommit (push) Waiting to run
* chore: new words from trending GitHub readmes

* chore: update snapshots

* chore: dictionary and proper noun curation

* chore: curation, words from trending repos

* chore: words from trending GitHub repos
2025-07-21 19:44:14 +00:00
Andrew Dunbar
d388206b76
feat: mass nouns after countable determiners/quantifiers (#1498)
Some checks are pending
Build Chrome Plugin / package (push) Waiting to run
Build Binaries / Release harper-cli - macOS-aarch64 (push) Waiting to run
Build Binaries / Release harper-cli - Linux-aarch64-GNU (push) Waiting to run
Build Binaries / Release harper-cli - Linux-aarch64-musl (push) Waiting to run
Build Binaries / Release harper-cli - macOS-x86_64 (push) Waiting to run
Build Binaries / Release harper-cli - Linux-x86_64-GNU (push) Waiting to run
Build Binaries / Release harper-cli - Linux-x86_64-musl (push) Waiting to run
Build Binaries / Release harper-cli - Windows-x86_64 (push) Waiting to run
Build Binaries / Release harper-ls - macOS-aarch64 (push) Waiting to run
Build Binaries / Release harper-ls - Linux-aarch64-GNU (push) Waiting to run
Build Binaries / Release harper-ls - Linux-aarch64-musl (push) Waiting to run
Build Binaries / Release harper-ls - macOS-x86_64 (push) Waiting to run
Build Binaries / Release harper-ls - Linux-x86_64-GNU (push) Waiting to run
Build Binaries / Release harper-ls - Linux-x86_64-musl (push) Waiting to run
Build Binaries / Release harper-ls - Windows-x86_64 (push) Waiting to run
Build Web / build (push) Waiting to run
Package VS Code Plugin / Package - darwin-arm64 (push) Waiting to run
Package VS Code Plugin / Package - darwin-x64 (push) Waiting to run
Package VS Code Plugin / Package - linux-arm64 (push) Waiting to run
Package VS Code Plugin / Package - linux-x64 (push) Waiting to run
Package VS Code Plugin / Package - win32-x64 (push) Waiting to run
Package WordPress Plugin / package (push) Waiting to run
Precommit / precommit (push) Waiting to run
* feat: mass nouns after a/an etc.

Work-in-progress

Looks for mass nouns being treated as singular or plural nouns.

- group and sort `sequence_expr` `gen_then_from_is` etc.
- Added a new `agreement` `TokenKind` and added it to two other linters.
- Adding singular/plural & countable/mass flags to dictionary.

Does not yet handle adjectives between the determiner/quantifier and the noun.

Does not yet handle the case where the mass noun is part of a compound noun and therefor not an error.

Does not yet offer specific synonym such as "a tip" for "an advice".

* refactor: should appease precommit

Will also make planned enhancements easier.

* refactor: enum tuple variants

* refactor: specific countable synonyms

* chore: don't flag compound nouns

Default unit "piece" doesn't fit with some mass nouns like "traffic".

Fix some weird dictionary entries. Comment others.

* chore: can now suggest compound nouns

* chore: merge snapshot tests

* chore: update snapshot after merge

* fix: get rid of `assert_top5_suggestion_result`

---------

Co-authored-by: Elijah Potter <me@elijahpotter.dev>
2025-07-15 15:28:01 +00:00
Andrew Dunbar
86b03d67a4
feat: handle the recieved→received part of #1411 (#1418)
* feat: handle the recieved→received part of #1411

* fix: appease Precommit

* test: add more tests for dialect spelling

Many of the tests fail when the words are not all-lowercase

* fix: `just format`
2025-06-20 15:19:52 +00:00
Andrew Dunbar
2d2a5e4eaf
fix: ensure grey is suggested when gray is wrong (#1403)
* fix: ensure grey is suggested when gray is wrong

Fixes part of #1401

* test: add us vs non us tests n both directions

* fix: appease precommit

* fix: don't truncate suggestions when we find dialectal spello

* chore: update snapshots

* fix: integration file went missing

* fix: attempt to fix integration test

* fix: attempt the same on a second test
2025-06-18 14:16:27 +00:00
Michael Schmidt
af2f7277e4
feat: split affixes and properties and support propagating properties (#1251)
* feat: split affixes and properties and support propagating properties

* refactor: use serde's default

* refactor: add comment

* fix: Fixed tagging of derived words of program

* docs(core): update docs

---------

Co-authored-by: Elijah Potter <me@elijahpotter.dev>
2025-06-17 16:31:25 +00:00
Elijah Potter
db89187c3f
feat(brill): train and use Brill tagger (#1344)
Co-authored-by: hippietrail <hippietrail@users.noreply.github.com>
2025-06-16 15:33:49 -06:00
Andrew Dunbar
6648605c89
chore: refactor most common affix annotation flags (#1349)
Some checks are pending
Build Chrome Plugin / package (push) Waiting to run
Build Binaries / Release harper-ls - Linux-x86_64-GNU (push) Waiting to run
Build Binaries / Release harper-cli - Linux-aarch64-musl (push) Waiting to run
Build Binaries / Release harper-cli - macOS-x86_64 (push) Waiting to run
Build Binaries / Release harper-cli - Windows-x86_64 (push) Waiting to run
Build Binaries / Release harper-ls - Linux-aarch64-GNU (push) Waiting to run
Build Binaries / Release harper-ls - Linux-aarch64-musl (push) Waiting to run
Build Binaries / Release harper-ls - macOS-x86_64 (push) Waiting to run
Build Binaries / Release harper-ls - Linux-x86_64-musl (push) Waiting to run
Build Binaries / Release harper-ls - Windows-x86_64 (push) Waiting to run
Build Web / build (push) Waiting to run
Package VS Code Plugin / Package - darwin-arm64 (push) Waiting to run
Package VS Code Plugin / Package - darwin-x64 (push) Waiting to run
Build Binaries / Release harper-cli - macOS-aarch64 (push) Waiting to run
Build Binaries / Release harper-cli - Linux-aarch64-GNU (push) Waiting to run
Build Binaries / Release harper-cli - Linux-x86_64-GNU (push) Waiting to run
Build Binaries / Release harper-cli - Linux-x86_64-musl (push) Waiting to run
Build Binaries / Release harper-ls - macOS-aarch64 (push) Waiting to run
Package VS Code Plugin / Package - win32-x64 (push) Waiting to run
Package WordPress Plugin / package (push) Waiting to run
Precommit / precommit (push) Waiting to run
Package VS Code Plugin / Package - linux-arm64 (push) Waiting to run
Package VS Code Plugin / Package - linux-x64 (push) Waiting to run
* chore: refactor most common affix annotation flags

- to be more mnemonic
- to more closely match our POS-tagging, which is based on Penn Treebank POS tagging

* fix(core): problems that cropped up in merge

---------

Co-authored-by: Elijah Potter <me@elijahpotter.dev>
2025-06-10 15:19:15 +00:00
Steve Kurch
b963474658
dictionary: add some (mostly) phone-related terms (#1377)
* dictionary: add some (mostly) phone-related terms

Add `IMSI`, `GSM`, `CDMA`, `LTE`, `HDR`, `IPS`, `Exynos`.

* chore: update snapshots
2025-06-09 16:46:27 +00:00
Andrew Dunbar
305590b3f0
Dictionary curation 2025 05 30 (#1352)
* chore: new words, annotation fixes

* chore: new words, annotation fixes

move some wrongly in the Phrasal verb section to the Multi-word section

* fix: snapshots

* chore: new words, annotation fixes

* fix: snapshots
2025-06-03 14:28:33 +00:00
Jonathan Davies
48fe47fc12
dictionary: Add some chat terms/RSS/OSS (#1323)
* dictionary: Add some chat terms and RSS

* dictionary: Add terms for open source software

* dictionary: Add ClickHouse

* dictionary: Add some Linux filesystems

* linters: Update tests
2025-05-26 18:26:28 +00:00
Andrew Dunbar
190185add1
refactor: make the three compound noun linters consistent (#1294)
* fix: don't suggest compounds including conjunctions

* chore: `just format`

* test: this also fixed #723 so I'm adding a test for it too

* refactor: make 3 compound noun linters more consistent

* refactor: rename compound noun linters consistently

* refactor: make compound noun linters consistent

Similar but inconsistent logic moved to `mod.rs` and shared.

This revealed some weird POS quirks in dictionary annotations.

Fixed dictionary quirks that were just wrong or were archaic, obsolete, or dialectal.

Made special cases for quirks that are legit, in the shared logic.

Moved one pronoun test from compound noun to closed compounds.
Add some close compounds while I was there.
And sorted the mapping alphabetically.

Fixed several snapshot false positives.
Introduced new errors flagged in snapshots, but they're all due to changed in compound style standards over the years.

* fix: commit missed file

* fix: ascii lowercase→unicode lowercase

---------

Co-authored-by: Elijah Potter <me@elijahpotter.dev>
2025-05-23 14:45:04 +00:00
Andrew Dunbar
dceb419b7e
Dictionary curation 2025 05 21 (#1309)
* chore: new words, annotation fixes

All missing vocab suggested by @ubitux in #1307 has been added

* fix: snapshots

* chore: technical acronyms & abbreviations from #1305
2025-05-21 14:41:34 +00:00
Elijah Potter
b39bdacb09
feat(core): make sentence capitalization replace whole word (#1295) 2025-05-19 09:23:00 -06:00
Andrew Dunbar
36e4c7d2e3
chore: new words, annotation corrections, adj-of-a exceptions (#1270)
* chore: new words, annotation corrections, adj-of-a exceptions

* fix: forgot the snapshots

* chore: + LLM

* fix: address uncenter's concerns

Adds the other variants of "companywide" / "company-wide" and "roadmap" / "road map" with comments

* new words, an annotation fix
2025-05-15 20:05:01 +00:00
Michael Schmidt
1e2c6c332a
feat: improve spell check suggestions by accounting for common misspellings (#1245)
* feat: improve spell check suggestions by accounting for common misspellings

* refactor: use take

* tests: update VSC tests

* feat: detect misspelling or `ll` and `-er`

* test: update snapshot

* feat: extend sz misspellings to cs and ck
2025-05-08 21:36:15 +00:00
Steve Kurch
19ebb99157
fix(core): don't misplace ParagraphBreak tokens (#1239)
* fix(core): don't misplace `ParagraphBreak` tokens

Prevent markdown parser from sometimes erroneously placing
`ParagraphBreak` tokens at the beginning of a sentence/sequence.

* chore(core): automatic snapshot adjustments

* docs(core): explain cryptic fix in Markdown parser

Add a comment to explain unintuitive code in the Markdown parser.

---------

Co-authored-by: Elijah Potter <me@elijahpotter.dev>
2025-05-08 17:58:08 +00:00
Elijah Potter
4b046ac6c9
feat(web): render HTML descriptions on rules page (#1240) 2025-05-08 12:03:48 -06:00
Elijah Potter
1ed112e24f
fix(core): long sentence lint should start with word (#1236) 2025-05-08 09:24:17 -06:00
Michael Schmidt
663c729e46
test: add snapshots for linters (#1228)
* test: add snapshots for linters

* fix(core): update snapshots

---------

Co-authored-by: Elijah Potter <me@elijahpotter.dev>
2025-05-06 18:29:52 +00:00