MathGroup Archive 2009

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Accessing Dictionary definitions

  • To: mathgroup at smc.vnet.net
  • Subject: [mg100177] Re: Accessing Dictionary definitions
  • From: "Sjoerd C. de Vries" <sjoerd.c.devries at gmail.com>
  • Date: Wed, 27 May 2009 04:07:22 -0400 (EDT)
  • References: <gvdr7e$730$1@smc.vnet.net>

In[100]:= Cases[
 WordData["*",
  "Lookup"], _?(! FreeQ[WordData[#, "Definitions"], "VarietyMeat"] &)]

Out[100]= {"brain", "heart", "liver", "tongue", "tripe"}

This finds all words the definitions of which contain the string
"VarietyMeat". However, it does not find words that have "VarietyMeat"
as a substring in its definition string.

If that is desired you could use:

Cases[WordData["*",
  "Lookup"], _?(!
     FreeQ[WordData[#, "Definitions"],
      x_ /; StringQ[x] && ! StringFreeQ[x, "VarietyMeat"]] &)]


Cheers -- Sjoerd

On May 25, 12:17 pm, Lincoln sievable <bricl... at gmail.com> wrote:
> Can anyone guide whether Mathematica, can return words that have
> common elements in their Definitions ?  For example, WordData["liver",
> "Definitions"] shows" liver" has been given a definition that includes
> {"liver", "Noun", "VarietyMeat"}.  Is there a way to, for example,
> return all words that are "VarietyMeat" ?



  • Prev by Date: Re: uncomplete NDSOlve results
  • Next by Date: Re: seems I broke the FE of V7
  • Previous by thread: Re: Accessing Dictionary definitions
  • Next by thread: Function of a function problem