Skip to content

Conversation

@napsternxg
Copy link
Contributor

@napsternxg napsternxg commented Sep 15, 2020

Description

Brief Description of the PR:

We can have a common function for creating filtered_inputs used in crf_multitag_sequence_score
This function can be reused to modify the input to crf_decode to support constrained decoding.

Fixes #607

Type of change

Checklist:

  • I've properly formatted my code according to the guidelines
    • By running Black + Flake8
    • By running pre-commit hooks
  • This PR addresses an already submitted issue for TensorFlow Addons
  • I have made corresponding changes to the documentation
  • I have added tests that prove my fix is effective or that my feature works
  • This PR contains modifications to C++ custom-ops

How Has This Been Tested?

If you're adding a bugfix or new feature please describe the tests that you ran to verify your changes:

  • I ran pytest locally to test this PR. All tests passed.

- Fixes tensorflow#607

We can have a common function for creating filtered_inputs used in
crf_multitag_sequence_score
This function can be reused to modify the input to crf_decode to
support constrained decoding.
@napsternxg
Copy link
Contributor Author

@facaiy @Squadrick @seanpmorgan can you have a look at it?

Copy link
Member

@WindQAQ WindQAQ left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! One minor documentation issue.

@WindQAQ
Copy link
Member

WindQAQ commented Sep 17, 2020

@napsternxg Can you run the formatting tools again? I'd like to merge this after the tests pass. Thank you!

@napsternxg
Copy link
Contributor Author

@WindQAQ Fixed it.

@napsternxg napsternxg requested review from WindQAQ and removed request for Squadrick September 17, 2020 18:03
@WindQAQ WindQAQ self-assigned this Sep 17, 2020
Copy link
Member

@WindQAQ WindQAQ left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

@WindQAQ WindQAQ merged commit e2006c3 into tensorflow:master Sep 17, 2020
@napsternxg
Copy link
Contributor Author

@Squadrick was removed by mistake when I clicked on request review.

@napsternxg napsternxg deleted the napsternxg/constrained_decoding branch September 17, 2020 18:04
jrruijli pushed a commit to jrruijli/addons that referenced this pull request Dec 23, 2020
* Added filtered_input and constrained_decoding

- Fixes tensorflow#607

We can have a common function for creating filtered_inputs used in
crf_multitag_sequence_score
This function can be reused to modify the input to crf_decode to
support constrained decoding.

* Fixed formatting and imports

* Fixed documentation

* Fixed formatting
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add constrained decoding to CRF

3 participants