The datamuse Reference Manual

Table of Contents

Next: , Previous: , Up: (dir)   [Contents][Index]

The datamuse Reference Manual

This is the datamuse Reference Manual, version 1.0, generated automatically by Declt version 3.0 "Montgomery Scott" on Mon Dec 02 10:06:34 2019 GMT+0.


Next: , Previous: , Up: Top   [Contents][Index]

1 Introduction

#+TITLE: datamuse

A library wrapping version 1.1 of the [[https://www.datamuse.com/api/][Datamuse API]].

From the Datamuse site:

#+BEGIN_QUOTE
The Datamuse API is a word-finding query engine for developers. You can use it in your apps to find words that match a given set of constraints and that are likely in a given context. You can specify a wide variety of constraints on meaning, spelling, sound, and vocabulary in your queries, in any combination.

The API gives you programmatic access to most of the functionality of Datamuse's websites, including OneLook, RhymeZone, Rimar.io, and WikSearch.
#+END_QUOTE

Datamuse very generously allows up to 100,000 queries per day without an API key. Thus no setup is needed for this library. Just ~quickload~ it and go! :)

* Exported symbols

- function ~words~ - Get a list of words matching a query

- function ~words*~ - Get a list of words and their metadata matching a query

- function ~suggestions~ - Get a list of suggestions to a query string

- function ~suggestions*~ - Get a list of suggestions to a query string and their metadata

- symbol ~+words-query-parameters+~ - Alist mapping ~words~ and ~words*~ parameter names to the equivalent parameter name in Datamuse's API

Please see the docstrings for each symbol and the [[http://www.datamuse.com/api/][Datamuse API documentation]] for more information.

* Similar libraries

- [[https://github.com/phoe/wordnet][wordnet]]


Next: , Previous: , Up: Top   [Contents][Index]

2 Systems

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


Previous: , Up: Systems   [Contents][Index]

2.1 datamuse

Author

modula t.

License

MIT

Description

Common Lisp library for accessing the Datamuse word-finding API

Version

1.0

Dependencies
Source

datamuse.asd (file)

Components

Next: , Previous: , Up: Top   [Contents][Index]

3 Files

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


Previous: , Up: Files   [Contents][Index]

3.1 Lisp


Next: , Previous: , Up: Lisp files   [Contents][Index]

3.1.1 datamuse.asd

Location

datamuse.asd

Systems

datamuse (system)


Next: , Previous: , Up: Lisp files   [Contents][Index]

3.1.2 datamuse/package.lisp

Parent

datamuse (system)

Location

package.lisp

Packages

datamuse


Previous: , Up: Lisp files   [Contents][Index]

3.1.3 datamuse/datamuse.lisp

Dependency

package.lisp (file)

Parent

datamuse (system)

Location

datamuse.lisp

Exported Definitions

Next: , Previous: , Up: Top   [Contents][Index]

4 Packages

Packages are listed by definition order.


Previous: , Up: Packages   [Contents][Index]

4.1 datamuse

Source

package.lisp (file)

Use List

common-lisp

Exported Definitions

Next: , Previous: , Up: Top   [Contents][Index]

5 Definitions

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


Previous: , Up: Definitions   [Contents][Index]

5.1 Exported definitions


Next: , Previous: , Up: Exported definitions   [Contents][Index]

5.1.1 Constants

Constant: +words-query-parameters+

Alist mapping ‘words’ parameter names to the API’s query parameter names.

See https://www.datamuse.com/api/ for a detailed explanation of the API.

See also: ‘words’, ‘words*’

Package

datamuse

Source

datamuse.lisp (file)


Previous: , Up: Exported definitions   [Contents][Index]

5.1.2 Functions

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).

Examples:

;; (suggestions "jack of")
=> ("jack of all trades" "jack off" "jack of the buttery" "jack of all trades and master of none" "back off" "back office" "jack frost" "jack o lantern" "jack-of-all-trades")

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

Package

datamuse

Source

datamuse.lisp (file)

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 (file)

Function: words &rest PARAMETERS

Perform a query to the Datamuse API’s /words endpoint as described at https://www.datamuse.com/api/ , to get a list of words matching the query specified.

Each keyword argument maps to one of the endpoint’s query parameters via the ‘+words-query-parameters+’ alist. They are defined in this function in the same order they are defined in the API documentation, so refer to that for a detailed explanation of each.

Note that this function returns just a list of words. To get all the results including 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 "f" and end with "uck":
;; (words :spelling "f*uck")

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

Package

datamuse

Source

datamuse.lisp (file)

Function: words* &rest PARAMETERS

Perform a query to the Datamuse API’s /words endpoint as described at https://www.datamuse.com/api/ .

Each keyword argument maps to one of the endpoint’s query parameters via the ‘+words-query-parameters+’ alist. They are defined in this function in the same order they are defined in the API documentation, so refer to that for a detailed explanation of each.

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

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

Package

datamuse

Source

datamuse.lisp (file)


Previous: , Up: Top   [Contents][Index]

Appendix A Indexes


Next: , Previous: , Up: Indexes   [Contents][Index]

A.1 Concepts

Jump to:   D   F   L  
Index Entry  Section

D
datamuse.asd: The datamuse․asd file
datamuse/datamuse.lisp: The datamuse/datamuse․lisp file
datamuse/package.lisp: The datamuse/package․lisp file

F
File, Lisp, datamuse.asd: The datamuse․asd file
File, Lisp, datamuse/datamuse.lisp: The datamuse/datamuse․lisp file
File, Lisp, datamuse/package.lisp: The datamuse/package․lisp file

L
Lisp File, datamuse.asd: The datamuse․asd file
Lisp File, datamuse/datamuse.lisp: The datamuse/datamuse․lisp file
Lisp File, datamuse/package.lisp: The datamuse/package․lisp file

Jump to:   D   F   L  

Next: , Previous: , Up: Indexes   [Contents][Index]

A.2 Functions

Jump to:   F   S   W  
Index Entry  Section

F
Function, suggestions: Exported functions
Function, suggestions*: Exported functions
Function, words: Exported functions
Function, words*: Exported functions

S
suggestions: Exported functions
suggestions*: Exported functions

W
words: Exported functions
words*: Exported functions

Jump to:   F   S   W  

Next: , Previous: , Up: Indexes   [Contents][Index]

A.3 Variables

Jump to:   +  
C  
Index Entry  Section

+
+words-query-parameters+: Exported constants

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

Jump to:   +  
C  

Previous: , Up: Indexes   [Contents][Index]

A.4 Data types

Jump to:   D   P   S  
Index Entry  Section

D
datamuse: The datamuse system
datamuse: The datamuse package

P
Package, datamuse: The datamuse package

S
System, datamuse: The datamuse system

Jump to:   D   P   S