No project description provided
Project description
🐍 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.
daachorse 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 daachorse 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.0'
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.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distributions
File details
Details for the file vibrato-0.2.0.tar.gz
.
File metadata
- Download URL: vibrato-0.2.0.tar.gz
- Upload date:
- Size: 18.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/0.14.17
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d30e14d17463bd079a9b9e1a7a0ab48366f6aefc932647ed9504e6c815698464 |
|
MD5 | e10ddb6cfcfe174320ff921f21456ecb |
|
BLAKE2b-256 | 3d267abfb51bd807f40f39f3dfa2985db8599df5eb277940dc76a6ee105ff600 |
File details
Details for the file vibrato-0.2.0-cp311-none-win_amd64.whl
.
File metadata
- Download URL: vibrato-0.2.0-cp311-none-win_amd64.whl
- Upload date:
- Size: 220.3 kB
- Tags: CPython 3.11, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/0.14.17
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | b785484a6337d0d180c2d35aad1d88de8eeccf8a31cf2549ed5413b60efb5dfd |
|
MD5 | 854e67da774b0951ac918b652c2ad124 |
|
BLAKE2b-256 | 0fa8c2a95b753d76dfb9a0fa7f0299ec97e62ba199656892fa218db9836cd8dc |
File details
Details for the file vibrato-0.2.0-cp311-none-win32.whl
.
File metadata
- Download URL: vibrato-0.2.0-cp311-none-win32.whl
- Upload date:
- Size: 209.7 kB
- Tags: CPython 3.11, Windows x86
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/0.14.17
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | aa0bc39359b02fe2594cfbf80c1d9845b123e31d57c54cc77de506bbdbd8bb79 |
|
MD5 | 0fbf6821d7413f70606ca60d96ca6c1b |
|
BLAKE2b-256 | ac8252af2daa40c693763c08856e21dd1d67f95de39af314f56e978f6aed64ed |
File details
Details for the file vibrato-0.2.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
.
File metadata
- Download URL: vibrato-0.2.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 1.2 MB
- Tags: CPython 3.11, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/0.14.17
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 35fe5499fbe9edb7422917da5c4b8340ceb649fc49c77c61e09c9345a864545b |
|
MD5 | 4c7a2f38d91d9970222b5bb281f566d9 |
|
BLAKE2b-256 | 4752701cb78ad20908ad87a979cdd648ca7b8aea57ff1a836eb67ae9796f1a62 |
File details
Details for the file vibrato-0.2.0-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.whl
.
File metadata
- Download URL: vibrato-0.2.0-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.whl
- Upload date:
- Size: 1.2 MB
- Tags: CPython 3.11, manylinux: glibc 2.5+ i686
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/0.14.17
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c16bfbee9050675dead539dea607af82ca229cb8c19ff8bfcdaf85a138cd9d59 |
|
MD5 | 02b37f62dec0577e4ed558ba5a8090f6 |
|
BLAKE2b-256 | ca0f33199c5c668279d553a37ea60def7e9a028a60f96a22f6afc96ffdd8b33c |
File details
Details for the file vibrato-0.2.0-cp311-cp311-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl
.
File metadata
- Download URL: vibrato-0.2.0-cp311-cp311-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl
- Upload date:
- Size: 700.2 kB
- Tags: CPython 3.11, macOS 10.9+ universal2 (ARM64, x86-64), macOS 10.9+ x86-64, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/0.14.17
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f869e09e0c3551282d2779258efb3f8661c0bee7839da6a2e2ca4c27cc677121 |
|
MD5 | 30e6d038b775b9da707cf25b6519b366 |
|
BLAKE2b-256 | 8921cf484f854e9382b6e2086233deb2a159850ee59d325de4409dffad97aa63 |
File details
Details for the file vibrato-0.2.0-cp310-none-win_amd64.whl
.
File metadata
- Download URL: vibrato-0.2.0-cp310-none-win_amd64.whl
- Upload date:
- Size: 220.3 kB
- Tags: CPython 3.10, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/0.14.17
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 772165e1ccb6481a0ffeea113e481a19afe75ab4e1029af54c0f26d138ce982f |
|
MD5 | 2e883ffbd916506d76c9700260e775df |
|
BLAKE2b-256 | df2999c7013859cfdaf154873a72c4d3d7017be76f90bfb7ccd8149ff1dc17c1 |
File details
Details for the file vibrato-0.2.0-cp310-none-win32.whl
.
File metadata
- Download URL: vibrato-0.2.0-cp310-none-win32.whl
- Upload date:
- Size: 209.7 kB
- Tags: CPython 3.10, Windows x86
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/0.14.17
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | b39582c3a0a42eb3a514b58a33e76bade39c4914b0c21a88302806362fd0ea79 |
|
MD5 | 179a951dbd9114731bb781eba5b99d52 |
|
BLAKE2b-256 | 8d66f0aa7b49d362b62f9aa2556d3a151c5b0cc2d50aa56859d32ebabc5668b7 |
File details
Details for the file vibrato-0.2.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
.
File metadata
- Download URL: vibrato-0.2.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 1.2 MB
- Tags: CPython 3.10, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/0.14.17
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7e16b960a426bdf39060d6669ddc73f27fa2c1358e9768532ae214a4fa99bd3e |
|
MD5 | 24fc671424bc38fe17ad2cd271a5d274 |
|
BLAKE2b-256 | c8af4107d5805ce7b1119ac4b713d5cd2124ab8ce3c75a94d69655862726b288 |
File details
Details for the file vibrato-0.2.0-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.whl
.
File metadata
- Download URL: vibrato-0.2.0-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.whl
- Upload date:
- Size: 1.2 MB
- Tags: CPython 3.10, manylinux: glibc 2.5+ i686
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/0.14.17
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9e8b611f3084f293460b3a7b27797014bed4090d4a01bfa9673be078f79e2235 |
|
MD5 | 239954e990b114243b511392cf52107a |
|
BLAKE2b-256 | f773bfde71bb7b805be8a9c96f57cbdd6c6c7a34c57fc926799f25f41ab0f7c5 |
File details
Details for the file vibrato-0.2.0-cp310-cp310-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl
.
File metadata
- Download URL: vibrato-0.2.0-cp310-cp310-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl
- Upload date:
- Size: 700.2 kB
- Tags: CPython 3.10, macOS 10.9+ universal2 (ARM64, x86-64), macOS 10.9+ x86-64, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/0.14.17
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9bc6991a653f8c398ede88379df6525c895d8fb1c2b6e11da710624357c69ac2 |
|
MD5 | 8b9029684df3f486fda6d79b76526cdc |
|
BLAKE2b-256 | 583095f576dc902ccf0ce3ca28b24ee37800200b171b531a7ba564b888016200 |
File details
Details for the file vibrato-0.2.0-cp39-none-win_amd64.whl
.
File metadata
- Download URL: vibrato-0.2.0-cp39-none-win_amd64.whl
- Upload date:
- Size: 220.5 kB
- Tags: CPython 3.9, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/0.14.17
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7a06ab5c59fd2df0e85c3d5937dff62f7facb6c12a6fc08c1d54909e3a938428 |
|
MD5 | c98a475e2614b2a30df242ceb8c78cdc |
|
BLAKE2b-256 | 4d358944c8736fe1364ad50a8e57dee3cc5bc129eca9554f670f5463c9f6bf39 |
File details
Details for the file vibrato-0.2.0-cp39-none-win32.whl
.
File metadata
- Download URL: vibrato-0.2.0-cp39-none-win32.whl
- Upload date:
- Size: 210.0 kB
- Tags: CPython 3.9, Windows x86
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/0.14.17
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 552fdd8532fc9e1b7b9ce33621fac13706c30977599af35612da34dd17d7ea80 |
|
MD5 | 390e3033929de2d22576a256345ccfb9 |
|
BLAKE2b-256 | e9a72c104f74f0f6906ff38340e6769739376df5383842c78eb828bcb2c28f4c |
File details
Details for the file vibrato-0.2.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
.
File metadata
- Download URL: vibrato-0.2.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 1.2 MB
- Tags: CPython 3.9, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/0.14.17
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f1331cb88f9fe24a1286fc719c1e086fc139c00c055c9788882016802f737483 |
|
MD5 | 7a32e8699cf5bb4eb4691e1e8cf555e4 |
|
BLAKE2b-256 | 5f57824ba671ae3bedb0bcd564524c9a7ae4e3c26f0b300e0bbcd1b025e4400d |
File details
Details for the file vibrato-0.2.0-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.whl
.
File metadata
- Download URL: vibrato-0.2.0-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.whl
- Upload date:
- Size: 1.2 MB
- Tags: CPython 3.9, manylinux: glibc 2.5+ i686
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/0.14.17
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e6179892c1eb4ab0c50cd9b174650904f101d5a7cdb39822335b6f2d49339368 |
|
MD5 | e88d001da7a909f7f753dbe3cc37acc1 |
|
BLAKE2b-256 | c068ea1681902e24d7cdb58ef3b1f1458948662c572dc295f756848f1bd68944 |
File details
Details for the file vibrato-0.2.0-cp39-cp39-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl
.
File metadata
- Download URL: vibrato-0.2.0-cp39-cp39-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl
- Upload date:
- Size: 700.7 kB
- Tags: CPython 3.9, macOS 10.9+ universal2 (ARM64, x86-64), macOS 10.9+ x86-64, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/0.14.17
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | b48ca962c7a160eeaa9774bdf4bce0e59206c6d64b7db16558b8ceaafc25025d |
|
MD5 | 9a7692b2ceda0a4d2885f5765a3511e9 |
|
BLAKE2b-256 | a8f058bda1a0d30e54756e1160dbea993be0cfc950e1c287c3e4a79baa61f236 |
File details
Details for the file vibrato-0.2.0-cp38-none-win_amd64.whl
.
File metadata
- Download URL: vibrato-0.2.0-cp38-none-win_amd64.whl
- Upload date:
- Size: 220.3 kB
- Tags: CPython 3.8, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/0.14.17
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8aaf11f0a674e258f4ad4a05d07145df3693cc5b7ee3b23e150a60d382480f5b |
|
MD5 | d9b8a23621deb0479218ca63bf2e76e2 |
|
BLAKE2b-256 | 25d998183ef08195260062e4dddef611a4857081c74dad22f5b2e8fba203e7ce |
File details
Details for the file vibrato-0.2.0-cp38-none-win32.whl
.
File metadata
- Download URL: vibrato-0.2.0-cp38-none-win32.whl
- Upload date:
- Size: 209.6 kB
- Tags: CPython 3.8, Windows x86
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/0.14.17
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 01551bbd2d9d0ececabac96eab1155f015eb532f261223b301d2af05df29c5a4 |
|
MD5 | 07c52967ece4e5c6e57ac2a5a0441f87 |
|
BLAKE2b-256 | 5a600ff17edb5d1cc2f859f502e0ea3038a3d388dd025f8f69785101326f7eac |
File details
Details for the file vibrato-0.2.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
.
File metadata
- Download URL: vibrato-0.2.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 1.2 MB
- Tags: CPython 3.8, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/0.14.17
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7b3a28ade30b11bc01aaa8020c245c1b963997c4041f8dd711a40b961a684cc5 |
|
MD5 | 2397513d78801c3976596c0785d766ef |
|
BLAKE2b-256 | ccf8fce0b03e668e613c75e49063ab7542ef7a3d9672c41ff33eb719bfd14ea7 |
File details
Details for the file vibrato-0.2.0-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.whl
.
File metadata
- Download URL: vibrato-0.2.0-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.whl
- Upload date:
- Size: 1.2 MB
- Tags: CPython 3.8, manylinux: glibc 2.5+ i686
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/0.14.17
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c745cc2d2699850b9d652d09367a9661a7dcc88f1baa4ea97ce26c8ba28a6cb5 |
|
MD5 | 06c22278109221d750cd45c36a84bf8f |
|
BLAKE2b-256 | 0c2d16872b220639b5aa74314747e96d699a03b0245fc04eebbde0491baee3f2 |
File details
Details for the file vibrato-0.2.0-cp38-cp38-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl
.
File metadata
- Download URL: vibrato-0.2.0-cp38-cp38-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl
- Upload date:
- Size: 701.0 kB
- Tags: CPython 3.8, macOS 10.9+ universal2 (ARM64, x86-64), macOS 10.9+ x86-64, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/0.14.17
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4c5e5f8189ce5be880f7e0d971cf53be674a60f7fa20401bd470ae2f64078d14 |
|
MD5 | 6e26a8c848acd33ca323b89965d72eff |
|
BLAKE2b-256 | 4a0d0cbb6b6d0282a5a6d95daff9e4b8d1112f8f58c12cb47b114b84afa947cf |
File details
Details for the file vibrato-0.2.0-cp37-none-win_amd64.whl
.
File metadata
- Download URL: vibrato-0.2.0-cp37-none-win_amd64.whl
- Upload date:
- Size: 220.3 kB
- Tags: CPython 3.7, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/0.14.17
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 60efc0ecc163351fdcac88a104064711b9e3d07a260af23d88fc0d1c28f70901 |
|
MD5 | a70aa3bf265a7933df20ea8f7980f7f6 |
|
BLAKE2b-256 | af81474f5263ba4cf5d0024d06e325127698a2c1314d961d16f7af1aa511d23d |
File details
Details for the file vibrato-0.2.0-cp37-none-win32.whl
.
File metadata
- Download URL: vibrato-0.2.0-cp37-none-win32.whl
- Upload date:
- Size: 209.6 kB
- Tags: CPython 3.7, Windows x86
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/0.14.17
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 780a1d962ff5147cf22babe186c0cb148734ca1fd05d40734ea88c3c9f68750f |
|
MD5 | 33987851fd610dda211bbfb26353f3c0 |
|
BLAKE2b-256 | fba1e38fc8cc92039073eb07cc6cd55ca7c74547d9f6e013cd9a58c6edc6ed1f |
File details
Details for the file vibrato-0.2.0-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
.
File metadata
- Download URL: vibrato-0.2.0-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 1.2 MB
- Tags: CPython 3.7m, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/0.14.17
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e4bb0643521fd57d93bedd8e9c8b0da38c9cf4bfad57fd48ce44178edff40ba9 |
|
MD5 | cab2fffbf65948b253698c9863b2e49b |
|
BLAKE2b-256 | db7d60f07d58fda51ed1ea8219b467bd8e427622c4da00a9d1345aab277e1b0a |
File details
Details for the file vibrato-0.2.0-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.whl
.
File metadata
- Download URL: vibrato-0.2.0-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.whl
- Upload date:
- Size: 1.2 MB
- Tags: CPython 3.7m, manylinux: glibc 2.5+ i686
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/0.14.17
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 09a626a18a54968674770f3d6efda3d1b9074df15b2caaf276024007052ea6f5 |
|
MD5 | 9a53ae610ca48e85af124a5f40be3b73 |
|
BLAKE2b-256 | 84f827687cf9b5bd60e9e9996032894fd38d99d7b57bb45805ed8f9fedcb9e5e |
File details
Details for the file vibrato-0.2.0-cp37-cp37m-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl
.
File metadata
- Download URL: vibrato-0.2.0-cp37-cp37m-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl
- Upload date:
- Size: 701.2 kB
- Tags: CPython 3.7m, macOS 10.9+ universal2 (ARM64, x86-64), macOS 10.9+ x86-64, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/0.14.17
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | de001dee8f298229b62729b27e59bfcf2f1c52b29f4c06acd175c371ee9eab52 |
|
MD5 | 8ead20d11f5316328ada8ca8e7b64855 |
|
BLAKE2b-256 | 1acc6fd795a40b688e3cbedbfdc57645fe0c75ed63ee087de4c163c020d5cde6 |