The datamuse Reference Manual

This is the datamuse Reference Manual, version 1.2, generated automatically by Declt version 4.0 beta 2 "William Riker" on Mon Feb 26 16:14:59 2024 GMT+0.

Table of Contents


1 Introduction


2 Systems

The main system appears first, followed by any subsystem dependency.


2.1 datamuse

Common Lisp library for accessing the Datamuse word-finding API

Author

modula t.

Contact

Home Page

https://github.com/defaultxr/datamuse

Source Control

(GIT git@github.com:defaultxr/datamuse.git)

Bug Tracker

https://github.com/defaultxr/datamuse/issues

License

MIT

Version

1.2

Dependencies
  • alexandria (system).
  • drakma (system).
  • yason (system).
Source

datamuse.asd.

Child Components

3 Files

Files are sorted by type and then listed depth-first from the systems components trees.


3.1 Lisp


3.1.1 datamuse/datamuse.asd

Source

datamuse.asd.

Parent Component

datamuse (system).

ASDF Systems

datamuse.


3.1.2 datamuse/package.lisp

Source

datamuse.asd.

Parent Component

datamuse (system).

Packages

datamuse.


3.1.3 datamuse/datamuse.lisp

Dependency

package.lisp (file).

Source

datamuse.asd.

Parent Component

datamuse (system).

Public Interface

4 Packages

Packages are listed by definition order.


4.1 datamuse

Source

package.lisp.

Use List
  • alexandria.
  • common-lisp.
Public Interface

5 Definitions

Definitions are sorted by export status, category, package, and then by lexicographic order.


5.1 Public Interface


5.1.1 Constants

Constant: +words-query-parameters+

Alist mapping ‘words’ and ‘words*’ parameter names to the API’s query parameter names and the official documentation for each. You can also use the ‘parameter-documentation’ function to easily get the documentation for a specific parameter.

See https://www.datamuse.com/api/ for more information about the API.

See also: ‘parameter-documentation’, ‘words’, ‘words*’

Package

datamuse.

Source

datamuse.lisp.


5.1.2 Ordinary functions

Function: parameter-documentation (parameter)

Get the documentation string for the specified parameter of the ‘words’ function.

See also: ‘+words-query-parameters+’, ‘words’, ‘words*’

Package

datamuse.

Source

datamuse.lisp.

Function: suggestions (string &key max vocabulary)

Get a list of suggestions to a partially-type phrase, similar to the auto-suggest feature of some search engines. This function works by querying the Datamuse API’s /sug endpoint as described at https://www.datamuse.com/api/ .

STRING is the input string to generate suggestions for, MAX is the maximum number of results, VOCABULARY is the vocabulary (which defaults to English).

Examples:

;; (dm:suggestions "rei")
=> ("rein" "reiterate" "reign" "reinforce" "reimbursement" "reimburse" "reinstate" "reify" "reins" "reiki")

See also: ‘words’, ‘suggestions*’.

Package

datamuse.

Source

datamuse.lisp.

Function: suggestions* (string &key max vocabulary)

Performs a query to the Datamuse API’s /sug endpoint as described at https://www.datamuse.com/api/ , to get a list of suggestions to partially-typed queries, similar to the auto-suggest feature of some search engines.

STRING is the input string to generate suggestions for, MAX is the maximum number of results, VOCABULARY is the vocabulary (which defaults to English).

See also: ‘suggestions’, ‘words’.

Package

datamuse.

Source

datamuse.lisp.

Function: words (&rest parameters &key meaning sound spelling popular-adjectives popular-nouns synonyms triggers antonyms hypernyms hyponyms holonyms meronyms popular-followers popular-predecessors rhymes approximate-rhymes homophones consonant-match vocabulary topics left-context right-context maximum query-echo)

Get a list of words matching the query specified. See the ‘+words-query-parameters+’ alist or the ‘parameter-documentation’ function for documentation on each parameter. This function works by performing a query to the Datamuse API’s /words endpoint as described at https://www.datamuse.com/api/ .

Note that this function returns just a list of words. To get the full results which include the metadata, use ‘words*’.

Examples:

;; ;; Get a list of words that rhyme with "foobar":
;; (words :rhymes "foobar")

;; ;; Get a list of words that start with "s" and end with "ing":
;; (words :spelling "s*ing")

See also: ‘words*’, ‘parameter-documentation’, ‘+words-query-parameters+’, ‘suggestions’.

Package

datamuse.

Source

datamuse.lisp.

Function: words* (&rest parameters &key meaning sound spelling popular-adjectives popular-nouns synonyms triggers antonyms hypernyms hyponyms holonyms meronyms popular-followers popular-predecessors rhymes approximate-rhymes homophones consonant-match vocabulary topics left-context right-context maximum with-definitions with-parts-of-speech with-syllable-count with-pronunciation with-frequency query-echo)

Get a list of results matching the query specified, including the metadata for each. See the ‘+words-query-parameters+’ alist or the ‘parameter-documentation’ function for documentation on each parameter. This function works by performing a query to the Datamuse API’s /words endpoint as described at https://www.datamuse.com/api/ .

Note that the with-* parameters are simply boolean toggles that set whether specific metadata is included in the results; they don’t actually change which results are returned.

This function includes all of the data returned by the API as alists (i.e. including various metadata for each result). If you just want a list of the words themselves, use ‘words’.

See also: ‘words’, ‘parameter-documentation’, ‘+words-query-parameters+’, ‘suggestions’.

Package

datamuse.

Source

datamuse.lisp.


Appendix A Indexes


A.1 Concepts


A.3 Variables

Jump to:   +  
C  
Index Entry  Section

+
+words-query-parameters+: Public constants

C
Constant, +words-query-parameters+: Public constants