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

Changed default aggregation_strategy to max #1342

Merged
merged 3 commits into from
Mar 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions presidio-analyzer/conf/transformers.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@ models:
ner_model_configuration:
labels_to_ignore:
- O
aggregation_strategy: simple # "simple", "first", "average", "max"
stride: 16 # If stride >= 0, process long texts in
# overlapping windows of the model max
# length. The value is the length of the
# window overlap in transformer tokenizer
# tokens, NOT the length of the stride.
aggregation_strategy: max # "simple", "first", "average", "max"
stride: 16 # If stride >= 0, process long texts in
# overlapping windows of the model max
# length. The value is the length of the
# window overlap in transformer tokenizer
# tokens, NOT the length of the stride.
alignment_mode: expand # "strict", "contract", "expand"
model_to_presidio_entity_mapping:
PER: PERSON
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ class NerModelConfiguration:
""" # noqa E501

labels_to_ignore: Optional[Collection[str]] = None
aggregation_strategy: Optional[str] = "simple"
aggregation_strategy: Optional[str] = "max"
stride: Optional[int] = 14
alignment_mode: Optional[str] = "expand"
default_score: Optional[float] = 0.85
Expand Down
Loading