A Rust library for building and querying Directed Acyclic Word Graphs (DAWGs) and Compacted DAWGs (CDAWGs) for efficient string indexing and searching.
Project description
(Py) Rusty DAWG
A Python wrapper for Rusty DAWG, providing seamless access to fast and memory-efficient DAWG data structures implemented in Rust.
Building
First update Rusty DAWG to the most recent version from the GitHub repo:
cargo update -p rusty-dawg
Then build via Maturin:
maturin build --release
# python3 -m maturin build --release
To update the Git repo dependencies:
cargo update
Finally, install the generated wheel via pip in your Python installation:
pip install target/wheels/*.whl
Usage example
from transformers import GPT2Tokenizer
from rusty_dawg import Dawg, PyDawg
dawg_path = [path-to-dawg]
dawg = Dawg.load(dawg_path)
# Make sure the tokenizer matches the one used to construct the DAWG.
tokenizer = GPT2Tokenizer.from_pretrained('gpt2')
py_dawg = PyDawg(dawg, tokenizer)
# Substring found in the Wikitext 2 train data.
query = "As with previous Valkyira Chronicles games , Valkyria Chronicles III"
# Return a list of all substrings in the DAWG that match the query.
matching_substrings = py_dawg.get_matching_substrings(query)
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
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 rusty_dawg-0.2.2.tar.gz.
File metadata
- Download URL: rusty_dawg-0.2.2.tar.gz
- Upload date:
- Size: 104.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
91279b55ccc718db5f5289d841c796cfb1d8718461ceca39c907c3ddb61bc536
|
|
| MD5 |
e990f66fe2e7f942bb1f8b07f11aa449
|
|
| BLAKE2b-256 |
2854fef6d257195c0ac495c3999528e96d52f38c229d744c3f44289facf8acd7
|
File details
Details for the file rusty_dawg-0.2.2-pp310-pypy310_pp73-manylinux_2_28_x86_64.whl.
File metadata
- Download URL: rusty_dawg-0.2.2-pp310-pypy310_pp73-manylinux_2_28_x86_64.whl
- Upload date:
- Size: 500.3 kB
- Tags: PyPy, manylinux: glibc 2.28+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8c7922b7166796df117d94ee8ca1578fcad62f0fc68525af30607e3f848b0440
|
|
| MD5 |
6762be95d3aff34a5c5bf7ccd54a4ce2
|
|
| BLAKE2b-256 |
db7b326173b5d91f9e916783a2957de2cf4dbdcd67a6ed9614a01100492d2f44
|
File details
Details for the file rusty_dawg-0.2.2-pp310-pypy310_pp73-manylinux_2_28_aarch64.whl.
File metadata
- Download URL: rusty_dawg-0.2.2-pp310-pypy310_pp73-manylinux_2_28_aarch64.whl
- Upload date:
- Size: 497.3 kB
- Tags: PyPy, manylinux: glibc 2.28+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
86dfa413e311286c437d37e81d8090f41da1b1c22082bafeed90e9033d3b03c6
|
|
| MD5 |
3b81b0eb52d80e9d1f5551184472da90
|
|
| BLAKE2b-256 |
0e3fe33835cfc9b598f4e09f13b65d271412af11dfc234831ddd48ba689275bb
|
File details
Details for the file rusty_dawg-0.2.2-cp312-none-win_amd64.whl.
File metadata
- Download URL: rusty_dawg-0.2.2-cp312-none-win_amd64.whl
- Upload date:
- Size: 732.1 kB
- Tags: CPython 3.12, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3bad26182b3ce8738a47469ec158d5f4d71937205516cb1cb9c19a2dbb1b57ff
|
|
| MD5 |
11827fd1f692b2f11ffecd5a6ef881d2
|
|
| BLAKE2b-256 |
d5ec6d6b1a3a5dc1e7e7b7a816dbb056e149d86d5f76eb32b2ffca5f26dc4a6c
|
File details
Details for the file rusty_dawg-0.2.2-cp312-cp312-manylinux_2_28_x86_64.whl.
File metadata
- Download URL: rusty_dawg-0.2.2-cp312-cp312-manylinux_2_28_x86_64.whl
- Upload date:
- Size: 500.2 kB
- Tags: CPython 3.12, manylinux: glibc 2.28+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
281e47496ea6150e0ad169866b3763c26c1be4a5359812febfe218d938188ffa
|
|
| MD5 |
2d686af82051787e566362c7c784e722
|
|
| BLAKE2b-256 |
3557a48767298d4f3277961b09f6dbe09f76b47b79b9220904d3c41b6425a1e8
|
File details
Details for the file rusty_dawg-0.2.2-cp312-cp312-manylinux_2_28_aarch64.whl.
File metadata
- Download URL: rusty_dawg-0.2.2-cp312-cp312-manylinux_2_28_aarch64.whl
- Upload date:
- Size: 497.8 kB
- Tags: CPython 3.12, manylinux: glibc 2.28+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
72495928a62556216168bcad5a34e59bdc3e4891ba4f990a159ac8e89a17ac32
|
|
| MD5 |
fcf16c160110aa7a96e3a451a4a21163
|
|
| BLAKE2b-256 |
677d689e3f36e0c511435d9716d81ed279510634f1697c202ae198129d98c8ea
|
File details
Details for the file rusty_dawg-0.2.2-cp312-cp312-macosx_11_0_arm64.whl.
File metadata
- Download URL: rusty_dawg-0.2.2-cp312-cp312-macosx_11_0_arm64.whl
- Upload date:
- Size: 450.7 kB
- Tags: CPython 3.12, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
68fe3437e9a50e25ea31a011590c9d96c07c2058324b022f354617b55a6f8bf5
|
|
| MD5 |
9d56b22d5640eac0a2c5d330fb7c4784
|
|
| BLAKE2b-256 |
da431d8234594f9500745311a14bb386183f73ffdf348b0dd329f186c16e0e52
|
File details
Details for the file rusty_dawg-0.2.2-cp312-cp312-macosx_10_12_x86_64.whl.
File metadata
- Download URL: rusty_dawg-0.2.2-cp312-cp312-macosx_10_12_x86_64.whl
- Upload date:
- Size: 480.5 kB
- Tags: CPython 3.12, macOS 10.12+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fedd118c717f7d986ca6582166389db167b61ed579068b6d70f4f0581b01aa13
|
|
| MD5 |
c0a1cb5e719c3c3b5c2d2912d70ce788
|
|
| BLAKE2b-256 |
ecb11b794dc27bfebc21ab771e8d42c6e8069e5d9ab2e9e72eba4eaff02e7fb3
|
File details
Details for the file rusty_dawg-0.2.2-cp311-none-win_amd64.whl.
File metadata
- Download URL: rusty_dawg-0.2.2-cp311-none-win_amd64.whl
- Upload date:
- Size: 730.3 kB
- Tags: CPython 3.11, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8ab3a122ae16ec4b90d0ef018d189ad0e97c9758d6aedd6fa195abc2f595de47
|
|
| MD5 |
632733b7f872541f65bdb9220ae7dca0
|
|
| BLAKE2b-256 |
a9836b97d54a38817a9f4c05f14420c4956b0cc1ed4cabef9ca4392c01fcfe97
|
File details
Details for the file rusty_dawg-0.2.2-cp311-cp311-manylinux_2_28_x86_64.whl.
File metadata
- Download URL: rusty_dawg-0.2.2-cp311-cp311-manylinux_2_28_x86_64.whl
- Upload date:
- Size: 501.4 kB
- Tags: CPython 3.11, manylinux: glibc 2.28+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e4118b6fc6091381b0548a54abd0b6eeb0e10c63e4ddea63a91a209de6e1b17e
|
|
| MD5 |
d57be774fb04b1a71c3e1b8fab5fff32
|
|
| BLAKE2b-256 |
30a3be7a9e4ee3586368cc46c82919983effaeba89f2a6a765515b2dee3b2a6f
|
File details
Details for the file rusty_dawg-0.2.2-cp311-cp311-manylinux_2_28_aarch64.whl.
File metadata
- Download URL: rusty_dawg-0.2.2-cp311-cp311-manylinux_2_28_aarch64.whl
- Upload date:
- Size: 499.8 kB
- Tags: CPython 3.11, manylinux: glibc 2.28+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
eab6c5de394766ef92607e4bfe1fab8f03ecfa02a95a942771651da0542068f5
|
|
| MD5 |
d3127b88672b5db4a20e9bef40b1fe9f
|
|
| BLAKE2b-256 |
0368fa16aba16d9087739342efbd703715615bb541d22e5317ee73d3eec2ee7a
|
File details
Details for the file rusty_dawg-0.2.2-cp311-cp311-macosx_11_0_arm64.whl.
File metadata
- Download URL: rusty_dawg-0.2.2-cp311-cp311-macosx_11_0_arm64.whl
- Upload date:
- Size: 450.5 kB
- Tags: CPython 3.11, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
16da9fe6abdc2d360b57c951d7442838d7586653c0afce2976dd4d1bbf23a1b0
|
|
| MD5 |
e99dc9043eafa89805b06b06d3c0628b
|
|
| BLAKE2b-256 |
49d32b02ee8afb7ad440fe31ebb9ad851fd5b044010e598e8aae7ff6653234eb
|
File details
Details for the file rusty_dawg-0.2.2-cp311-cp311-macosx_10_12_x86_64.whl.
File metadata
- Download URL: rusty_dawg-0.2.2-cp311-cp311-macosx_10_12_x86_64.whl
- Upload date:
- Size: 482.9 kB
- Tags: CPython 3.11, macOS 10.12+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a7917611f648e2f77553cf613a42a991d771d7200c98255f4668ce82e5edf816
|
|
| MD5 |
85a6170ed6f2f35b68dec2693a0b2579
|
|
| BLAKE2b-256 |
198181a41201904b3f657488241ba6a1e5a74b96fecf00e1a1a426e50518a5b0
|
File details
Details for the file rusty_dawg-0.2.2-cp310-none-win_amd64.whl.
File metadata
- Download URL: rusty_dawg-0.2.2-cp310-none-win_amd64.whl
- Upload date:
- Size: 730.3 kB
- Tags: CPython 3.10, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
18d629dc4fe06ec5640704346a6eea155de5a8b42e0bd32a7cd17dadad9ed278
|
|
| MD5 |
80d1e7162f555254c84f075185cfcda8
|
|
| BLAKE2b-256 |
37aca226ca24fac4da7abf264f3c3df936b10129d4b41eb86d69e90417f07f4b
|
File details
Details for the file rusty_dawg-0.2.2-cp310-cp310-manylinux_2_28_x86_64.whl.
File metadata
- Download URL: rusty_dawg-0.2.2-cp310-cp310-manylinux_2_28_x86_64.whl
- Upload date:
- Size: 501.4 kB
- Tags: CPython 3.10, manylinux: glibc 2.28+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e1ec7433c45c18724cfe2abf569455d73532702bcbd07997609bc3b209f3efc5
|
|
| MD5 |
7435385465010a0021dd295e5ba7cab5
|
|
| BLAKE2b-256 |
139cab0c06ae0cd911c6bd26190204247b968b230b735a7750bd32416789253b
|
File details
Details for the file rusty_dawg-0.2.2-cp310-cp310-manylinux_2_28_aarch64.whl.
File metadata
- Download URL: rusty_dawg-0.2.2-cp310-cp310-manylinux_2_28_aarch64.whl
- Upload date:
- Size: 499.7 kB
- Tags: CPython 3.10, manylinux: glibc 2.28+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
025b9d25da0d6b5f179af3cadf1cb7f37cf609b401f0d9274b3acc7cc8c66518
|
|
| MD5 |
3005853e6bad9669cc95ab4a4b94a7ca
|
|
| BLAKE2b-256 |
0f3b55b66e18d1ca20234f03fb4a4e5c644983d1d813730680f1d44e6d968e7a
|
File details
Details for the file rusty_dawg-0.2.2-cp310-cp310-macosx_11_0_arm64.whl.
File metadata
- Download URL: rusty_dawg-0.2.2-cp310-cp310-macosx_11_0_arm64.whl
- Upload date:
- Size: 450.5 kB
- Tags: CPython 3.10, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
648eb80a664b9788382075b4a3f61e44eb001981732213010cb753f88157599c
|
|
| MD5 |
0e6d340c4d962f231624d5fc6cb3961b
|
|
| BLAKE2b-256 |
02a27fbc919e3f2f7d13fcc413a990d0108dcde4de1c4fed46893ac3b507a3c5
|
File details
Details for the file rusty_dawg-0.2.2-cp310-cp310-macosx_10_12_x86_64.whl.
File metadata
- Download URL: rusty_dawg-0.2.2-cp310-cp310-macosx_10_12_x86_64.whl
- Upload date:
- Size: 482.8 kB
- Tags: CPython 3.10, macOS 10.12+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d25dfe727e4ec3093c8956a816c6a0c7dfecbf635373ebe468b885f834a2faa5
|
|
| MD5 |
ed376141f443076e18fa56c2fef2f145
|
|
| BLAKE2b-256 |
5aefe0d6e85e1c07110ca03efa179b2611c1043993ffb61a4714db3fffa432f6
|