An application with multiple entrypoints to perform synonym-related tasks.
This project is a personal playground in Scala to try out different libraries and techniques.
The server can be started by executing the following command:
bloop run http
The following endpoints are supported:
- Check if two words are synonyms
GET /synonyms?words=foo&words=bar[&thesaurus=datamuse]
- List synonyms for a given word
GET /synonyms/foo[?thesaurus=datamuse]
Command line invocation supports the following commands:
- Check if two words are synonyms
bloop run cli --args check [--args '--format=json'] --args house --args pad
- List synonyms for a given word
bloop run cli --args list [--args '--format=json'] [--args '--source|-s datamuse'] --args bar
The app currently supports the following thesauruses:
- Cambridge (
cambridge
) - Datamuse (
datamuse
) - Merriam-Webster (
merriamwebster
) - PowerThesaurus (
powerthesaurus
) - WordHippo (
wordhippo
)
Default is all thesauruses.
bloop test core cli http
sbt http/Docker/publishLocal