-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
update transformer token classification taskmodule with version from A…
- Loading branch information
1 parent
5ebd97a
commit 4424abe
Showing
5 changed files
with
813 additions
and
1,105 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,18 @@ | ||
_target_: src.taskmodules.MyTransformerTokenClassificationTaskModule | ||
_target_: src.taskmodules.MyTokenClassificationTaskModule | ||
|
||
tokenizer_name_or_path: bert-base-uncased | ||
## Long sequence handling | ||
## example: split the input into windows of 512 tokens that have 64 tokens overlap | ||
# tokenizer_kwargs: | ||
# max_length: 512 | ||
# truncation: True | ||
# return_overflowing_tokens: True | ||
# stride: 64 | ||
## Alternative to fixed size windowing: use span annotations to partition the input. | ||
## Note, that this requires to add these annotations to the documents beforehand! | ||
## Both methods, fixed size windowing and span annotation partitioning, can be used together. | ||
## example: partition the input with span annotations from the "paragraphs" annotation layer | ||
# partition_annotation: paragraphs | ||
|
||
entity_annotation: entities | ||
# Long sequence handling | ||
#max_window: 512 | ||
#window_overlap: 64 | ||
# Alternative to fixed size windowing: use span annotations to partition the input | ||
# (this requires to add these annotations to the documents beforehand!) | ||
#partition_annotation: paragraphs | ||
|
||
# Further parameters (also see the source code of TransformerTokenClassificationTaskModule) | ||
#include_ill_formed_predictions: false | ||
## Further parameters (also see the source code of TransformerTokenClassificationTaskModule) | ||
# include_ill_formed_predictions: false |
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
from .transformer_token_classification import MyTransformerTokenClassificationTaskModule | ||
from .transformer_token_classification import MyTokenClassificationTaskModule |
Oops, something went wrong.