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

New WordPieceProcessor methods #35

Merged
merged 10 commits into from
May 19, 2023
Merged

New WordPieceProcessor methods #35

merged 10 commits into from
May 19, 2023

Conversation

shadeMe
Copy link
Collaborator

@shadeMe shadeMe commented May 16, 2023

Description

Adds the following methods to to WordPieceProcessor and updates docstrings:

  • decode
  • id_to_piece
  • is_valid_piece_id

Types of change

Feature.

Checklist

  • I confirm that I have the right to submit this contribution under the project's MIT license.
  • I ran the tests, and all new and existing tests passed.
  • My changes don't require a change to the documentation, or if they do, I've added all required information.

@shadeMe shadeMe added the enhancement New feature or request label May 16, 2023
@shadeMe shadeMe marked this pull request as draft May 17, 2023 09:48
@shadeMe shadeMe changed the title Add WordPieceProcessor.decode() Add decode and is_initial_piece to WordPieceProcessor May 17, 2023
@shadeMe shadeMe marked this pull request as ready for review May 17, 2023 10:38
@shadeMe shadeMe marked this pull request as draft May 17, 2023 10:49
Add `get_continuation`, `is_continuation_piece_id`, `piece_id_to_str`
Update docstrings
@shadeMe shadeMe changed the title Add decode and is_initial_piece to WordPieceProcessor New WordPieceProcessor methods May 17, 2023
@shadeMe shadeMe marked this pull request as ready for review May 17, 2023 11:41
cutlery/_wordpiece.pxd Outdated Show resolved Hide resolved
cutlery/_wordpiece.pyx Outdated Show resolved Hide resolved
cutlery/_wordpiece.pyx Outdated Show resolved Hide resolved
cutlery/_wordpiece.pyx Outdated Show resolved Hide resolved
cutlery/_wordpiece.pyx Show resolved Hide resolved
Remove superfluous methods
Rename `piece_id_to_str` to `lookup_piece_id`
cutlery/_wordpiece.pxd Outdated Show resolved Hide resolved
cutlery/_wordpiece.pyx Outdated Show resolved Hide resolved
@danieldk danieldk merged commit 347c342 into explosion:main May 19, 2023
6 checks passed
@shadeMe shadeMe deleted the feature/wordpiece-processor-decode branch May 19, 2023 14:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants