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

Target word token pattern annotator #135

Conversation

LydiaMennesHealth
Copy link
Collaborator

@LydiaMennesHealth LydiaMennesHealth commented Feb 14, 2024

Added a annotator called TargetWordTokenPatternAnnotator that inherits from TokenPatternAnnotator and has 2 key differences:

  • Not the entire sequence is annotated, which tokens should be is configured
  • Target words have to be specified and their presence is the target to match the sequence against, but other than TokenPatternAnnotator this does not have to be the 1st token.

I used this annotator to implement patterns wrt names of people from the social circles of the patient/client. The target words are inidicators like partner/son/daughter etc. While the names can follow the like_name pattern or be a lowercased known first/surname. This means it can catch cases that are not caught by the uppercased known names targeted by first_name_lookup or surname_lookup.

…d small wrapper class for full month tagging where pre match words are added to regex pattern for readability
@LydiaMennesHealth LydiaMennesHealth merged commit c4ab115 into feature_branch/recall_boost Feb 14, 2024
0 of 3 checks passed
@LydiaMennesHealth LydiaMennesHealth deleted the target_word_token_pattern_annotator branch March 27, 2024 09:06
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.

None yet

1 participant