The accelerated companion library to kfst
Project description
kfst-rs
kfst-rs is both the optional acceleration back end of kfst and a self-standing rust implementation of finite-state transducers mostly compatible with HFST. These two functions are liable to being split into multiple crates / packages in the future.
Able to load and execute Voikko and Omorfi: see kfst for transducers converted to a compatible format as well as Python bindings.
Supports the ATT format and its own KFST format. To convert HFST (optimized lookup or otherwise) to ATT using HFST's tools, do:
hfst-fst2txt transducer.hfst -o transducer.att
Using from Python
If you have kfst>=4.1 installed, simply do
pip install kfst-rs
to install kfst-rs. It should get automatically picked up by kfst and by extension pyvoikko and pyomorfi.
To check which implementation of kfst got loaded, look at the BACKEND property of kfst.
Using from rust
Given the Voikko transducer in KFST or ATT format, one could create a simple analyzer like this:
use kfst_rs::{FSTState, FST};
use std::io::{self, Write};
// Read in transducer
let pathtovoikko = ...
let fst = FST::from_kfst_file(pathtovoikko, true).unwrap();
// Alternatively, for ATT use FST::from_att_file
// Read in word to analyze
let mut buffer = String::new();
let stdin = io::stdin();
stdin.read_line(&mut buffer).unwrap();
buffer = buffer.trim().to_string();
// Do analysis proper
match fst.lookup(&buffer, FSTState::default(), true) {
Ok(result) => {
for (i, analysis) in result.into_iter().enumerate() {
println!("Analysis {}: {} ({})", i+1, analysis.0, analysis.1)
}
},
Err(err) => println!("No analysis: {:?}", err),
}
Given the input "lentokoneessa", this gives the following analysis:
Analysis 1: [Lt][Xp]lentää[X]len[Ln][Xj]to[X]to[Sn][Ny][Bh][Bc][Ln][Xp]kone[X]konee[Sine][Ny]ssa (0)
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 Distributions
Built Distributions
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file kfst_rs-0.1.4-pp311-pypy311_pp73-win_amd64.whl.
File metadata
- Download URL: kfst_rs-0.1.4-pp311-pypy311_pp73-win_amd64.whl
- Upload date:
- Size: 789.6 kB
- Tags: PyPy, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5e5ee9012a25af44e0077dcaa8f729e79d308d604c236a205f6156bd3092bfad
|
|
| MD5 |
57a6337b013d7c98f5f9d4bc29d3234a
|
|
| BLAKE2b-256 |
a4b38fbb66a243f34cf6d7c29220d93ffe3961b51d6228accb02e583a68a312b
|
File details
Details for the file kfst_rs-0.1.4-pp310-pypy310_pp73-win_amd64.whl.
File metadata
- Download URL: kfst_rs-0.1.4-pp310-pypy310_pp73-win_amd64.whl
- Upload date:
- Size: 788.4 kB
- Tags: PyPy, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c46083801c976fc8b2f64b385f3047d891a73a54866fe1d94178cda92e0cfceb
|
|
| MD5 |
118220750a098d4d2c300aa1b35fbae3
|
|
| BLAKE2b-256 |
c8979f6df2475705706ca2a94c2b63001f01bf0bdcd8478c7aa007f50feca353
|
File details
Details for the file kfst_rs-0.1.4-pp39-pypy39_pp73-win_amd64.whl.
File metadata
- Download URL: kfst_rs-0.1.4-pp39-pypy39_pp73-win_amd64.whl
- Upload date:
- Size: 788.8 kB
- Tags: PyPy, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
83710cfa70febc4b0a9389231838d72bbee4ae5b3e3aa87638e0a39bb1d17015
|
|
| MD5 |
6d3805febfd9ff0a09c99fce20518c2a
|
|
| BLAKE2b-256 |
0c4da1665ef1fef629b8571ca7d8ec2ee526020d7496f592c133450364ae87cc
|
File details
Details for the file kfst_rs-0.1.4-cp313-cp313t-win_arm64.whl.
File metadata
- Download URL: kfst_rs-0.1.4-cp313-cp313t-win_arm64.whl
- Upload date:
- Size: 712.1 kB
- Tags: CPython 3.13t, Windows ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4982cdc1098bd9df64df327bcfc24e9f9e3177f50fb5ea996939ec4080f6f2ac
|
|
| MD5 |
ddd7e27804bd1bfaf18759d65756fa5a
|
|
| BLAKE2b-256 |
4505357a6f64afef73368ecf041db455ab03e507cdaa5c0494b4f03e553aa990
|
File details
Details for the file kfst_rs-0.1.4-cp313-cp313t-win_amd64.whl.
File metadata
- Download URL: kfst_rs-0.1.4-cp313-cp313t-win_amd64.whl
- Upload date:
- Size: 793.4 kB
- Tags: CPython 3.13t, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
44105db8d1314c2d37133adeb5169601a77269c8b2365709c39a30fde01ed209
|
|
| MD5 |
3ddb7baed342037731f2d14226b66b2e
|
|
| BLAKE2b-256 |
7cd11cca983b57e77756d58c3c6e5dd3631e02c491e6ee7e56d054d68ea88afd
|
File details
Details for the file kfst_rs-0.1.4-cp311-abi3-win_arm64.whl.
File metadata
- Download URL: kfst_rs-0.1.4-cp311-abi3-win_arm64.whl
- Upload date:
- Size: 709.0 kB
- Tags: CPython 3.11+, Windows ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
59dc3ab7327c7fc09b03cb00fc84072d0bbb62167328386e59c3df0ad6994f1c
|
|
| MD5 |
04f5a51f9fa1f0c3d5bf3372a30c99eb
|
|
| BLAKE2b-256 |
9a3f5908a896e75de8d5dc8b4429a3924567b8086241ba12f6492d79516ab0bd
|
File details
Details for the file kfst_rs-0.1.4-cp311-abi3-win_amd64.whl.
File metadata
- Download URL: kfst_rs-0.1.4-cp311-abi3-win_amd64.whl
- Upload date:
- Size: 791.5 kB
- Tags: CPython 3.11+, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
256057c4409079e8b3c1381ab9c1fc350a94b9e1ea6be4b58531fef2cdb3fc9b
|
|
| MD5 |
02959d11a4d46ac39a369bb934f8c434
|
|
| BLAKE2b-256 |
90340f324a65ad8edb13f75a682e125e1e004412476e0c1db320a831dcec246c
|
File details
Details for the file kfst_rs-0.1.4-cp311-abi3-musllinux_1_2_x86_64.whl.
File metadata
- Download URL: kfst_rs-0.1.4-cp311-abi3-musllinux_1_2_x86_64.whl
- Upload date:
- Size: 457.9 kB
- Tags: CPython 3.11+, musllinux: musl 1.2+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2a4a958cc8307849262f06c6c646be36d3157ebdc89ccea4656f15722b664cad
|
|
| MD5 |
c47cf0bd986614fb0fadd5fe8e088217
|
|
| BLAKE2b-256 |
404b9f2b1a31285c72b7f62713d8f1e051a798c064b453fc211107817d803478
|
File details
Details for the file kfst_rs-0.1.4-cp311-abi3-musllinux_1_2_i686.whl.
File metadata
- Download URL: kfst_rs-0.1.4-cp311-abi3-musllinux_1_2_i686.whl
- Upload date:
- Size: 486.1 kB
- Tags: CPython 3.11+, musllinux: musl 1.2+ i686
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
64af2e54170f5b8e7997fbd531adfeef838721058c05dcda0d94e12ff2afbbb5
|
|
| MD5 |
24d6f8af3d3252f3a2db5619684f3ef9
|
|
| BLAKE2b-256 |
6a9252c0fd36563f9b0dd683b0f6cdf9cd9c0a3fc4aad65c119713c5a97f7abc
|
File details
Details for the file kfst_rs-0.1.4-cp311-abi3-musllinux_1_2_aarch64.whl.
File metadata
- Download URL: kfst_rs-0.1.4-cp311-abi3-musllinux_1_2_aarch64.whl
- Upload date:
- Size: 434.0 kB
- Tags: CPython 3.11+, musllinux: musl 1.2+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2e39995ef5a45bbdd0791170b74ba984e85853995a7f3f4ee715b85535146bf1
|
|
| MD5 |
89e89fe5315533c2587bf6b925f01cfa
|
|
| BLAKE2b-256 |
449447f36a6bc5d0225498da7ec6f0f0766cad0acc99e9c2b5836bdc579fdb06
|
File details
Details for the file kfst_rs-0.1.4-cp311-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.
File metadata
- Download URL: kfst_rs-0.1.4-cp311-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 459.2 kB
- Tags: CPython 3.11+, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0447a0563775db9dbf75b37a26977b1b283526a3740811c607280d11e438f09d
|
|
| MD5 |
bda88e2b5d82368d9cea93e9d6810f6e
|
|
| BLAKE2b-256 |
f09fcde2cc633cb661b9f122b5fed9914ebfcd9648e198fae9e5317c0d594f69
|
File details
Details for the file kfst_rs-0.1.4-cp311-abi3-manylinux_2_17_i686.manylinux2014_i686.whl.
File metadata
- Download URL: kfst_rs-0.1.4-cp311-abi3-manylinux_2_17_i686.manylinux2014_i686.whl
- Upload date:
- Size: 507.1 kB
- Tags: CPython 3.11+, manylinux: glibc 2.17+ i686
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
250176a77e54ac820b2c730ec57fbc36930876669ba188f4c58e9729fd9f463e
|
|
| MD5 |
2c4ea41aef9986d10001765bfc3f9213
|
|
| BLAKE2b-256 |
37517e14ce7a40f21f58683bc0cb7dcb76cb4e0b980fb44a844e61cd577750bb
|
File details
Details for the file kfst_rs-0.1.4-cp311-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.
File metadata
- Download URL: kfst_rs-0.1.4-cp311-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
- Upload date:
- Size: 436.7 kB
- Tags: CPython 3.11+, manylinux: glibc 2.17+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3518e12814b86ce280d4ddffb1660893e8b50ebc9174b2410b43621b868ab80f
|
|
| MD5 |
364028ce3835c91b81a7fbb09a65a67b
|
|
| BLAKE2b-256 |
0317875a080c58732240b82f241110e0282194788ef6511c273f807338308411
|
File details
Details for the file kfst_rs-0.1.4-cp311-abi3-macosx_11_0_arm64.whl.
File metadata
- Download URL: kfst_rs-0.1.4-cp311-abi3-macosx_11_0_arm64.whl
- Upload date:
- Size: 906.1 kB
- Tags: CPython 3.11+, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
17fc46c818cd808d276276df9dd3305cffdf07ab39dc487cd669771d3b1d610c
|
|
| MD5 |
e54e38bc345b789a2ea278e1f7c7376f
|
|
| BLAKE2b-256 |
9e2da42728047665c0a6f9f6e9d117ae02622e8feefd5cf2ea1cd4a3ee89ee73
|
File details
Details for the file kfst_rs-0.1.4-cp311-abi3-macosx_10_12_x86_64.whl.
File metadata
- Download URL: kfst_rs-0.1.4-cp311-abi3-macosx_10_12_x86_64.whl
- Upload date:
- Size: 923.8 kB
- Tags: CPython 3.11+, macOS 10.12+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
90fd72e88039a8147087b4fe2cdcddcd2092093754d29d001f2020b298ece784
|
|
| MD5 |
202529611b0daad1b9a8a58b6889a06d
|
|
| BLAKE2b-256 |
d5eb7b3b4b01f9b6078da944c057c4c91aa35b0c0e2743abef1d47f48ff78ed5
|