Metadata-Version: 2.1
Name: fst_python_bindings
Version: 0.2.0
License-File: LICENSE.md
Summary: Search over large sets of strings
Keywords: fst,levenstein,fsm,search
Author: Hukumka <hukumka212@gmail.com>
Author-email: hukumka212@gmail.com
Maintainer-email: hukumka <hukumka212@gmail.com>
Requires-Python: >=3.8
Description-Content-Type: text/markdown; charset=UTF-8; variant=GFM
Project-URL: repository, https://github.com/hukumka/fst_python_bindings/github.com

# Python bindings to crate [FST](https://github.com/BurntSushi/fst)

For more mature implementation see https://github.com/jbaiter/python-rust-fst

## Motivation

This package is quick workaround for 
https://github.com/BurntSushi/fst/issues/38

In its state as is, it should not be really used, but I would not mind adding missing API, if you fill an issue.

Issue is fixed by throwing faulty levenstein DFA out the window, so performance will suffer. I will try to find time fix actual issue downstream later.

## Installation

TODO

## Usage

```py
from fst_python_bindings import FstMap

items = [
    ('soy', 0),
    ('joy', 2),
    ('godefroy', 3),
    ('godfrey', 3)
]
# Items must be in lexicographical order
items.sort(key=lambda item: item[0])

# Create map instance.
fst_map = FstMap.from_iter()

print(fst_map.search_levenstein('roy', 1))
print(fst_map.search_levenstein('godefrey', 1))
```
