https://github.com/mfbx9da4/word-tree
https://github.com/mfbx9da4/word-tree
Last synced: about 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/mfbx9da4/word-tree
- Owner: mfbx9da4
- Created: 2015-03-26T02:59:19.000Z (about 10 years ago)
- Default Branch: master
- Last Pushed: 2016-04-12T14:58:26.000Z (about 9 years ago)
- Last Synced: 2025-01-26T17:45:46.134Z (4 months ago)
- Language: HTML
- Homepage: http://mfbx9da4.github.io/projects/Word-tree/static/
- Size: 3.33 MB
- Stars: 0
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: Readme.md
Awesome Lists containing this project
README
# Word prefix tree and anagram solver
### [Demo](http://mfbx9da4.github.io/projects/Word-tree/static/)
### Aim
Often people learning a foreign language have problems remembering the difference between similarly spelt or similarly sounding words.
This project aims to help people disambiguate similarly spelt words.### Run
Run a server (using e.g. `ws` or `python -m SimpleHTTPServer`) in the root folder and visit [http://localhost:8000/static](http://localhost:8000/static)### Method
- `words.py` generates `tree.json` and `anagrams.json`.
- `tree.json` contains a letter by letter prefix tree (trie) of all the words in the dictionary.
- `anagrams.json` contains all angrams in the dictionary, indexed by the sorted strings.
- `main.js` loads `tree.json` and `anagrams.json` into memory.
- `index.html` contains a recursive template for displaying the tree.
- Selecting a word causes a request to the wikipedia API and consults the anagrams dict.
- Also note I used some CSS3 flexbox magic, so I hope your browser supports that.