VinAIResearch / PhoBERT

PhoBERT: Pre-trained language models for Vietnamese (EMNLP-2020 Findings)
MIT License
651 stars 92 forks source link

error tokenize #2

Closed HoiBunCa closed 4 years ago

HoiBunCa commented 4 years ago

image sau khi kiểm tra code của file alignment_utils.py, em nhận ra bpe_tokens và other_tokens khác nhau đối với từ "gì vậy" dòng thứ nhất là bpe_tokens dòng thứ 2 là other_tokens dòng thứ 3 là ''.join(bpe_tokens) dòng thứ 4 là ''.join(other_tokens) từ "gì vậy" được tokenize thành 2 token "g" và " unk ", dẫn đến việc không thể lỗi "cannot align" image

các từ khác, ví dụ như "gì thế", hay "gì cơ" không xảy ra lỗi trên em mong được mọi người giúp đỡ giải quyết lỗi này

datquocnguyen commented 4 years ago

The solution is you should use a different tokenizer, e.g. rdrsegmenter.