Skip to content

Commit

Permalink
Updated changelog, fixed Clippy warning
Browse files Browse the repository at this point in the history
  • Loading branch information
guillaume-be committed Nov 21, 2021
1 parent 1e68750 commit 067bac0
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 18 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ All notable changes to this project will be documented in this file. The format
- Support for half-precision mode for all models (reducing memory footprint). A model can be converted to half-precision by calling the `half()` method on the `VarStore` is it currently stored in. Half-precision Torch kernels are not available for CPU (limited to CUDA devices)
- (BREAKING) Extension of the generation options that can be provided at runtime (after a model has been instantiated with a `GenerateConfig`), allowing to update the generation options from one text generation to another with the same model. This feature is implemented at the `LanguageGenerator` trait level, the high-level `TextGeneration` pipeline API remains unchanged.
- Addition of the FNet language model and support for sequence, token and multiple choice classification, question answering
- Addition of a full entities' prediction method supporting the IOBES scheme (merging entities token such as <New> + <York> -> <New York>)

## [0.16.0] - 2021-08-24
## Added
Expand Down
36 changes: 18 additions & 18 deletions src/pipelines/ner.rs
Original file line number Diff line number Diff line change
Expand Up @@ -300,15 +300,15 @@ impl NERModel {

if (previous_tag == Tag::End)
| (previous_tag == Tag::Single)
| match (previous_tag, current_tag) {
(Tag::Begin, Tag::Begin) => true,
(Tag::Begin, Tag::Outside) => true,
(Tag::Begin, Tag::Single) => true,
(Tag::Inside, Tag::Begin) => true,
(Tag::Inside, Tag::Outside) => true,
(Tag::Inside, Tag::Single) => true,
_ => false,
}
| matches!(
(previous_tag, current_tag),
(Tag::Begin, Tag::Begin)
| (Tag::Begin, Tag::Outside)
| (Tag::Begin, Tag::Single)
| (Tag::Inside, Tag::Begin)
| (Tag::Inside, Tag::Outside)
| (Tag::Inside, Tag::Single)
)
| ((previous_label != current_label) & (previous_tag != Tag::Outside))
{
let entity_tokens = &tokens[begin_offset..position];
Expand All @@ -325,15 +325,15 @@ impl NERModel {

if (current_tag == Tag::Begin)
| (current_tag == Tag::Single)
| match (previous_tag, current_tag) {
(Tag::End, Tag::End) => true,
(Tag::Single, Tag::End) => true,
(Tag::Outside, Tag::End) => true,
(Tag::End, Tag::Inside) => true,
(Tag::Single, Tag::Inside) => true,
(Tag::Outside, Tag::Inside) => true,
_ => false,
}
| matches!(
(previous_tag, current_tag),
(Tag::End, Tag::End)
| (Tag::Single, Tag::End)
| (Tag::Outside, Tag::End)
| (Tag::End, Tag::Inside)
| (Tag::Single, Tag::Inside)
| (Tag::Outside, Tag::Inside)
)
| ((previous_label != current_label) & (previous_tag != Tag::Outside))
{
begin_offset = position;
Expand Down

0 comments on commit 067bac0

Please sign in to comment.