Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: adds a brief helpful comment to each entry describing its function #593

Merged

Conversation

hippietrail
Copy link
Contributor

The name 'affixes' turns out to be a misnomer since about a quarter or a third of them don't add any prefix or suffix but change a property such as the part-of-speech, or singular vs plural.

Another approach would be to switch from json to either JSON5 or Hjson for the affixes.json file.

The name 'affixes' turns out to be a misnomer since about a quarter or a third of them don't add any prefix or suffix but change a property such as the part-of-speech, or singular vs plural.

Another approach would be to switch from `json` to either [`JSON5`](https://json5.org/) or [`Hjson`](https://hjson.github.io/)
@hippietrail
Copy link
Contributor Author

hippietrail commented Feb 5, 2025

Here's a bonus nodejs/bun oneliner to make a suffix cheat sheet!

node -e "Object.entries(require('./harper-core/affixes.json').affixes).forEach(([key, value]) => { if (value['#']) console.log(key + ': ' + value['#']); });"

Will output:

1: singular noun property
2: proper noun property
3: linking verb property
4: verb property
5: adjective property
6: swear word property
7: conjunction property
8: pronoun property
9: plural noun property
K: 'pro-' prefix
L: '-ment' suffix
E: 'dis-' prefix
Y: '-ly' suffix
U: 'un-' prefix
H: '-ieth' suffix
T: '-(i)est' suffix
R: '-(i)er' suffix
C: 'de-' prefix
V: '-ive' suffix
N: nominalization suffixes
A: 're-' prefix
Z: '-(i)(e)rs' suffix
P: '-(i)ness' suffix
M: -'s possessive suffix
F: 'con-' prefix
B: '-able' suffix
S: '-(i)(e)s' plural suffix
D: '-(e)d' suffix
G: '-ing' suffix
Q: 'ally' suffix
O: '-ful' suffix
I: 'in-' prefix
X: '-ions', '-ications', '-ens' suffixes
J: '-ings' suffix
~: common noun property
+: preposition property
-: article property

@elijah-potter
Copy link
Collaborator

Here's a bonus nodejs/bun oneliner to make a suffix cheat sheet!

Love it. Why not add that as a just command?

justfile Show resolved Hide resolved
Slight pain finding `{{justfile_directory()}}` needed for this transition. Took the opportunity to write the js in a clearer, hopefully self-documenting way
Copy link
Collaborator

@elijah-potter elijah-potter left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great! Thanks for helping build out this documentation

@elijah-potter elijah-potter merged commit 2e3559d into Automattic:master Feb 7, 2025
17 checks passed
@hippietrail
Copy link
Contributor Author

Looks great! Thanks for helping build out this documentation

A pleasure!

@hippietrail hippietrail deleted the affix-description-comments branch February 7, 2025 17:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants