# Determine if search term is a noun?

**URL:** <https://discuss.elastic.co/t/determine-if-search-term-is-a-noun/19501>\
**Category:** Elasticsearch\
**Created:** [August 27, 2014, 8:10pm UTC](https://discuss.elastic.co/t/determine-if-search-term-is-a-noun/19501 "2014-08-27T20:10:18Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Eric\_Greene](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/eric_greene/32/1312_2.png) [@Eric\_Greene](https://discuss.elastic.co/u/Eric_Greene)\
**Post date:** [August 27, 2014, 8:10pm UTC](https://discuss.elastic.co/t/determine-if-search-term-is-a-noun/19501/1 "2014-08-27T20:10:18Z")

</div>

Wondering if there is a way to determine if search terms are nouns.

Could some sort of dictionary list be put together and stored, then gives  
some weight to items in this list?

Anyone ever done anything such as this?

--  
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/77141403-c119-49c2-9952-ca98e60252b0%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/77141403-c119-49c2-9952-ca98e60252b0%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![Ivan](https://avatars.discourse-cdn.com/v4/letter/i/df788c/32.png) [@Ivan](https://discuss.elastic.co/u/Ivan)\
**Post date:** [August 27, 2014, 9:09pm UTC](https://discuss.elastic.co/t/determine-if-search-term-is-a-noun/19501/2 "2014-08-27T21:09:44Z")

</div>

This process is easier (but still not easy) if you pre-process your data on  
the client side at indexing time. You can mark your terms with their  
respective Parts of Speech using a payload filter:

> **[Elasticsearch Platform — Find real-time answers at scale](https://www.elastic.co)**
>
> Power insights and outcomes with the Elasticsearch Platform and AI. See into your data and find answers that matter with enterprise solutions designed to help you build, observe, and protect. Try Elasticsearch free today.

You can then access the payload via scripts and calculate a score  
accordingly:

> **[Elasticsearch Platform — Find real-time answers at scale](https://www.elastic.co)**
>
> Power insights and outcomes with the Elasticsearch Platform and AI. See into your data and find answers that matter with enterprise solutions designed to help you build, observe, and protect. Try Elasticsearch free today.

Using payloads is more common in Lucene, but I have never seen anyone do it  
in Elasticsearch.

--  
Ivan

On Wed, Aug 27, 2014 at 1:10 PM, Eric Greene [ericdgreene@gmail.com](mailto:ericdgreene@gmail.com) wrote:

> Wondering if there is a way to determine if search terms are nouns.
> 
> Could some sort of dictionary list be put together and stored, then gives  
> some weight to items in this list?
> 
> Anyone ever done anything such as this?
> 
> --  
> 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/77141403-c119-49c2-9952-ca98e60252b0%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/77141403-c119-49c2-9952-ca98e60252b0%40googlegroups.com)  
> [https://groups.google.com/d/msgid/elasticsearch/77141403-c119-49c2-9952-ca98e60252b0%40googlegroups.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/77141403-c119-49c2-9952-ca98e60252b0%40googlegroups.com?utm_medium=email&utm_source=footer)  
> .  
> For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

--  
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/CALY%3DcQDH2Eo2yw8FpHoqU-xLHKQKG%3D3j%3DEFVsVdxHkY9OVa-jg%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CALY%3DcQDH2Eo2yw8FpHoqU-xLHKQKG%3D3j%3DEFVsVdxHkY9OVa-jg%40mail.gmail.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![jprante](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jprante/32/44941_2.png) [@jprante](https://discuss.elastic.co/u/jprante)\
**Post date:** [August 27, 2014, 9:56pm UTC](https://discuss.elastic.co/t/determine-if-search-term-is-a-noun/19501/3 "2014-08-27T21:56:43Z")

</div>

In my plugin

> **[GitHub - jprante/elasticsearch-analysis-baseform: Baseform lemmatization for...](https://github.com/jprante/elasticsearch-analysis-baseform)**
>
> Baseform lemmatization for Elasticsearch. Contribute to jprante/elasticsearch-analysis-baseform development by creating an account on GitHub.

I also provide an english noun file

[https://github.com/jprante/elasticsearch-analysis-baseform/blob/master/src/main/resources/baseform/en-nouns-lemma-utf8.txt?raw=true](https://github.com/jprante/elasticsearch-analysis-baseform/blob/master/src/main/resources/baseform/en-nouns-lemma-utf8.txt?raw=true)

so with a bit of modification of the FST in the analysis, you could create  
a tagger for english nouns (or more precisely, for the words in the given  
file).

Then, like Ivan said, with the delimited token filter and function score,  
it would be possible to implement english noun boosting.

Jörg

On Wed, Aug 27, 2014 at 11:09 PM, Ivan Brusic [ivan@brusic.com](mailto:ivan@brusic.com) wrote:

> This process is easier (but still not easy) if you pre-process your data  
> on the client side at indexing time. You can mark your terms with their  
> respective Parts of Speech using a payload filter:
> 
> [Elasticsearch Platform — Find real-time answers at scale | Elastic](http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/analysis-delimited-payload-tokenfilter.html)
> 
> You can then access the payload via scripts and calculate a score  
> accordingly:
> 
> [Elasticsearch Platform — Find real-time answers at scale | Elastic](http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/modules-advanced-scripting.html#_term_positions_offsets_and_payloads)
> 
> Using payloads is more common in Lucene, but I have never seen anyone do  
> it in Elasticsearch.
> 
> --  
> Ivan
> 
> On Wed, Aug 27, 2014 at 1:10 PM, Eric Greene [ericdgreene@gmail.com](mailto:ericdgreene@gmail.com)  
> wrote:
> 
> > Wondering if there is a way to determine if search terms are nouns.
> > 
> > Could some sort of dictionary list be put together and stored, then gives  
> > some weight to items in this list?
> > 
> > Anyone ever done anything such as this?
> > 
> > --  
> > 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/77141403-c119-49c2-9952-ca98e60252b0%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/77141403-c119-49c2-9952-ca98e60252b0%40googlegroups.com)  
> > [https://groups.google.com/d/msgid/elasticsearch/77141403-c119-49c2-9952-ca98e60252b0%40googlegroups.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/77141403-c119-49c2-9952-ca98e60252b0%40googlegroups.com?utm_medium=email&utm_source=footer)  
> > .  
> > For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).
> 
> --  
> 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/CALY%3DcQDH2Eo2yw8FpHoqU-xLHKQKG%3D3j%3DEFVsVdxHkY9OVa-jg%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CALY%3DcQDH2Eo2yw8FpHoqU-xLHKQKG%3D3j%3DEFVsVdxHkY9OVa-jg%40mail.gmail.com)  
> [https://groups.google.com/d/msgid/elasticsearch/CALY%3DcQDH2Eo2yw8FpHoqU-xLHKQKG%3D3j%3DEFVsVdxHkY9OVa-jg%40mail.gmail.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/CALY%3DcQDH2Eo2yw8FpHoqU-xLHKQKG%3D3j%3DEFVsVdxHkY9OVa-jg%40mail.gmail.com?utm_medium=email&utm_source=footer)  
> .
> 
> For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

--  
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/CAKdsXoGKJgcxMpyf5RThhLOb1jK9JcS-vJB0jRjLxkXn1JqhiA%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAKdsXoGKJgcxMpyf5RThhLOb1jK9JcS-vJB0jRjLxkXn1JqhiA%40mail.gmail.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<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:05am UTC](https://discuss.elastic.co/t/determine-if-search-term-is-a-noun/19501/4 "2017-07-06T01:05:55Z")

</div>


