Stanza-batch

Latest version: v0.2.2

Safety actively analyzes 638466 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 2 of 2

0.1.0

Stable version for [Stanza v1.1.1](https://github.com/stanfordnlp/stanza/releases/tag/v1.1.1)

This is the first release of a batching utility for [Stanza](https://github.com/stanfordnlp/stanza/releases/tag/v1.1.1) specifically it works for v1.1.1 of Stanza. It makes processing documents/texts with Stanza quicker and easier due to the batching wrapper that this code contains.

The current recommendation for batching by [Stanza is to concatenate documents together with each document separated by a blank line (`\n\n`)](https://github.com/stanfordnlp/stanza#batching-to-maximize-pipeline-speed). This way of batching has one main drawback:

1. The return of processing this document is one Stanza Document with lots of sentences, thus you don't know where one document ends and another starts, easily.

This batching utility solves this problem, when given a list of documents, it will return a list of corresponding processed Stanza documents. For more details see the README which contains an example.

Page 2 of 2

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.