Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
chenpangpang
transformers
Commits
06b05d45
Unverified
Commit
06b05d45
authored
Apr 11, 2023
by
Luc CAILLIAU
Committed by
GitHub
Apr 11, 2023
Browse files
Clarify stride option (#22684)
* Clarify stride option * formatting
parent
0224aaf6
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
1 deletion
+2
-1
src/transformers/pipelines/token_classification.py
src/transformers/pipelines/token_classification.py
+2
-1
No files found.
src/transformers/pipelines/token_classification.py
View file @
06b05d45
...
@@ -68,7 +68,8 @@ class AggregationStrategy(ExplicitEnum):
...
@@ -68,7 +68,8 @@ class AggregationStrategy(ExplicitEnum):
same entity together in the predictions or not.
same entity together in the predictions or not.
stride (`int`, *optional*):
stride (`int`, *optional*):
If stride is provided, the pipeline is applied on all the text. The text is split into chunks of size
If stride is provided, the pipeline is applied on all the text. The text is split into chunks of size
model_max_length. Works only with fast tokenizers and `aggregation_strategy` different from `NONE`.
model_max_length. Works only with fast tokenizers and `aggregation_strategy` different from `NONE`. The
value of this argument defines the number of overlapping tokens between chunks.
aggregation_strategy (`str`, *optional*, defaults to `"none"`):
aggregation_strategy (`str`, *optional*, defaults to `"none"`):
The strategy to fuse (or not) tokens based on the model prediction.
The strategy to fuse (or not) tokens based on the model prediction.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment