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

Fix an issue where input tokens to the WangchanBERTa NER pipeline may be in the incorrect form #32

Open
lalital opened this issue Mar 11, 2021 · 0 comments

Comments

@lalital
Copy link
Contributor

lalital commented Mar 11, 2021

According to the model finetuning pipeline, the input tokens are tokenized with other tokenizer (e.g. PyThaiNLp's newmm for thainer dataset) and then retokenizer with SentencePiece tokenizer. However, the input tokens fed to the finetuned model is the tokens tokenized with SentencePiece only (not newmm first, and then followed by SentencePiece)

Proposed solution:

  1. Pretokenize with PyThaiNLP's newmm tokenizer
  2. Retokenize with the subword tokenizer (SentencePiece)
  3. Map the prediction results of the subword tokens to the tokens tokenized with newmm
  4. Return the prediction results in word-level and chunk-level

Branch name: feature/ner_pipeline

NER Pipeline Demo (via Colab): https://colab.research.google.com/drive/1-54NeM_wsjitaiSXfMBpcnqzbPMR0a9R#scrollTo=VzSGZbwWaiOI

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant