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

maxlen in data iterators #30

Open
Avmb opened this issue Mar 10, 2017 · 3 comments
Open

maxlen in data iterators #30

Avmb opened this issue Mar 10, 2017 · 3 comments

Comments

@Avmb
Copy link
Collaborator

Avmb commented Mar 10, 2017

In domain_iterator.py and domain_interpolation_data_iterator.py there is this fragment of code:

            if len(ss) > self.maxlen and len(tt) > self.maxlen:
                continue

which skips a sentence pair if both the source sentence and the target sentence exceed the maximum allowed length. Is this behavior correct? Shouldn't we skip the pair if any of the sentences exceeds the maximum length?

@rsennrich
Copy link
Collaborator

Hi Antonio,

yes, this should be changed to 'or'. The reason why the current code doesn't crash is that there's another length check in prepare_data().

@rsennrich
Copy link
Collaborator

This was fixed in data_iterator.py in commit 52ea880, but still remains TODO for domain_interpolation_data_iterator.py

@Sofiabella
Copy link

52ea880

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

3 participants