View Source Wordnik.Word.Phrases (Wordnik v1.0.0)

phrases that include the selected word

Wordnik Docs

Link to this section Summary

Types

parsed JSON response to get_phrases/2 query

map of optional parameters that can be passed to get_phrases/2 query

Functions

get phrases for requested word

Link to this section Types

@type phrases() :: [
  %{
    count: integer(),
    gram1: String.t(),
    gram2: String.t(),
    mi: integer(),
    wlmi: integer()
  }
]

parsed JSON response to get_phrases/2 query

@type phrases_params() :: %{
  optional(:use_canonical) => boolean(),
  optional(:limit) => integer(),
  optional(:wlmi) => integer()
}

map of optional parameters that can be passed to get_phrases/2 query

Link to this section Functions

Link to this function

get_phrases(word, params \\ %{})

View Source
@spec get_phrases(String.t(), phrases_params()) ::
  {:error, String.t()} | {:ok, phrases()}

get phrases for requested word

parameters

Parameters

  • use_canonical: boolean
  • limit: integer
  • wlmi: string

example

Example

iex> get_phrases("verbose", %{use_canonical: true, limit: 5})

response

Response

t:Word.Phrases.phrases/0

wordnik-docs

Wordnik Docs

https://developer.wordnik.com/docs#!/word/getPhrases