Skip to content

Conversation

@hippietrail
Copy link
Collaborator

Issues

N/A

Description

A cleaner, more complete implementation of harper-cli normalize-dictionary as in #1892, which somehow got filled with merge commits.

  • Ensures any tilde (~) is the first flag.
  • Maintains relative order of POS flags.
  • Groups N (noun) and O (proper noun) flags together.
  • Groups property tags following the first POS to which they apply (or pair of POS in the case of N & O).
  • Property tags will maintain relative order, except for 0 (singular) and 9 (plural) which are sorted.
  • Property tags which have no POS tag present, and tags that are neither POS nor property tags, will be grouped together at the end and maintain relative order.
  • Duplicate POS and property tags are grouped together.

This is still a work in progress. Instead of having the flags hard-coded, it should retrieve them from annotations.json

Demo

image

How Has This Been Tested?

  • All dictionary entries still have the same number of flags. (None lost or duplicated.)
  • All tests still pass.

Checklist

  • I have performed a self-review of my own code
  • I have added tests to cover my changes

@hippietrail hippietrail marked this pull request as draft November 4, 2025 06:59
@hippietrail hippietrail changed the title chore: replace PR 1892 chore: harper-cli dictionary-normalize: replaces PR 1892 Nov 4, 2025
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.

1 participant