text-metrics: Calculate various string metrics efficiently

[ algorithms, bsd3, library, text ] [ Propose Tags ] [ Report a vulnerability ]

Calculate various string metrics efficiently.


[Skip to Readme]

Modules

[Index] [Quick Jump]

Flags

Manual Flags

NameDescriptionDefault
dev

Turn on development settings.

Disabled

Use -f <flag> to enable a flag, or -f -<flag> to disable that flag. More info

Downloads

Maintainer's Corner

Package maintainers

For package maintainers and hackage trustees

Candidates

  • No Candidates
Versions [RSS] 0.1.0, 0.2.0, 0.3.0, 0.3.1, 0.3.2, 0.3.3
Change log CHANGELOG.md
Dependencies base (>=4.15 && <5), containers (>=0.5 && <0.8), primitive (>=0.9 && <0.10), text (>=0.2 && <2.2), vector (>=0.11 && <0.14) [details]
Tested with ghc ==9.6.3, ghc ==9.8.2, ghc ==9.10.1
License BSD-3-Clause
Author Mark Karpov <markkarpov92@gmail.com>
Maintainer Mark Karpov <markkarpov92@gmail.com>
Category Text, Algorithms
Home page https://github.com/mrkkrp/text-metrics
Bug tracker https://github.com/mrkkrp/text-metrics/issues
Source repo head: git clone https://github.com/mrkkrp/text-metrics.git
Uploaded by mrkkrp at 2024-09-28T19:05:43Z
Distributions Arch:0.3.2, Debian:0.3.0, Fedora:0.3.2, LTSHaskell:0.3.2, NixOS:0.3.2, Stackage:0.3.3
Reverse Dependencies 12 direct, 16 indirect [details]
Downloads 17871 total (168 in the last 30 days)
Rating 2.0 (votes: 1) [estimated by Bayesian average]
Your Rating
  • λ
  • λ
  • λ
Status Docs available [build log]
Last success reported on 2024-09-28 [all 1 reports]

Readme for text-metrics-0.3.3

[back to package description]

Text Metrics

License BSD3 Hackage Stackage Nightly Stackage LTS CI

The library provides efficient implementations of various strings metric algorithms. It works with strict Text values.

The current version of the package implements:

Comparison with the edit-distance package

There is edit-distance package whose scope overlaps with the scope of this package. The differences are:

  • edit-distance allows to specify costs for every operation when calculating Levenshtein distance (insertion, deletion, substitution, and transposition). This is rarely needed though in real-world applications, IMO.

  • edit-distance only provides Levenshtein distance, text-metrics aims to provide implementations of most string metrics algorithms.

  • edit-distance works on Strings, while text-metrics works on strict Text values.

Implementation

Although we originally used C for speed, currently all functions are pure Haskell tuned for performance. See this blog post for more info.

Contribution

Issues, bugs, and questions may be reported in the GitHub issue tracker for this project.

Pull requests are also welcome.

License

Copyright © 2016–present Mark Karpov

Distributed under BSD 3 clause license.