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

Roberta Tokenizer #2

Open
dehghanm opened this issue Sep 3, 2022 · 0 comments
Open

Roberta Tokenizer #2

dehghanm opened this issue Sep 3, 2022 · 0 comments

Comments

@dehghanm
Copy link

dehghanm commented Sep 3, 2022

Hi

I want to use Roberta Tokenizer. In the following, there is an example that shows how we can do this.

from transformers import AutoTokenizer
model_name = "HooshvareLab/roberta-fa-zwnj-base"
tokenizer = AutoTokenizer.from_pretrained(model_name)
string = "این یک سند است"
tokenized_string = tokenizer.tokenize(string)
print(tokenized_string)

The result of the above code is as follows:
['اÛĮÙĨ', 'ĠÛĮÚ©', 'ĠسÙĨد', 'Ġاست']
However, it should be:
["این", "یک", "سند" , "است"]
What is your idea to solve this issue?

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