Skip to content

benbarron/trie-auto-completion-engine

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Simple auto-complete engine implementation in golang.

Quick start

$ git clone https://github.com/benbarron/trie-auto-completion-engine
$ cd trie-auto-completion-engine
$ make build 
$ make run 

Initialize a trie

curl -XGET localhost:3000/trie/initialize

Add Words to tree

curl -X POST http://localhost:3000/trie/enroll/:id \
  -H "Content-Type: application/json" \
  --data-binary "@words.json"

Preform autocompletion

curl -X POST http://localhost:3000/trie/search/:id \
  -H "Content-Type: application/json" \
  --data "{\"prefix\":\"A\"}"

Structure of a prefix tree (trie)

img.png

References

About

Simple trie based auto-completion engine implementation in golang.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published