# How to get the list of all fruits that begin with the letter m?

**URL:** <https://community.wolfram.com/t/how-to-get-the-list-of-all-fruits-that-begin-with-the-letter-m/1977>\
**Category:** Questions\
**Tags:** data-science, wolfram-alpha\
**Created:** [April 15, 2014, 10:38am UTC](https://community.wolfram.com/t/how-to-get-the-list-of-all-fruits-that-begin-with-the-letter-m/1977 "2014-04-15T10:38:16Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![route66h](https://yyz1.discourse-cdn.com/wolfram/user_avatar/community.wolfram.com/route66h/32/34715_2.png) [@route66h](https://community.wolfram.com/u/route66h)\
**Post date:** [April 15, 2014, 10:38am UTC](https://community.wolfram.com/t/how-to-get-the-list-of-all-fruits-that-begin-with-the-letter-m/1977/1 "2014-04-15T10:38:16Z")

</div>

How to get the list of all fruits that begin with the letter m? (using Wolfram Alpha)  
In SQL the query would be something like:

```auto
SELECT names FROM fruits WHERE names like "m%"; 

```

I wonder if there’s some way I can do this using Wolfram Alpha?  
Result will be like this: Mango, Mandarin, Marachino, …, etc.

---

<div class="post-metadata">

**Author:** ![sblinder](https://yyz1.discourse-cdn.com/wolfram/user_avatar/community.wolfram.com/sblinder/32/17861_2.png) [@sblinder](https://community.wolfram.com/u/sblinder)\
**Post date:** [April 15, 2014, 5:59pm UTC](https://community.wolfram.com/t/how-to-get-the-list-of-all-fruits-that-begin-with-the-letter-m/1977/2 "2014-04-15T17:59:20Z")

</div>

Input “edible fruit” in Wolfram Alpha and expand list using more. Need to press “more” twice to get to names beginning in m.

---

<div class="post-metadata">

**Author:** ![route66h](https://yyz1.discourse-cdn.com/wolfram/user_avatar/community.wolfram.com/route66h/32/34715_2.png) [@route66h](https://community.wolfram.com/u/route66h)\
**Post date:** [April 15, 2014, 8:00pm UTC](https://community.wolfram.com/t/how-to-get-the-list-of-all-fruits-that-begin-with-the-letter-m/1977/3 "2014-04-15T20:00:03Z")

</div>

It works. But is there a way to filter those names to view only those that start with the letter “m”? I’m interested in ability of WolframAlpha to make exact queries like SQL does.

---

<div class="post-metadata">

**Author:** ![shenghuiy](https://yyz1.discourse-cdn.com/wolfram/user_avatar/community.wolfram.com/shenghuiy/32/36073_2.png) [@shenghuiy](https://community.wolfram.com/u/shenghuiy)\
**Post date:** [April 15, 2014, 10:06pm UTC](https://community.wolfram.com/t/how-to-get-the-list-of-all-fruits-that-begin-with-the-letter-m/1977/4 "2014-04-15T22:06:04Z")

</div>

Use the WolframAlpha API in Mathematica give you the result:

```auto
data = WolframAlpha["edible Fruits", {{"Hyponym:WordData", 1}, "ComputableData"}, 
 PodStates -> {"Hyponym:WordData __More", "Hyponym:WordData__ More", "Hyponym:WordData __More", "Hyponym:WordData__ More"}]

```

Filter the result:

```auto
In[27]:= Cases[data,x_/;StringMatchQ[x,"m"~~__]]
Out[27]= {mamey,mammee,mammee apple,mango,mangosteen,marang,marmalade plum,medlar,melon,mombin,monstera}

```

If you work with Python well, you can follow [this link](https://wolfram.discourse.group/t/1894/1) to create a list from the wolfram alpha API in general.

---

<div class="post-metadata">

**Author:** ![szhorvat](https://yyz1.discourse-cdn.com/wolfram/user_avatar/community.wolfram.com/szhorvat/32/3531_2.png) [@szhorvat](https://community.wolfram.com/u/szhorvat)\
**Post date:** [April 16, 2014, 1:55pm UTC](https://community.wolfram.com/t/how-to-get-the-list-of-all-fruits-that-begin-with-the-letter-m/1977/5 "2014-04-16T13:55:50Z")

</div>

Is it possible to do this with a single call to WordData (which doesn’t need an internet connection once the data is downloaded)?

I can do it like this, but this looks more complicated than necesary:

```auto
data = Join @@ (WordData /@ WordData[]);
Cases[data, {_, "Noun", "EdibleFruit"}]

```

Some fruit, such as apple or pear, appear under “FalseFruit” but not “EdibleFruit”.

---

<div class="post-metadata">

**Author:** ![halemichaeljr](https://yyz1.discourse-cdn.com/wolfram/user_avatar/community.wolfram.com/halemichaeljr/32/22773_2.png) [@halemichaeljr](https://community.wolfram.com/u/halemichaeljr)\
**Post date:** [April 17, 2014, 12:46am UTC](https://community.wolfram.com/t/how-to-get-the-list-of-all-fruits-that-begin-with-the-letter-m/1977/6 "2014-04-17T00:46:51Z")

</div>

Wikipedia has a more complete listing if you’re interested.  
[Culinary fruits starting with “M”](https://en.wikipedia.org/wiki/List_of_culinary_fruits#M)
