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

Inputs shoult be tokenized only for training/evaluation sets? #54

Open
stelmath opened this issue Mar 10, 2023 · 1 comment
Open

Inputs shoult be tokenized only for training/evaluation sets? #54

stelmath opened this issue Mar 10, 2023 · 1 comment

Comments

@stelmath
Copy link

Hello,

Your README states:

Inputs should be tokenized and each line is a source language sentence and its target language translation, separated by (|||). You can see some examples in the examples folder.

Is this the case only for the training set and the optional evaluation set? During inference/prediction, do we also need to pass the source/target pair, pretokenized? Your demo uses the example:

src = 'awesome-align is awesome !'
tgt = '牛对齐 是 牛 !'

where the ! is pretokenized, as there is a space between it and the previous word ("awesome" in this case). Also, does this requirement stem from the original mBERT or is this your implementation requirement? Thank you!

@zdou0830
Copy link
Collaborator

You need to provide tokenized sentences to the model because otherwise the model will treat "awesome!" and "牛!" as single words and you will get "awesome!-牛!" as an aligned word pair. This follows the previous fast-align work (https://github.com/clab/fast_align).

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

2 participants