Vltava
Opinionated Czech language processing.
The processor takes in raw documents and applies basic preprocessing (such as tags and accent striping) and lemmatization using either Majka or MorphoDiTa.
from vltava import DocumentProcessor
doc = "v televizi říkali, že zítra pršet nebude"
document_processor = DocumentProcessor()
result = document_processor.process(doc)
# result is ['televize', 'rikat', 'zitra', 'prset', 'byt']
DocumentProcessor supports multiprocessing when dealing with
large collections of documents.
from vltava import DocumentProcessor
docs = ["Ahoj, jak se máš?"] * 100
result = DocumentProcessor().process_from_iterable(docs, n_jobs=2)
Installation
pip install vltava
Backend
The package is using two different backends for finding Czech lemmas: Majka, MorphoDiTa. Check out the links for more information. The required binary files are contained directly in the package.
Public API
vltava.DocumentProcessor
vltava.DocumentProcessor(backend: str = "majka")
Initializes DocumentProcessor with the selected backend.
Methods:
DocumentProcessor.process(
self, doc: str, tokenize: bool = True
) -> Union[str, List[str]]
Processes the input doc and returns it as a processed
string or a list of processed tokens, if tokenize is True.
DocumentProcessor.process_from_iterable(
self, docs: Iterable[str], tokenize: bool = True, n_jobs: int = 1
) -> Union[Iterable[str], Iterable[List[str]]]:
Processes the input docs collection of documents. Result is either
an iterable of processed strings or an iterable of lists of processed
tokens (if tokenize is True).
If n_jobs is greater than one, multiple worker are launched to
process the documents.
Metadata
Release files for vltava 0.1.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| vltava-0.1.3.tar.gz | 5.1 MB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| vltava-0.1.3-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 10.2 MB
Release files / vltava-0.1.3.tar.gz
| Download URL | vltava-0.1.3.tar.gz |
|---|---|
| Size | 5.1 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d4e336e9e7f6089579b36d681a657651a92f425a102c9b063854dd0fcfa89a5a
|
|
BLAKE2b-256 checksum How to use checksums |
b8bc2e3097574e51fc46956a66fbe88fdd0fadee2ec827524b3c36803db81fff
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.7
|
Release files / vltava-0.1.3-py3-none-any.whl
| Download URL | vltava-0.1.3-py3-none-any.whl |
|---|---|
| Size | 5.1 MB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
71eaafb516b57b2b964b9bdd93ed30904b9ccc2262de0c8ee12da715fc3d898f
|
|
BLAKE2b-256 checksum How to use checksums |
73fcd73b02d307a6096976017e61fd2e33bfda967317befef464e1543e994ca7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.7
|
Security for vltava 0.1.3
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.