# Obtaining TF-IDF score per each word in one doc

**URL:** <https://discuss.elastic.co/t/obtaining-tf-idf-score-per-each-word-in-one-doc/20579>\
**Category:** Elasticsearch\
**Created:** [November 5, 2014, 1:02pm UTC](https://discuss.elastic.co/t/obtaining-tf-idf-score-per-each-word-in-one-doc/20579 "2014-11-05T13:02:39Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Min\_Cha](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/min_cha/32/1131_2.png) [@Min\_Cha](https://discuss.elastic.co/u/Min_Cha)\
**Post date:** [November 5, 2014, 1:02pm UTC](https://discuss.elastic.co/t/obtaining-tf-idf-score-per-each-word-in-one-doc/20579/1 "2014-11-05T13:02:39Z")

</div>

Hello.

As a title, I would like to obtain TF-IDF score per each word in one doc.

For example

If there is a DOC-A as following,  
Hello world. World is best.

I would like to obtain an output as following.  
WORD SCORE  
world 0.9  
hello 0.87  
best 0.7

Can you have any idea?  
Thanks for reading.

--  
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/eec4331d-0c50-4f9e-82b9-aba133f0df4a%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/eec4331d-0c50-4f9e-82b9-aba133f0df4a%40googlegroups.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:** [November 5, 2014, 1:28pm UTC](https://discuss.elastic.co/t/obtaining-tf-idf-score-per-each-word-in-one-doc/20579/2 "2014-11-05T13:28:39Z")

</div>

Hello Min ,

Use the explain flag -

> **[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.

Thanks  
Vineeth

On Wed, Nov 5, 2014 at 6:32 PM, Min Cha [minslovey@gmail.com](mailto:minslovey@gmail.com) wrote:

> Hello.
> 
> As a title, I would like to obtain TF-IDF score per each word in one doc.
> 
> For example
> 
> If there is a DOC-A as following,  
> Hello world. World is best.
> 
> I would like to obtain an output as following.  
> WORD SCORE  
> world 0.9  
> hello 0.87  
> best 0.7
> 
> Can you have any idea?  
> Thanks for reading.
> 
> --  
> 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/eec4331d-0c50-4f9e-82b9-aba133f0df4a%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/eec4331d-0c50-4f9e-82b9-aba133f0df4a%40googlegroups.com)  
> [https://groups.google.com/d/msgid/elasticsearch/eec4331d-0c50-4f9e-82b9-aba133f0df4a%40googlegroups.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/eec4331d-0c50-4f9e-82b9-aba133f0df4a%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/CAGdPd5nEQH1mphFvrb56awey1StjPueTP7%3DcreFuO3-fYhUrtQ%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAGdPd5nEQH1mphFvrb56awey1StjPueTP7%3DcreFuO3-fYhUrtQ%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, 12:52am UTC](https://discuss.elastic.co/t/obtaining-tf-idf-score-per-each-word-in-one-doc/20579/3 "2017-07-06T00:52:03Z")

</div>


