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

Confusing docs for build_vocab_from_iterator #2216

Open
rmalouf opened this issue Nov 25, 2023 · 0 comments
Open

Confusing docs for build_vocab_from_iterator #2216

rmalouf opened this issue Nov 25, 2023 · 0 comments

Comments

@rmalouf
Copy link

rmalouf commented Nov 25, 2023

📚 Documentation

Description

In the docs for build_vocab_from_iterator:

https://pytorch.org/text/stable/vocab.html#build-vocab-from-iterator

the first arg is specified as an Iterable and the description says "Must yield list or iterator of tokens." It actually wants a list/iterator of lists/iterators of tokens. I guess it's expecting text divided into sentences or something. You can figure out what it's doing easily enough from either the example or the source, but it's unnecessarily confusing.

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