refactor: nominal and determiner word types#731
Merged
Conversation
19357c2 to
830a239
Compare
feat: pronoun now its own token kind & word metadata
s = subject case for pronouns o = object case for pronouns f = 1st person for pronouns n = 2nd person for pronouns t = 3rd person for pronouns c = comparative degree for adjectives u = superlative degree for adjectives
Collaborator
Author
|
Completes the split between nominals that group nouns and pronouns together vs places only nouns or only pronouns work. Also renames article to determiner and groups the other words that work a lot like the articles, such as this, that, these, and those. Adds some properties to other word types such as comparative and superlative to adjective, subject and object case to pronoun, etc. Most need more logic to be coded and some refactoring since the same affix changes different properties on different word types. Adds notes in comments about word types and properties for future implementation. |
Collaborator
|
This is great work! I've gone ahead and made some minor fixes. I'm tempted to get this merged tomorrow, as long as you approve of my changes. |
hippietrail
commented
Mar 5, 2025
hippietrail
commented
Mar 5, 2025
hippietrail
commented
Mar 5, 2025
Co-authored-by: hippietrail <hippietrail@users.noreply.github.com>
2724cb3 to
1b6c103
Compare
tmeijn
pushed a commit
to tmeijn/dotfiles
that referenced
this pull request
Mar 6, 2025
This MR contains the following updates: | Package | Update | Change | |---|---|---| | [Automattic/harper/harper-ls](https://github.com/Automattic/harper) | minor | `v0.23.0` -> `v0.24.0` | MR created with the help of [el-capitano/tools/renovate-bot](https://gitlab.com/el-capitano/tools/renovate-bot). **Proposed changes to behavior should be submitted there as MRs.** --- ### Release Notes <details> <summary>Automattic/harper (Automattic/harper/harper-ls)</summary> ### [`v0.24.0`](https://github.com/Automattic/harper/releases/tag/v0.24.0) [Compare Source](Automattic/harper@v0.23.0...v0.24.0) #### What's Changed - feat(core): add five technical words to the curated dictionary by [@​86xsk](https://github.com/86xsk) in Automattic/harper#767 - Rid off phrase corrections by [@​hippietrail](https://github.com/hippietrail) in Automattic/harper#717 - chore: new words and fixes to existing entries by [@​hippietrail](https://github.com/hippietrail) in Automattic/harper#783 - fix(core): don't ignore blocking word-likes by [@​elijah-potter](https://github.com/elijah-potter) in Automattic/harper#788 - fix(core): remove bad `Forthwith` rule by [@​elijah-potter](https://github.com/elijah-potter) in Automattic/harper#787 - fix(core): address edge-case from [#​744](Automattic/harper#744) by [@​elijah-potter](https://github.com/elijah-potter) in Automattic/harper#786 - feat: implement false positive "the great might of" by [@​hippietrail](https://github.com/hippietrail) in Automattic/harper#795 - chore: add words and improve affix annotations by [@​hippietrail](https://github.com/hippietrail) in Automattic/harper#793 - test: check that dictionary attributes can be spread over two entries by [@​hippietrail](https://github.com/hippietrail) in Automattic/harper#779 - test(core): issue [#​798](Automattic/harper#798) by [@​elijah-potter](https://github.com/elijah-potter) in Automattic/harper#799 - chore: add words, fix annotations by [@​hippietrail](https://github.com/hippietrail) in Automattic/harper#805 - feat(web): create page for debugging the title-case algo by [@​elijah-potter](https://github.com/elijah-potter) in Automattic/harper#801 - chore: curate dictionary by [@​hippietrail](https://github.com/hippietrail) in Automattic/harper#803 - build(deps-dev): bump [@​types/jasmine](https://github.com/types/jasmine) from 5.1.6 to 5.1.7 in /packages by [@​dependabot](https://github.com/dependabot) in Automattic/harper#810 - build(deps-dev): bump rollup from 4.34.6 to 4.34.9 in /packages by [@​dependabot](https://github.com/dependabot) in Automattic/harper#808 - build(deps): bump clap from 4.5.29 to 4.5.31 by [@​dependabot](https://github.com/dependabot) in Automattic/harper#814 - build(deps-dev): bump prettier from 3.5.2 to 3.5.3 in /packages by [@​dependabot](https://github.com/dependabot) in Automattic/harper#811 - build(deps): bump serde_json from 1.0.138 to 1.0.139 by [@​dependabot](https://github.com/dependabot) in Automattic/harper#813 - feat(core): add a ton of rules from the backlog by [@​elijah-potter](https://github.com/elijah-potter) in Automattic/harper#797 - WordPress plugin by [@​elijah-potter](https://github.com/elijah-potter) in Automattic/harper#817 - Dictionary curation 2025 03 04 by [@​hippietrail](https://github.com/hippietrail) in Automattic/harper#819 - build(deps-dev): bump [@​types/node](https://github.com/types/node) from 22.13.4 to 22.13.9 in /packages by [@​dependabot](https://github.com/dependabot) in Automattic/harper#818 - test(core): added test with capital letters by [@​elijah-potter](https://github.com/elijah-potter) in Automattic/harper#738 - build(deps): bump pulldown-cmark from 0.12.2 to 0.13.0 by [@​dependabot](https://github.com/dependabot) in Automattic/harper#693 - refactor(core): proper noun linters use canonical casing and JSON file by [@​elijah-potter](https://github.com/elijah-potter) in Automattic/harper#834 - Dictionary curation 2025 03 05 by [@​hippietrail](https://github.com/hippietrail) in Automattic/harper#833 - feat: lex 0s 1s 0's 1's etc as words by [@​hippietrail](https://github.com/hippietrail) in Automattic/harper#775 - refactor: nominal and determiner word types by [@​hippietrail](https://github.com/hippietrail) in Automattic/harper#731 #### New Contributors - [@​86xsk](https://github.com/86xsk) made their first contribution in Automattic/harper#767 **Full Changelog**: Automattic/harper@v0.23.0...v0.24.0 </details> --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever MR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this MR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this MR, check this box --- This MR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzOS4xODYuMCIsInVwZGF0ZWRJblZlciI6IjM5LjE4Ni4wIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJSZW5vdmF0ZSBCb3QiXX0=-->
tmeijn
pushed a commit
to tmeijn/dotfiles
that referenced
this pull request
Mar 6, 2025
This MR contains the following updates: | Package | Update | Change | |---|---|---| | [Automattic/harper/harper-ls](https://github.com/Automattic/harper) | minor | `v0.23.0` -> `v0.24.0` | MR created with the help of [el-capitano/tools/renovate-bot](https://gitlab.com/el-capitano/tools/renovate-bot). **Proposed changes to behavior should be submitted there as MRs.** --- ### Release Notes <details> <summary>Automattic/harper (Automattic/harper/harper-ls)</summary> ### [`v0.24.0`](https://github.com/Automattic/harper/releases/tag/v0.24.0) [Compare Source](Automattic/harper@v0.23.0...v0.24.0) #### What's Changed - feat(core): add five technical words to the curated dictionary by [@​86xsk](https://github.com/86xsk) in Automattic/harper#767 - Rid off phrase corrections by [@​hippietrail](https://github.com/hippietrail) in Automattic/harper#717 - chore: new words and fixes to existing entries by [@​hippietrail](https://github.com/hippietrail) in Automattic/harper#783 - fix(core): don't ignore blocking word-likes by [@​elijah-potter](https://github.com/elijah-potter) in Automattic/harper#788 - fix(core): remove bad `Forthwith` rule by [@​elijah-potter](https://github.com/elijah-potter) in Automattic/harper#787 - fix(core): address edge-case from [#​744](Automattic/harper#744) by [@​elijah-potter](https://github.com/elijah-potter) in Automattic/harper#786 - feat: implement false positive "the great might of" by [@​hippietrail](https://github.com/hippietrail) in Automattic/harper#795 - chore: add words and improve affix annotations by [@​hippietrail](https://github.com/hippietrail) in Automattic/harper#793 - test: check that dictionary attributes can be spread over two entries by [@​hippietrail](https://github.com/hippietrail) in Automattic/harper#779 - test(core): issue [#​798](Automattic/harper#798) by [@​elijah-potter](https://github.com/elijah-potter) in Automattic/harper#799 - chore: add words, fix annotations by [@​hippietrail](https://github.com/hippietrail) in Automattic/harper#805 - feat(web): create page for debugging the title-case algo by [@​elijah-potter](https://github.com/elijah-potter) in Automattic/harper#801 - chore: curate dictionary by [@​hippietrail](https://github.com/hippietrail) in Automattic/harper#803 - build(deps-dev): bump [@​types/jasmine](https://github.com/types/jasmine) from 5.1.6 to 5.1.7 in /packages by [@​dependabot](https://github.com/dependabot) in Automattic/harper#810 - build(deps-dev): bump rollup from 4.34.6 to 4.34.9 in /packages by [@​dependabot](https://github.com/dependabot) in Automattic/harper#808 - build(deps): bump clap from 4.5.29 to 4.5.31 by [@​dependabot](https://github.com/dependabot) in Automattic/harper#814 - build(deps-dev): bump prettier from 3.5.2 to 3.5.3 in /packages by [@​dependabot](https://github.com/dependabot) in Automattic/harper#811 - build(deps): bump serde_json from 1.0.138 to 1.0.139 by [@​dependabot](https://github.com/dependabot) in Automattic/harper#813 - feat(core): add a ton of rules from the backlog by [@​elijah-potter](https://github.com/elijah-potter) in Automattic/harper#797 - WordPress plugin by [@​elijah-potter](https://github.com/elijah-potter) in Automattic/harper#817 - Dictionary curation 2025 03 04 by [@​hippietrail](https://github.com/hippietrail) in Automattic/harper#819 - build(deps-dev): bump [@​types/node](https://github.com/types/node) from 22.13.4 to 22.13.9 in /packages by [@​dependabot](https://github.com/dependabot) in Automattic/harper#818 - test(core): added test with capital letters by [@​elijah-potter](https://github.com/elijah-potter) in Automattic/harper#738 - build(deps): bump pulldown-cmark from 0.12.2 to 0.13.0 by [@​dependabot](https://github.com/dependabot) in Automattic/harper#693 - refactor(core): proper noun linters use canonical casing and JSON file by [@​elijah-potter](https://github.com/elijah-potter) in Automattic/harper#834 - Dictionary curation 2025 03 05 by [@​hippietrail](https://github.com/hippietrail) in Automattic/harper#833 - feat: lex 0s 1s 0's 1's etc as words by [@​hippietrail](https://github.com/hippietrail) in Automattic/harper#775 - refactor: nominal and determiner word types by [@​hippietrail](https://github.com/hippietrail) in Automattic/harper#731 #### New Contributors - [@​86xsk](https://github.com/86xsk) made their first contribution in Automattic/harper#767 **Full Changelog**: Automattic/harper@v0.23.0...v0.24.0 </details> --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever MR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this MR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this MR, check this box --- This MR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzOS4xODYuMCIsInVwZGF0ZWRJblZlciI6IjM5LjE4Ni4wIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJSZW5vdmF0ZSBCb3QiXX0=-->
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
As per #730 this is the first step, moving the current "noun" types, which actually combine nouns and pronouns, into "nominal" types, that being the umbrella term in grammar/linguistics that encompasses both nouns and pronouns.
Because of the use of templates to derive type and function names from other type names, I had to rename a lot more identifiers than expected.
The next step will be to move pronouns out into their own type, with a "person" (1st/2nd/3rd) property but without a "proper" property.
Then noun can also be moved out, keeping things that apply to both, such as "nominal phrase" inside but things that don't such as "compound noun" outside the "nominal" type and inside the "noun" type.
This will make it easier to differentiate linters that work only on pronouns or only one nouns from those that work on both.