Skip to content

Commit

Permalink
Target word token pattern annotator (#135)
Browse files Browse the repository at this point in the history
* functioning token pattern annotator with target word

* small change in docstring

* expanded list

* ignore vscode stuff

* last merge conflict

* small expansion pat env list

* removed failing test that goes on other branch

* not using | for backward compatibility

* small expansion patient environment
  • Loading branch information
LydiaMennesHealth committed Feb 14, 2024
1 parent 07dd563 commit c4ab115
Show file tree
Hide file tree
Showing 11 changed files with 442 additions and 95 deletions.
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -124,4 +124,7 @@ ENV/
# mypy
.mypy_cache/

.idea
.idea

#vscode
.vscode/
63 changes: 63 additions & 0 deletions base_config.json
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,69 @@
"tag": "_"
}
},
"patient_environment1": {
"annotator_type": "deduce.annotator.TargetWordTokenPatternAnnotator",
"group": "names",
"args": {
"tag": "naam",
"skip": ["(", ")", "zijn", "haar"],
"target_words_lookup": "patient_environment",
"annotate_pattern_indices": [1],
"pattern": [
{
"lookup": "patient_environment"
},
{
"or": [
{
"like_name": true
},
{
"title_case_lookup": "first_name"
},
{
"title_case_lookup": "interfix_surname"
},
{
"title_case_lookup": "surname"
}
]
}

]
}
},
"patient_environment2": {
"annotator_type": "deduce.annotator.TargetWordTokenPatternAnnotator",
"group": "names",
"args": {
"tag": "naam",
"skip": ["(", ")", "zijn", "haar", "hun"],
"target_words_lookup": "patient_environment",
"annotate_pattern_indices": [0],
"pattern": [
{
"or": [
{
"like_name": true
},
{
"title_case_lookup": "first_name"
},
{
"title_case_lookup": "interfix_surname"
},
{
"title_case_lookup": "surname"
}
]
},
{
"lookup": "patient_environment"
}
]
}
},
"name_context": {
"annotator_type": "deduce.annotator.ContextAnnotator",
"group": "names",
Expand Down

0 comments on commit c4ab115

Please sign in to comment.