# Baseform plugin not working for me

**URL:** <https://discuss.elastic.co/t/baseform-plugin-not-working-for-me/16320>\
**Category:** Elasticsearch\
**Created:** [March 12, 2014, 1:33pm UTC](https://discuss.elastic.co/t/baseform-plugin-not-working-for-me/16320 "2014-03-12T13:33:35Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![vineeth\_mohan\_2](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/vineeth_mohan_2/32/747_2.png) [@vineeth\_mohan\_2](https://discuss.elastic.co/u/vineeth_mohan_2)\
**Post date:** [March 12, 2014, 1:33pm UTC](https://discuss.elastic.co/t/baseform-plugin-not-working-for-me/16320/1 "2014-03-12T13:33:35Z")

</div>

Hello ,

I have been trying to make the baseform plugin work , but its not working  
for me.

I tried it with the \_analyse API end point , but rather than giving both  
variants of the word , its giving 2 repetition of the same word.

For eg:

curl -XGET  
'localhost:9200/xyz/\_analyze?tokenizer=letter&filters=baseform&pretty' -d  
'sweltering'  
{  
"tokens" : [ {  
"token" : "sweltering",  
"start\_offset" : 0,  
"end\_offset" : 10,  
"type" : "word",  
"position" : 1  
}, {  
"token" : "sweltering",  
"start\_offset" : 0,  
"end\_offset" : 10,  
"type" : "word",  
"position" : 1  
} ]  
}

Here i was expecting sweltering to be reduced to swelter but sweltering  
has come twice and not the baseform.

I tried this on both 0.90 and 1+ version of elasticsearch and I am seeing  
the same wrong output.

Is there anything wrong in how i have setup the plugin or is it an issue on  
plugin side ?

Thanks  
Vineeth

--  
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/CAGdPd5m4S2UydYTEJeiAp75se%3DK1OB6RQvs1sZRnfaq6NmfGhA%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAGdPd5m4S2UydYTEJeiAp75se%3DK1OB6RQvs1sZRnfaq6NmfGhA%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:** [March 12, 2014, 6:07pm UTC](https://discuss.elastic.co/t/baseform-plugin-not-working-for-me/16320/2 "2014-03-12T18:07:27Z")

</div>

I assume you have correctly set english language as in the example.

The baseform plugin is based on training data for english language, it is  
possible that `sweltering` is not recognized.

You can add missing words to the training data file in the plugin source

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

and recompile. Patches are welcome!

Jörg

On Wed, Mar 12, 2014 at 2:33 PM, vineeth mohan [vm.vineethmohan@gmail.com](mailto:vm.vineethmohan@gmail.com)wrote:

> Hello ,
> 
> I have been trying to make the baseform plugin work , but its not working  
> for me.
> 
> I tried it with the \_analyse API end point , but rather than giving both  
> variants of the word , its giving 2 repetition of the same word.
> 
> For eg:
> 
> curl -XGET  
> 'localhost:9200/xyz/\_analyze?tokenizer=letter&filters=baseform&pretty' -d  
> 'sweltering'  
> {  
> "tokens" : [ {  
> "token" : "sweltering",  
> "start\_offset" : 0,  
> "end\_offset" : 10,  
> "type" : "word",  
> "position" : 1  
> }, {  
> "token" : "sweltering",  
> "start\_offset" : 0,  
> "end\_offset" : 10,  
> "type" : "word",  
> "position" : 1  
> } ]  
> }
> 
> Here i was expecting sweltering to be reduced to swelter but sweltering  
> has come twice and not the baseform.
> 
> I tried this on both 0.90 and 1+ version of elasticsearch and I am seeing  
> the same wrong output.
> 
> Is there anything wrong in how i have setup the plugin or is it an issue  
> on plugin side ?
> 
> Thanks  
> Vineeth

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

---

<div class="post-metadata">

**Author:** ![vineeth\_mohan\_2](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/vineeth_mohan_2/32/747_2.png) [@vineeth\_mohan\_2](https://discuss.elastic.co/u/vineeth_mohan_2)\
**Post date:** [March 12, 2014, 6:49pm UTC](https://discuss.elastic.co/t/baseform-plugin-not-working-for-me/16320/3 "2014-03-12T18:49:59Z")

</div>

Hello Joerg ,

I have taken an example from the txt fine you have pointed . I am still  
seeing the same -  
Kindly check

curl -XGET  
'localhost:9200/relations/\_analyze?tokenizer=letter&filters=baseform&pretty'  
-d 'sweets'  
{  
"tokens" : [ {  
"token" : "sweets",  
"start\_offset" : 0,  
"end\_offset" : 6,  
"type" : "word",  
"position" : 1  
}, {  
"token" : "sweets",  
"start\_offset" : 0,  
"end\_offset" : 6,  
"type" : "word",  
"position" : 1  
} ]  
}

Thanks  
Vineeth

On Wed, Mar 12, 2014 at 11:37 PM, [joergprante@gmail.com](mailto:joergprante@gmail.com) \<  
[joergprante@gmail.com](mailto:joergprante@gmail.com)\> wrote:

> I assume you have correctly set english language as in the example.
> 
> The baseform plugin is based on training data for english language, it is  
> possible that `sweltering` is not recognized.
> 
> You can add missing words to the training data file in the plugin source
> 
> [https://github.com/jprante/elasticsearch-analysis-baseform/blob/master/src/main/resources/en-lemma-utf8.txt](https://github.com/jprante/elasticsearch-analysis-baseform/blob/master/src/main/resources/en-lemma-utf8.txt)
> 
> and recompile. Patches are welcome!
> 
> Jörg
> 
> On Wed, Mar 12, 2014 at 2:33 PM, vineeth mohan [vm.vineethmohan@gmail.com](mailto:vm.vineethmohan@gmail.com)wrote:
> 
> > Hello ,
> > 
> > I have been trying to make the baseform plugin work , but its not working  
> > for me.
> > 
> > I tried it with the \_analyse API end point , but rather than giving both  
> > variants of the word , its giving 2 repetition of the same word.
> > 
> > For eg:
> > 
> > curl -XGET  
> > 'localhost:9200/xyz/\_analyze?tokenizer=letter&filters=baseform&pretty' -d  
> > 'sweltering'  
> > {  
> > "tokens" : [ {  
> > "token" : "sweltering",  
> > "start\_offset" : 0,  
> > "end\_offset" : 10,  
> > "type" : "word",  
> > "position" : 1  
> > }, {  
> > "token" : "sweltering",  
> > "start\_offset" : 0,  
> > "end\_offset" : 10,  
> > "type" : "word",  
> > "position" : 1  
> > } ]  
> > }
> > 
> > Here i was expecting sweltering to be reduced to swelter but sweltering  
> > has come twice and not the baseform.
> > 
> > I tried this on both 0.90 and 1+ version of elasticsearch and I am seeing  
> > the same wrong output.
> > 
> > Is there anything wrong in how i have setup the plugin or is it an issue  
> > on plugin side ?
> > 
> > Thanks  
> > Vineeth

--  
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/CAGdPd5%3Dv5infdCUY49aNSZErqkQ-aYijXBq4ViVhD77K83igYA%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAGdPd5%3Dv5infdCUY49aNSZErqkQ-aYijXBq4ViVhD77K83igYA%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:43am UTC](https://discuss.elastic.co/t/baseform-plugin-not-working-for-me/16320/4 "2017-07-06T01:43:43Z")

</div>


