feat: add new "adverbial particle" POS#3748
Open
hippietrail wants to merge 2 commits into
Open
Conversation
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.
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
RPto denote them, which clearly creates a distinct grouping from theRBadverb andINpreposition.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:
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 testAI Disclosure
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