tensorflow / tensorflow/text

add more flexibility in fast_wordpiece_tokenizer_model_builder pretokeniztion

Open
#1,116 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C++
Stars
1.3k
Forks
379
Avg merge
3h 30m
Merged PRs (30d)
8

Description

there's only one pararmeter to control pretokeniztion on (white space, punctuation, chinese chars). and there is situation where you want to pretokenize in punctuation and white space only. I suggest adding two bool parameters one for punctuation and one for chinese.
furthermore, an approach for generalization is to add an array of pairs parameter, where it contains ranges of chars to pretokenize on it.

[Edit] I was working in a task for keras_nlp where this problem emerged. it's better to handle this problem here rather than in keras_nlp.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating fast_wordpiece_tokenizer_model_builder and reviewing how its current pretokenization parameter handles whitespace, punctuation, and Chinese characters. Clarify whether the intended scope is separate punctuation and Chinese switches or a generalized array of character ranges; done means the selected pretokenization boundaries are configurable and covered by tests.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
machine-learning
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.