Skip to content

magic-words is trie implementation with json and javascript.

Notifications You must be signed in to change notification settings

amansinh79/magic-words

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Magic-Words

magic-words is a trie implementation with json and javascript.

usage

add words with addWord and remove them with removeWord methods.

alt text

inspect trie

console.log(mw.inspectTrie());

result will be

alt text

JSON

your added strings will be stored in json file and it will be loaded everytime you start the script. it will be in node_module/magic-words/data.json. also don't forget to call mw.save() to save your file in disk after you remove or add words.

alt text

did you mean?

you can autocomplete added words by calling didyoumean method. it will return array of autocompleted words.

alt text

About

magic-words is trie implementation with json and javascript.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published