# Stemming acronyms ending in "s"; keyword marker token filter; minimal english stemmer

**URL:** <https://discuss.elastic.co/t/stemming-acronyms-ending-in-s-keyword-marker-token-filter-minimal-english-stemmer/15362>\
**Category:** Elasticsearch\
**Created:** [January 22, 2014, 4:10pm UTC](https://discuss.elastic.co/t/stemming-acronyms-ending-in-s-keyword-marker-token-filter-minimal-english-stemmer/15362 "2014-01-22T16:10:24Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![loren](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/loren/32/44942_2.png) [@loren](https://discuss.elastic.co/u/loren)\
**Post date:** [January 22, 2014, 4:10pm UTC](https://discuss.elastic.co/t/stemming-acronyms-ending-in-s-keyword-marker-token-filter-minimal-english-stemmer/15362/1 "2014-01-22T16:10:24Z")

</div>

Using the minimal\_english stemmer[http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/analysis-stemmer-tokenfilter.html](http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/analysis-stemmer-tokenfilter.html),  
acronym tokens like "irs" and "nps" get stemmed to "ir" and "np". I can use  
the keyword marker token filter[http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/analysis-keyword-marker-tokenfilter.html](http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/analysis-keyword-marker-tokenfilter.html)to specify a list of acronyms to protect, but I do not know them all in  
advance so I will be constantly tweaking the list and reindexing.

Ideally, I would like to be able to either tell the keyword marker to  
protect tokens 1-4 characters in length, or tell the minimal english  
stemmer to ignore tokens shorter than 5 characters.

Are either of those options possible?

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/e385b457-6eed-4a98-975d-9cf19375c39f%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/e385b457-6eed-4a98-975d-9cf19375c39f%40googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![jpountz](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jpountz/32/45836_2.png) [@jpountz](https://discuss.elastic.co/u/jpountz)\
**Post date:** [January 23, 2014, 9:51pm UTC](https://discuss.elastic.co/t/stemming-acronyms-ending-in-s-keyword-marker-token-filter-minimal-english-stemmer/15362/2 "2014-01-23T21:51:46Z")

</div>

I think it would be nice to support protecting tokens based on their  
length. Maybe you can open an issue about it?

On Wed, Jan 22, 2014 at 5:10 PM, Loren [loren@siebert.org](mailto:loren@siebert.org) wrote:

> Using the minimal\_english stemmer[http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/analysis-stemmer-tokenfilter.html](http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/analysis-stemmer-tokenfilter.html),  
> acronym tokens like "irs" and "nps" get stemmed to "ir" and "np". I can use  
> the keyword marker token filter[http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/analysis-keyword-marker-tokenfilter.html](http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/analysis-keyword-marker-tokenfilter.html)to specify a list of acronyms to protect, but I do not know them all in  
> advance so I will be constantly tweaking the list and reindexing.
> 
> Ideally, I would like to be able to either tell the keyword marker to  
> protect tokens 1-4 characters in length, or tell the minimal english  
> stemmer to ignore tokens shorter than 5 characters.
> 
> Are either of those options possible?
> 
> --  
> You received this message because you are subscribed to the Google Groups  
> "elasticsearch" group.  
> To unsubscribe from this group and stop receiving emails from it, send an  
> email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
> To view this discussion on the web visit  
> [https://groups.google.com/d/msgid/elasticsearch/e385b457-6eed-4a98-975d-9cf19375c39f%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/e385b457-6eed-4a98-975d-9cf19375c39f%40googlegroups.com)  
> .  
> For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

--  
Adrien Grand

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/CAL6Z4j7avbq%2B9f2O1HxMzkwDgEUQXj6%2BThVJs3dCSuQObPZFgA%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAL6Z4j7avbq%2B9f2O1HxMzkwDgEUQXj6%2BThVJs3dCSuQObPZFgA%40mail.gmail.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![loren](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/loren/32/44942_2.png) [@loren](https://discuss.elastic.co/u/loren)\
**Post date:** [January 23, 2014, 10:01pm UTC](https://discuss.elastic.co/t/stemming-acronyms-ending-in-s-keyword-marker-token-filter-minimal-english-stemmer/15362/3 "2014-01-23T22:01:06Z")

</div>

Done!

> <https://github.com/elastic/elasticsearch/issues/4877>
>
> I would like to be able to tell the keyword marker to protect tokens 1-4 charact…ers in length, or tell the minimal english stemmer to ignore tokens shorter than 5 characters.
> 
> Perhaps the more generic thing to have would be a Minimum Length Keyword Marker that could go in front of the other filters.
> 
> Based on discussion at https://groups.google.com/forum/#!msg/elasticsearch/uFlKWq2HvQk/mM8KjaItPH0J

On Thursday, January 23, 2014 1:51:46 PM UTC-8, Adrien Grand wrote:

> I think it would be nice to support protecting tokens based on their  
> length. Maybe you can open an issue about it?
> 
> On Wed, Jan 22, 2014 at 5:10 PM, Loren \<[lo...@siebert.org](mailto:lo...@siebert.org) \<javascript:\>\>wrote:
> 
> > Using the minimal\_english stemmer[http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/analysis-stemmer-tokenfilter.html](http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/analysis-stemmer-tokenfilter.html),  
> > acronym tokens like "irs" and "nps" get stemmed to "ir" and "np". I can use  
> > the keyword marker token filter[http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/analysis-keyword-marker-tokenfilter.html](http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/analysis-keyword-marker-tokenfilter.html)to specify a list of acronyms to protect, but I do not know them all in  
> > advance so I will be constantly tweaking the list and reindexing.
> > 
> > Ideally, I would like to be able to either tell the keyword marker to  
> > protect tokens 1-4 characters in length, or tell the minimal english  
> > stemmer to ignore tokens shorter than 5 characters.
> > 
> > Are either of those options possible?
> > 
> > --  
> > You received this message because you are subscribed to the Google Groups  
> > "elasticsearch" group.  
> > To unsubscribe from this group and stop receiving emails from it, send an  
> > email to [elasticsearc...@googlegroups.com](mailto:elasticsearc...@googlegroups.com) \<javascript:\>.  
> > To view this discussion on the web visit  
> > [https://groups.google.com/d/msgid/elasticsearch/e385b457-6eed-4a98-975d-9cf19375c39f%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/e385b457-6eed-4a98-975d-9cf19375c39f%40googlegroups.com)  
> > .  
> > For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).
> 
> --  
> Adrien Grand

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/cf0b1c2c-55c6-4bc7-a662-752457de7e61%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/cf0b1c2c-55c6-4bc7-a662-752457de7e61%40googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<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:** [July 6, 2017, 1:55am UTC](https://discuss.elastic.co/t/stemming-acronyms-ending-in-s-keyword-marker-token-filter-minimal-english-stemmer/15362/4 "2017-07-06T01:55:05Z")

</div>


