Sentence finder: my first Django project

During the last few months, I have been captivated by Django and its rich set of features. I have been learning a few different technologies recently, including Django and Flask. I have been using Web2py for the last 3 years, and while I still use it for several projects and consider it a very stable and mature framework, I wanted to try out other frameworks to do web stuff in Python.

Today I have finished with the first effort to decouple everything in my website and make separate Django apps as much as possible: In Django's terminology, an application is a set of files that should do something. A good practice among the Django community is to separate apps to make them as independent as possible, for example, in my website I have different applications together:

Advantages of aving alot of applications instead just a folder with alot of files are that you can edit, modify or even remove any of these applications at any time, or add other new applications, without having to touch a single line of the others. You just would have to create a new app, add it to the project, and you will be done .

Sentence finder

Today I have created a simple, but totally independent, Django application. Its name is Sentence Finder, is available at my Gitlab instance and it has been designed to help me studying Russian phrases, but later I have extended it to support English and Spanish too. It imports a very big list of sentences (over 2 Millions for the 3 supported languages so far) from the Tatoeba project and shows the results containing the words entered in a search form.

Results are divided in pages of 100 sentences per page, and you can click the link generated in every result to hear the sentence, of course spoken in the language selected when searching.

I have a few plans for more features to add to this application, though I like how it works right now, I think it may be useful to others and in case someone is wanting to learn Django, I think that may be helpful. I have tried to follow the best practices I was able to follow with the time I had for the project, and ideally it will be improved in future with more tasks (perhaps speech to text recognition in the results, interactive exercise generation with phrases, verb conjugations and what not?).

If you want to see a demo of this Django application, you can go to the sentence finder section in my website to see it in action. Also, visit the Source code repository

Add Comment

Share

Share in Facebook
Share in Twitter

Change language