Skip to main content

Fast subsentence searching

Project description

lacbd

lacbd is a Python library written in Rust that implements the Aho Corasick algorithm for fast subsentence matching of many keywords against one string.

You can find the actual Rust library as nitros12/like-aho-corasick-but-different.

Features

  • Supports arbitrary values associated with each keyword
  • Operates on Unicode word bounds, rather than naïve substring matching
  • Case insensitive
  • 10× faster than an equivalent regex

None of the existing python libraries fit my needs.

License

This library is AGPLv3+ licensed. That may seem like an odd choice for a library. However, doing so ensures that users of this code must make their application open source, even if run as a service (such as in a Discord bot). If you want to use this to make proprietary software, look somewhere else.

Copyright © 2019 Ben Simms and Ben Mintz

This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details.

You should have received a copy of the GNU Affero General Public License along with this program. If not, see https://www.gnu.org/licenses/.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

lacbd-0.2.0.tar.gz (16.1 kB view details)

Uploaded Source

Built Distributions

lacbd-0.2.0-cp38-cp38-manylinux2010_x86_64.whl (107.3 kB view details)

Uploaded CPython 3.8 manylinux: glibc 2.12+ x86-64

lacbd-0.2.0-cp38-cp38-manylinux1_x86_64.whl (107.3 kB view details)

Uploaded CPython 3.8

lacbd-0.2.0-cp37-cp37m-manylinux1_x86_64.whl (201.9 kB view details)

Uploaded CPython 3.7m

lacbd-0.2.0-cp37-cp37m-macosx_10_13_x86_64.whl (98.7 kB view details)

Uploaded CPython 3.7m macOS 10.13+ x86-64

lacbd-0.2.0-cp36-cp36m-manylinux1_x86_64.whl (201.9 kB view details)

Uploaded CPython 3.6m

File details

Details for the file lacbd-0.2.0.tar.gz.

File metadata

  • Download URL: lacbd-0.2.0.tar.gz
  • Upload date:
  • Size: 16.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.35.0 CPython/3.7.4

File hashes

Hashes for lacbd-0.2.0.tar.gz
Algorithm Hash digest
SHA256 31472c93bff9eb52d271628d58757e3106469ba4993c191842a021f1a897887d
MD5 16f3975e11d801a4b3516795cd4fc89a
BLAKE2b-256 6cf9aa8c97d7b1e0043f51eb4d566b4e6c9b72c83aa4b21a96079b32a1074500

See more details on using hashes here.

File details

Details for the file lacbd-0.2.0-cp38-cp38-manylinux2010_x86_64.whl.

File metadata

  • Download URL: lacbd-0.2.0-cp38-cp38-manylinux2010_x86_64.whl
  • Upload date:
  • Size: 107.3 kB
  • Tags: CPython 3.8, manylinux: glibc 2.12+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.6.0 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.7.4

File hashes

Hashes for lacbd-0.2.0-cp38-cp38-manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 e09c54774d933688afa6c8312a03fd07981bd536bc6b0675e0f9e29c8ebe7038
MD5 032ac46922ade9dcf9a83519d09631e5
BLAKE2b-256 db6818c3ac3d1216011f2bd9b40ac132d2a32d3b6faf1efee1e1884d66c5cea1

See more details on using hashes here.

File details

Details for the file lacbd-0.2.0-cp38-cp38-manylinux1_x86_64.whl.

File metadata

  • Download URL: lacbd-0.2.0-cp38-cp38-manylinux1_x86_64.whl
  • Upload date:
  • Size: 107.3 kB
  • Tags: CPython 3.8
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.6.0 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.7.4

File hashes

Hashes for lacbd-0.2.0-cp38-cp38-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 da5475ac88e3b29762b5699d43d9cf176f2f3958bbb5cbfa561354f2e35ee845
MD5 c024a1e08c0b3fd0a1dc07e035eeb3d3
BLAKE2b-256 eb26e2b7dae0ff9fc04c8af7dc94d65d4979164ff90c583fa69cd7af9d66440c

See more details on using hashes here.

File details

Details for the file lacbd-0.2.0-cp37-cp37m-manylinux1_x86_64.whl.

File metadata

  • Download URL: lacbd-0.2.0-cp37-cp37m-manylinux1_x86_64.whl
  • Upload date:
  • Size: 201.9 kB
  • Tags: CPython 3.7m
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.35.0 CPython/3.7.4

File hashes

Hashes for lacbd-0.2.0-cp37-cp37m-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 6836ce0c145cbf58a749c82b798a7a9700c8df28f17d5a39320569c749fdc6ca
MD5 fffc9ac7d86c20359baf151de94c4c01
BLAKE2b-256 641f12a0037d57d3f9356186965b43f65c3d18b266e3b60f617a573a3d1c5bc7

See more details on using hashes here.

File details

Details for the file lacbd-0.2.0-cp37-cp37m-macosx_10_13_x86_64.whl.

File metadata

  • Download URL: lacbd-0.2.0-cp37-cp37m-macosx_10_13_x86_64.whl
  • Upload date:
  • Size: 98.7 kB
  • Tags: CPython 3.7m, macOS 10.13+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.35.0 CPython/3.7.4

File hashes

Hashes for lacbd-0.2.0-cp37-cp37m-macosx_10_13_x86_64.whl
Algorithm Hash digest
SHA256 db439d2e8300cb2b14f5688d0809195c01c537231a19c0fee299978bed41ef25
MD5 70041464f0f502db92058045c9c740c1
BLAKE2b-256 7abb9ecce8325d7fc71c324f7b4824604901d17085c163f2b7bbe91f33dba29f

See more details on using hashes here.

File details

Details for the file lacbd-0.2.0-cp36-cp36m-manylinux1_x86_64.whl.

File metadata

  • Download URL: lacbd-0.2.0-cp36-cp36m-manylinux1_x86_64.whl
  • Upload date:
  • Size: 201.9 kB
  • Tags: CPython 3.6m
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.35.0 CPython/3.7.4

File hashes

Hashes for lacbd-0.2.0-cp36-cp36m-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 dd68804764d41211ea1ba812ebea30d802fe234f1f80b9486dc81eddea6dce43
MD5 ad074f7d390ddb1e87f3a0e483b0e115
BLAKE2b-256 cc56290d73466993fa3f251be90e191a2bfc8f57d0fb0477ca476bae8c5c98cc

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page