# How to stem adjectives that end with y

**URL:** <https://discuss.elastic.co/t/how-to-stem-adjectives-that-end-with-y/80187>\
**Category:** Elasticsearch\
**Created:** [March 27, 2017, 6:55pm UTC](https://discuss.elastic.co/t/how-to-stem-adjectives-that-end-with-y/80187 "2017-03-27T18:55:29Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![jerolomy](https://avatars.discourse-cdn.com/v4/letter/j/a6a055/32.png) [@jerolomy](https://discuss.elastic.co/u/jerolomy)\
**Post date:** [March 27, 2017, 6:55pm UTC](https://discuss.elastic.co/t/how-to-stem-adjectives-that-end-with-y/80187/1 "2017-03-27T18:55:29Z")

</div>

I want to know how to stem adjectives that end with y (english). For example I want a search of "funky song" to match "funk song" higher than "random song". How do I do that? I have tried a few out-of-the-box stemmers but they are not doing it. So what do you guys do? Or am I doing something wrong and the out-of-the-box stemmers should be handling this?

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [March 27, 2017, 7:25pm UTC](https://discuss.elastic.co/t/how-to-stem-adjectives-that-end-with-y/80187/2 "2017-03-27T19:25:12Z")

</div>

I believe that stemmer or snowball should work.

What does the analyze API is returning ?

---

<div class="post-metadata">

**Author:** ![jerolomy](https://avatars.discourse-cdn.com/v4/letter/j/a6a055/32.png) [@jerolomy](https://discuss.elastic.co/u/jerolomy)\
**Post date:** [March 27, 2017, 7:58pm UTC](https://discuss.elastic.co/t/how-to-stem-adjectives-that-end-with-y/80187/3 "2017-03-27T19:58:25Z")

</div>

Analyzing funky returns:  
`curl -XGET 'localhost:9200/main_search/_analyze' -d ' { "analyzer" : "snowball_analyzer", "text" : "funky" }' {"tokens":[{"token":"funki","start_offset":0,"end_offset":5,"type":"<ALPHANUM>","position":0}]}`

and analyzing funk returns:

`curl -XGET 'localhost:9200/main_search/_analyze' -d ' { "analyzer" : "snowball_analyzer", "text" : "funk" }' {"tokens":[{"token":"funk","start_offset":0,"end_offset":4,"type":"<ALPHANUM>","position":0}]}`

Using stemmer instead of snowball does the same thing.

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [March 27, 2017, 8:12pm UTC](https://discuss.elastic.co/t/how-to-stem-adjectives-that-end-with-y/80187/4 "2017-03-27T20:12:38Z")

</div>

Indeed terms are differents. Not sure why.  
May be funk means something else in English than funky?

May be snowball would produce better results?

[https://www.elastic.co/guide/en/elasticsearch/reference/current/analysis-snowball-tokenfilter.html](https://www.elastic.co/guide/en/elasticsearch/reference/current/analysis-snowball-tokenfilter.html)

---

<div class="post-metadata">

**Author:** ![jerolomy](https://avatars.discourse-cdn.com/v4/letter/j/a6a055/32.png) [@jerolomy](https://discuss.elastic.co/u/jerolomy)\
**Post date:** [March 27, 2017, 8:33pm UTC](https://discuss.elastic.co/t/how-to-stem-adjectives-that-end-with-y/80187/5 "2017-03-27T20:33:02Z")

</div>

This happens also with leak and leaky and both words are used in documents I am indexing ☹ I'll try the snowball filter and not the analyzer and post the results.

---

<div class="post-metadata">

**Author:** ![jerolomy](https://avatars.discourse-cdn.com/v4/letter/j/a6a055/32.png) [@jerolomy](https://discuss.elastic.co/u/jerolomy)\
**Post date:** [March 27, 2017, 9:32pm UTC](https://discuss.elastic.co/t/how-to-stem-adjectives-that-end-with-y/80187/6 "2017-03-27T21:32:20Z")

</div>

Ok, thanks for the suggestion! The Lovins language snowball filter works. Thanks

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [April 24, 2017, 9:32pm UTC](https://discuss.elastic.co/t/how-to-stem-adjectives-that-end-with-y/80187/7 "2017-04-24T21:32:19Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
