CL-Remidict
CL-Remidict is a library used to access the WordsAPI API from Common Lisp.
How do I get set up?
CL-Remidict is designed to work with SBCL and ClozureCL. All of its dependencies can be fetched with Quicklisp, though you'll have to build CL-Remidict yourself.
Once you have the dependencies:
- Clone the repository locally where ASDF can find it.
- Use ASDF to load the system inside of your Lisp implementation (e.g.,
(asdf:load-system :cl-remidict)
)
Example usage
(multiple-value-bind (found result-list syllables pronunciation)
(cl-remidict:lookup "documentation" "your-wordsapi-key-here" :word)
(declare (ignore syllables))
(format t "Pronunciation: ~a~%" (cl-remidict:pronunciation-all pronunciation))
(format t "Definitions:~%")
(loop for def across results-list do
(format t " => ~a~%" (cl-remidict:word-result-definition def))))
You can use any of the following for the LOOKUP
function:
:WORD
- Uses the "word" endpoint.:DEFINITION
- Uses thedefinition
endpoint, returning just a definition.:SYNONYMS
- Uses the "synonyms" endpoint.:ANTONYMS
- Uses the "antonyms" endpoint.:EXAMPLES
- Uses the "examples" endpoint.:RHYMES
- Uses the "rhymes" endpoint.:PRONUNCIATION
- Uses the "pronunciation" endpoint.:SYLLABLES
- Uses the "syllables" endpoint.:FREQUENCY
- Uses the "frequency" endpoint.
Contributing
- Clone the Fossil repository.
- Create a new branch for your feature.
- Push locally to the new branch
- Contact me to set up a merge.