Skip to content

Conversation

@elijah-potter
Copy link
Collaborator

Issues

Seeks to resolve #2301

Description

Harper has had two definitions of a nominal phrase for some time now. I'd like to clarify why.

The first mention of nominal phrases in Harper was with the NominalPhrase Pattern. It used a naive heuristic approach inspired by the kinds of syntax trees you find in formal programming languages. It was never effective enough, but it remains in the codebase becuase some rules rely on it.

The second was from my work on nominal phrase chunkers. These go through the document with a neural network and set words' np_member field to true if they are a member of a nominal phrase. This is far more accurate and thus is the recommended way to detect nominal phrases in rules moving forward.

When reviewing this PR, keep in mind that the doc-comments in the code are what will persist. Are they complete? Are there any questions that need answering?

How Has This Been Tested?

N/A

Checklist

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

@elijah-potter elijah-potter changed the title doc(core): clarify differance between chunker NPs and pattern NPs doc(core): clarify difference between chunker NPs and pattern NPs Dec 8, 2025
@elijah-potter elijah-potter added this pull request to the merge queue Dec 10, 2025
Merged via the queue into master with commit dedfa31 Dec 10, 2025
11 checks passed
@elijah-potter elijah-potter deleted the clarify-np branch December 10, 2025 22:11
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.

Nominal phrase confusion

2 participants