# Sentence corpus

**URL:** <https://discuss.elastic.co/t/sentence-corpus/7622>\
**Category:** Elasticsearch\
**Created:** [May 9, 2012, 6:58pm UTC](https://discuss.elastic.co/t/sentence-corpus/7622 "2012-05-09T18:58:47Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Hector](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/hector/32/2891_2.png) [@Hector](https://discuss.elastic.co/u/Hector)\
**Post date:** [May 9, 2012, 6:58pm UTC](https://discuss.elastic.co/t/sentence-corpus/7622/1 "2012-05-09T18:58:47Z")

</div>

Hi all,  
I have a collection of sentences from different sources (e.g.  
wikipedia) in different languages (e.g. English, Spanish). Some would  
say it's a multilingual corpus.

I'm currently using Python + MongoDB to store and query these  
sentences, but would like to start exploring elasticsearch. The  
following is a description of my use case (preferably using Python):

(1) Take a bunch of plain text files;  
(2) Do some pre-processing on them to convert each sentence into a  
json representation that elasticsearch would like;  
(3) Be able to control which words in each sentence are actually  
indexed; for example, I don't need stemming, but I might use  
lemmatization at some point, and also I don't need to index numbers;  
(4) Bulk load all these sentences into elasticsearch;  
(5) Create an index (if it's not already there);  
(6) Then be able to search something like "from corpus C, in language  
L, find the set of sentences S that only contain words which are in a  
permissible set of words P".

Does this look like a good opportunity to use elasticsearch? Would you  
please provide pointers for what to do in the previous steps?  
Thanks!  
-- Hector

---

<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, 3:29am UTC](https://discuss.elastic.co/t/sentence-corpus/7622/2 "2017-07-06T03:29:34Z")

</div>


