talash: Line oriented fast enough text search

[ gpl, library, program, search, tui ] [ Propose Tags ]

This library provides searching a large number of candidates against a query using a given style. Two styles are provided. The default is orderless style in which a match occurs if the words in the query all occur in the candidate regardless of the order of their occurrence. A fuzzy style is also provided in which a candidate matches if all the characters of the query occur in it in order.

There is also a TUI searcher/selector interface provided using a brick app. Like an extremely barebones version of fzf and mostly intended to be a starting point that has to be configured according to the needs or else it can be embedded into other applications to provide a selection interface.

There is also a piped searcher/seeker provided in which searcher runs in the background and can be used by a seeker communicating with it using named pipes.

The is also a demo executable for both the brick app and piped version that gets the candidates for the stdin. Use talash help for usage information.

Some care has been taken to make the searcher performant. The nice string matching interface provided by alfred-margaret is responsible for a big part of the performance. While vector-sized is responsible for most of memory efficieny. Performance can potentially be further improved by using all the cores but it is good enough for my typical use cases of searching among a few thousand or at most a few tens of thousands of candidates. As a result parallel matching is unlikely to be implemented.

The package is lightly maintained, bugs reports are welcome but any action on them will be slow. Patches are welcome for 1. bugfixes 2. simple performance improvements 3. Adding mouse bindings to tui 4. New search styles, especially a better fuzzy one, that matches each word in the query fuzzily but the words themselves can be matched in any order (I am not sure what is a sensible implementation of this).

Downloads

Maintainer's Corner

Package maintainers

For package maintainers and hackage trustees

Candidates

  • No Candidates
Versions [RSS] 0.1.0.0, 0.1.0.1, 0.1.1.0, 0.1.1.1, 0.3.0
Change log CHANGELOG.md
Dependencies alfred-margaret (>=2.0 && <2.1), base (>=4.10.1 && <5), bitvec, brick (>=1.0 && <1.2), bytestring (>=0.10.8 && <0.12), colorful-monoids (>=0.2.1 && <0.3), containers, directory, extra, ghc-compact (>=0.1.0 && <0.3), io-streams, microlens (>=0.4.0 && <0.5), microlens-th (>=0.4.0 && <0.5), mtl, primitive, safe, talash, text (>=2.0 && <2.1), unix (>=2.7.2 && <2.8), unordered-containers (>=0.2.9 && <0.3), vector (>=0.12.1 && <0.13), vector-algorithms (>=0.8.0.3 && <0.9), vector-sized (>=1.4.0 && <1.5), vector-th-unbox, vty (>=5.36) [details]
License GPL-3.0-only
Author Rahguzar
Maintainer rahguzar@zohomail.eu
Category search, tui
Home page https://github.com/aikrahguzar/talash
Bug tracker https://github.com/aikrahguzar/talash/issues
Uploaded by rahguzar at 2022-09-25T12:09:38Z
Distributions NixOS:0.3.0
Executables talash
Downloads 393 total (7 in the last 30 days)
Rating (no votes yet) [estimated by Bayesian average]
Your Rating
  • λ
  • λ
  • λ
Status Docs available [build log]
Last success reported on 2022-09-25 [all 1 reports]