The extension includes four tabs:
-
Definition
- Search for a word
- Select a word in your browser, and opening the extension will display its definition
- Listen to its pronunciation by pressing the speech synthesis volume icon
- Mark words as favorites
-
Favourite
- View and manage your favorite words
- Remove words from the favorites list
- Click on a word to see its definition, which will redirect you to the Definition tab
-
Word of the Day
- Discover a new word every day as this tab retrieves the daily word from
word-of-the-day.json
- Discover a new word every day as this tab retrieves the daily word from
-
Settings
- Case sensitivity checkbox
- Translation checkbox
searching for normal words with their respective meanings: same word but with case sensitivity on, showcasing different meanings: non-existent word in the english dictionary, without and with translation on: other different tabs:
To install all dependencies, run:
npm install
Download the JSONL data for all word senses in the English dictionary (≈2GB) and rename it to english-dictionary.json
Once downloaded, place it in the following directory: backend/dictionary/
To run the server, execute the following command:
node .\server.js
Note: Make sure you're in the backend
directory to run the command.
You will need Node.js installed to be able to run the server.
In the browser, go to chrome://extensions/
, click on Load unpacked
(Developer mode must be on) and select the word-definition-extension
folder.
The extension should be loaded successfully. You might need to click the puzzle icon to see it!
To run all tests, execute:
npm test
To run a specific test, use:
npm test -- --testNamePattern="name of the test here"
You can run the tests within Docker by executing the following script:
.\run-tests.bat
Note: Make sure you're in the backend\scripts
directory to run the script.
The script is only compatible with Windows because it is a .bat
file.