Skip to content

feat: add new "adverbial particle" POS#3748

Open
hippietrail wants to merge 2 commits into
Automattic:masterfrom
hippietrail:better-phrasal-verb-support
Open

feat: add new "adverbial particle" POS#3748
hippietrail wants to merge 2 commits into
Automattic:masterfrom
hippietrail:better-phrasal-verb-support

Conversation

@hippietrail

Copy link
Copy Markdown
Collaborator

Issues

N/A

Description

This PR adds a new part-of-speech for "adverbial particles".
These are the words that accompany the verb in a phrasal verb.
Most of them are also prepositions, but not all prepositions can act as adverbial particles and some adverbial particles are not also prepositions. Likewise, many can act as standalone adverbs, but not all of them.

The Penn Treebank has a category for these words, calling them just "particles" and using the symbol RP to denote them, which clearly creates a distinct grouping from the RB adverb and IN preposition.

These words are marked with the pilcrow ¶ in the dictionary. The initial set, which I gleaned from discussing the topic with Google's AI will be:

in, out, up, down, on, off, away, back, around, over, through, by, along, aside, together, apart

It's expected that linters that deal with phrasal verbs will be able to be adapted to use this new POS.

I think it will also be helpful in heuristics for working out the POS of words in linters from the context. For instance I was exploring a possible linter for "in along the lines of", which is not rare but occurs more often as a potential false positive than as a mistake, and one way to decide if it's a legit use is when the "in" is the adverbial particle belonging to a phrasal verb such as "weigh in", "chime in", "sign in", etc.

How Has This Been Tested?

cargo test

AI Disclosure

  • I am a human and didn't use any AI.
  • I used LLM features of my editor, but not an agent.
  • I used an AI agent interactively.
  • I am an agent or I got an agent to do the work autonomously.

I didn't use AI for the code changes but did to make sure I had the right idea, to get the terminology, and to decide the set of such words to mark.

Checklist

  • I have performed a self-review of my own code
  • I have added tests to cover my changes
  • I have considered splitting this into smaller pull requests.

@hippietrail hippietrail added enhancement New feature or request rust Pull requests that update Rust code harper-core dictionary Modification to or question about the curated dictionary labels Jul 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dictionary Modification to or question about the curated dictionary enhancement New feature or request harper-core rust Pull requests that update Rust code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant