Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/c-cube/spelll

fuzzy string searching, using Levenshtein automaton. Can be used for spell-checking.
https://github.com/c-cube/spelll

levenshtein-automaton ocaml spell-check

Last synced: 3 months ago
JSON representation

fuzzy string searching, using Levenshtein automaton. Can be used for spell-checking.

Awesome Lists containing this project

README

        

# Spelll [![build](https://github.com/c-cube/spelll/actions/workflows/main.yml/badge.svg)](https://github.com/c-cube/spelll/actions/workflows/main.yml)

Fuzzy string searching, using Levenshtein automaton. Can be used for spell-checking.

API documentation can be found [here](http://c-cube.github.io/spelll/),
and the source code [here](https://github.com/c-cube/spelll).

Some examples:

```ocaml
# #require "spelll";;
# let dfa = Spelll.of_string ~limit:1 "hello";;
val dfa : Spelll.automaton =
# Spelll.match_with dfa "hell";;
- : bool = true
# Spelll.match_with dfa "hall";;
- : bool = false
# let idx = Spelll.Index.of_list ["hello", "world"; "hall", "vestibule"];;
val idx : string Spelll.Index.t =
# Spelll.Index.retrieve_l idx ~limit:1 "hell" ;;
- : string list = ["world"; "vestibule"]
# Spelll.Index.retrieve_l idx ~limit:1 "hall" ;;
- : string list = ["vestibule"]
```

## License

This software is free, under the BSD-2 license. See the LICENSE file.

## Build

You only need OCaml (>= 4.02 should be enough) and `dune` and `seq`. Type

```
$ make
$ make install
```