🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Sign inDemoInstall
Socket

github.com/quells/shakespeare-autocomplete

Package Overview
Dependencies
Alerts
File Explorer
Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

github.com/quells/shakespeare-autocomplete

v0.0.0-20200807153758-0f8dde9d6ad3
Source
Go
Version published
Created
Source

Shakespeare Autocomplete

Search through the collected works of Shakespeare (or any other large file).

Results are ordered by frequency and limited to the top 25 matches.

Non-word entities (like numbers) are ignored, although edge cases such as roman numerals are not.

Usage

Build web server:

$ go build ./cmd/auto

Run web server:

$ ./auto shakespeare.txt

Query web server:

$ curl 'http://localhost:5000/autocomplete?term=ha'

have
hath
had
hand
hast
has
ham
hands
hang
half
ha
happy
hard
hate
haste
having
hastings
hark
hair
hamlet
harry
hadst
harm
hail
happiness

See the documents in artifacts for example results for various queries.

If you run the executable from this directory, you can visit http://localhost:5000 to see a minimal website consuming this API.

FAQs

Package last updated on 07 Aug 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts