🐍 python-vibrato 🎤
Vibrato is a fast implementation of tokenization (or morphological analysis) based on the Viterbi algorithm. This is a Python wrapper for Vibrato.
Installation
Install pre-built package from PyPI
Run the following command:
$ pip install vibrato
Build from source
You need to install the Rust compiler following the documentation beforehand.
vibrato uses pyproject.toml, so you also need to upgrade pip to version 19 or later.
$ pip install --upgrade pip
After setting up the environment, you can install vibrato as follows:
$ pip install git+https://github.com/daac-tools/python-vibrato
Example Usage
python-vibrato does not contain model files. To perform tokenization, follow the document of Vibrato to download distribution models or train your own models beforehand.
Check the version number as shown below to use compatible models:
>>> import vibrato
>>> vibrato.VIBRATO_VERSION
'0.5.2'
Examples:
>>> import vibrato
>>> with open('tests/data/system.dic', 'rb') as fp:
... tokenizer = vibrato.Vibrato(fp.read())
>>> tokens = tokenizer.tokenize('社長は火星猫だ')
>>> len(tokens)
5
>>> tokens[0]
Token { surface: "社長", feature: "名詞,普通名詞,一般,*" }
>>> tokens[0].surface()
'社長'
>>> tokens[0].feature()
'名詞,普通名詞,一般,*'
>>> tokens[0].start()
0
>>> tokens[0].end()
2
Note for distributed models
The distributed models are compressed in zstd format. If you want to load these compressed models, you must decompress them outside the API.
>>> import vibrato
>>> import zstandard # zstandard package in PyPI
>>> dctx = zstandard.ZstdDecompressor()
>>> with open('tests/data/system.dic.zst', 'rb') as fp:
... with dctx.stream_reader(fp) as dict_reader:
... tokenizer = vibrato.Vibrato(dict_reader.read())
License
Licensed under either of
- Apache License, Version 2.0 (LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0)
- MIT license (LICENSE-MIT or http://opensource.org/licenses/MIT)
at your option.
Metadata
Release files for vibrato 0.2.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 | Actions |
|---|---|---|---|---|
| vibrato-0.2.3.tar.gz | 19.0 kB | Without provenance | Details for vibrato-0.2.3.tar.gz |
Built distributions (wheels)
| File | Actions Reset | |||
|---|---|---|---|---|
| vibrato-0.2.3-cp310-abi3-win_amd64.whl | CPython 3.10 | abi3 | Windows x86-64 | Details for vibrato-0.2.3-cp310-abi3-win_amd64.whl |
| vibrato-0.2.3-cp310-abi3-win32.whl | CPython 3.10 | abi3 | Windows x86-32 | Details for vibrato-0.2.3-cp310-abi3-win32.whl |
| vibrato-0.2.3-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl | CPython 3.10 | abi3 | Linux glibc 2.17+ x86-64 | Details for vibrato-0.2.3-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl |
| vibrato-0.2.3-cp310-abi3-manylinux_2_5_i686.manylinux1_i686.whl | CPython 3.10 | abi3 | Linux glibc 2.5+ x86-32 | Details for vibrato-0.2.3-cp310-abi3-manylinux_2_5_i686.manylinux1_i686.whl |
| vibrato-0.2.3-cp310-abi3-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl | CPython 3.10 | abi3 | macOS 11.0+ ARM64, macOS 10.12+ universal2 (ARM64, x86-64), macOS 10.12+ x86-64 | Details for vibrato-0.2.3-cp310-abi3-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl |
Total release size: 1.9 MB
Release files / vibrato-0.2.3.tar.gz
| Download URL | vibrato-0.2.3.tar.gz |
|---|---|
| Size | 19.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c535c37e4b6830701749bd2ee648223f2ee7e20930929e36f0bfe2dc49a86b37
|
|
BLAKE2b-256 checksum How to use checksums |
f7c7078e647260baadb134b884c653eec293d93ef510fee68b6b643c975168d6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.11.17 {"installer":{"name":"uv","version":"0.11.17","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / vibrato-0.2.3-cp310-abi3-win_amd64.whl
| Download URL | vibrato-0.2.3-cp310-abi3-win_amd64.whl |
|---|---|
| Size | 220.3 kB |
| Tags | CPython 3.10 Windows x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
d3b389465d61cd7e9201b7feda2139773d0fd240f82f01b9170b23d529e19869
|
|
BLAKE2b-256 checksum How to use checksums |
3f098a52848ee5638c9f7735fc11cc9fccc7b7f0e9803d53247ab4f81d554dd1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.11.17 {"installer":{"name":"uv","version":"0.11.17","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / vibrato-0.2.3-cp310-abi3-win32.whl
| Download URL | vibrato-0.2.3-cp310-abi3-win32.whl |
|---|---|
| Size | 208.0 kB |
| Tags | CPython 3.10 Windows x86-32 abi3 |
|
SHA-256 checksum How to use checksums |
7b236e907f865077a80641239c2fedecb9cbba2b8c9f86be7de11076e2a23606
|
|
BLAKE2b-256 checksum How to use checksums |
8b060297ea3e4cb7d334b89ac3ae384282d54094326568dc07eb3144b0e977b0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.11.17 {"installer":{"name":"uv","version":"0.11.17","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / vibrato-0.2.3-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
| Download URL | vibrato-0.2.3-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl |
|---|---|
| Size | 371.7 kB |
| Tags | CPython 3.10 Linux glibc 2.17+ x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
00f4a2191a97056d3e3f3289fb19105309ffc96a983f44490f603488898cce37
|
|
BLAKE2b-256 checksum How to use checksums |
40db142a172c8c1820e7285def270573942bbc9e1e889eecb3573edbe2afd679
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.11.17 {"installer":{"name":"uv","version":"0.11.17","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / vibrato-0.2.3-cp310-abi3-manylinux_2_5_i686.manylinux1_i686.whl
| Download URL | vibrato-0.2.3-cp310-abi3-manylinux_2_5_i686.manylinux1_i686.whl |
|---|---|
| Size | 400.1 kB |
| Tags | CPython 3.10 Linux glibc 2.5+ x86-32 abi3 |
|
SHA-256 checksum How to use checksums |
ffb0599a41a503c815fc6271f6de05433f19a88cf71b65b4293e71ffb47159f0
|
|
BLAKE2b-256 checksum How to use checksums |
1e7ab6529f23ee5020bd1ddd64b1eb994d27170cdbfcd403551156ef129ec9ad
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.11.17 {"installer":{"name":"uv","version":"0.11.17","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / vibrato-0.2.3-cp310-abi3-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl
| Download URL | vibrato-0.2.3-cp310-abi3-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl |
|---|---|
| Size | 638.5 kB |
| Tags | CPython 3.10 abi3 macOS 10.12+ universal2 (ARM64, x86-64) macOS 10.12+ x86-64 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
c708f424c9fa814b5ae1aab2053fccad7b5219d81f09481d590bbf1379345a2e
|
|
BLAKE2b-256 checksum How to use checksums |
c128bf36ce997204a256c343b731652ffd488fe3e875c69b240947d8a744febe
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.11.17 {"installer":{"name":"uv","version":"0.11.17","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Security for vibrato 0.2.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.
To learn more about protecting yourself from malicious actors, visit our package security documentation.