Remix.run Logo
Show HN: Wosp – advanced full-text search on the command line(github.com)
8 points by atrettel 2 days ago | 2 comments

Hi, I'm Andrew Trettel. I'm a scientist and researcher. I wrote Wosp to help me search local documents using Boolean and proximity operators.

Wosp is a command-line program that performs full-text search on text documents. Wosp stands for word-oriented search and print. It is designed for advanced searchers. It works differently than line-oriented search tools like grep, so it can search for matches spanning multiple lines. Wosp supports an expressive query language that contains both Boolean and proximity operators. It also supports nested queries, truncation, wildcard characters, and fuzzy searching.

The linked GitHub repository contains all of the code to try out the program. I also wrote a blog post (https://www.andrewtrettel.com/blog/wosp/) that discusses my motivations for creating Wosp in more detail, along with some additional technical discussion and diagrams.

If you give Wosp a try, I'd appreciate any comments or feedback you have about the experience.

barren_suricata 3 hours ago | parent [-]

Cool idea, did you come up with your own query language or did you adopt/influence from an existing one?

atrettel 2 hours ago | parent [-]

I developed my own query language influenced by the one used at the United States Patent and Trademark Office (USPTO). Their query language is a implementation of another used in a piece of software called BRS/Search [1]. Most of these kind of query languages are pretty similar and really only differ in how they treat proximity operations and field selection.

I liked the USPTO's query language because it is quite expressive and powerful while still being relatively compact when compared to other query languages [2] out there, but I disliked some of the other syntax in it for that matter. I added several additional operations, including ALONG for lines and AMONG for clauses. The fuzzy search aspect of my language is also unique. I don't know of any other query language that lets searchers specify that locally rather than globally.

[1] https://en.wikipedia.org/wiki/BRS/Search

[2] https://en.wikipedia.org/wiki/Contextual_Query_Language