edsnlp.utils.batching
batchify_by_words
Yields batch that contain at most batch_size words. If an item contains more than batch_size words, it will be yielded as a single batch.
Parameters
| PARAMETER | DESCRIPTION |
|---|---|
iterable | TYPE: |
batch_size | TYPE: |
drop_last | TYPE: |