https://github.com/viig99/symspellcpppy
Fast SymSpell written in c++ and exposes to python via pybind11
https://github.com/viig99/symspellcpppy
compound-words fuzzy-matching fuzzy-search pybind11 python spell-check spellcheck spelling spelling-correction spelling-corrector symspell text-segmentation word-segmentation
Last synced: 6 months ago
JSON representation
Fast SymSpell written in c++ and exposes to python via pybind11
- Host: GitHub
- URL: https://github.com/viig99/symspellcpppy
- Owner: viig99
- License: apache-2.0
- Created: 2020-09-25T17:59:16.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2025-03-02T01:50:50.000Z (7 months ago)
- Last Synced: 2025-04-02T02:18:33.086Z (6 months ago)
- Topics: compound-words, fuzzy-matching, fuzzy-search, pybind11, python, spell-check, spellcheck, spelling, spelling-correction, spelling-corrector, symspell, text-segmentation, word-segmentation
- Language: C++
- Homepage: https://symspellcpppy.readthedocs.io
- Size: 8.31 MB
- Stars: 42
- Watchers: 5
- Forks: 7
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# SymSpellCppPy
A Fast SymSpell v6.5 port for python written in C++ using pybind11.



## Installation
```shell script
pip install --upgrade SymSpellCppPy
```## Documentation
* Check [examples](https://symspellcpppy.readthedocs.io/en/latest/Examples.html) for provided usage.
* Check [api docs](https://symspellcpppy.readthedocs.io/en/latest/SymSpellCppPy.html#pybind11-binding-for-symspellpy) for detailed API documentation.
* Check `tests/SymSpellCppPyTest.py` for extended api usage.## Benchmark Results
Run on AMD 5900x
```shell script
pip install pytest pytest-benchmark symspellpy SymSpellCppPy
pytest benchmark.py --benchmark-compare
```
## Development
```shell script
git clone git@github.com:viig99/SymSpellCppPy.git
cd SymSpellCppPy
mkdir -p build && cd build
cmake .. -DCMAKE_BUILD_TYPE=Release
make -j$(nproc)
```### Testing
### Python Bindings
### Build
```shell script
python3 setup.py build
```### Test
#### Python tests
```shell script
python3 setup.py test
```#### C++ tests
For detailed list of command line test flags please refer to [Catch 2 Docs](https://github.com/catchorg/Catch2/blob/master/docs/command-line.md#top)
```shell script
cd build
./Catch2Test -s
```## Acknowledgements
* [SymSpell by @wolfgarbe](https://github.com/wolfgarbe/SymSpell)
* [SymspellCPP by @AtheS21](https://github.com/AtheS21/SymspellCPP)