Skip to content

Commit

Permalink
levenshtein/regex: move levenshtein, remove regex
Browse files Browse the repository at this point in the history
This is where the Levenshtein automata originally lived. I originally
moved it out of the crate in order to reduce dependencies. But we can
instead just make it an optional feature.

Instead of moving fst-regex back into the crate as well, we instead
recommend using `regex-automata`. `regex-automata` is basically the
productionized version of "compile a regex to a DFA," which is exactly
what we want.
  • Loading branch information
BurntSushi committed Feb 22, 2020
1 parent cb04b44 commit 7098fb8
Show file tree
Hide file tree
Showing 8 changed files with 492 additions and 163 deletions.
6 changes: 3 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,9 @@ license = "Unlicense/MIT"
edition = "2018"

[features]
mmap = ["memmap"]
default = ["mmap"]
mmap = ["memmap"]
levenshtein = ["utf8-ranges"]

[[bench]]
name = "build"
Expand All @@ -33,11 +34,10 @@ bench = true
[dependencies]
byteorder = "1"
memmap = { version = "0.6.0", optional = true }
utf8-ranges = { version = "1", optional = true }

[dev-dependencies]
fnv = "1.0.5"
fst-levenshtein = { version = "0.2", path = "fst-levenshtein" }
fst-regex = { version = "0.2", path = "fst-regex" }
lazy_static = "0.2.8"
quickcheck = { version = "0.7", default-features = false }
rand = "0.5"
Expand Down
4 changes: 2 additions & 2 deletions fst-levenshtein/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
[package]
name = "fst-levenshtein"
version = "0.2.1" #:version
version = "0.3.0" #:version
authors = ["Andrew Gallant <jamslam@gmail.com>"]
description = """
Search finite state transducers with fuzzy queries using Levenshtein automata.
DEPRECATED. Use 'fst' crate with 'levenshtein' feature instead.
"""
documentation = "https://docs.rs/fst-levenshtein"
homepage = "https://github.com/BurntSushi/fst"
Expand Down
4 changes: 2 additions & 2 deletions fst-regex/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
[package]
name = "fst-regex"
version = "0.2.2" #:version
version = "0.3.0" #:version
authors = ["Andrew Gallant <jamslam@gmail.com>"]
description = """
Search finite state transducers with regular expression.
DEPRECATED. Use 'regex-automata' crate with 'fst1' feature instead.
"""
documentation = "https://docs.rs/fst-regex"
homepage = "https://github.com/BurntSushi/fst"
Expand Down
Loading

0 comments on commit 7098fb8

Please sign in to comment.