Filed under Recap

Tags Python NLTK Sentiment analysis Flask SQLAlchemy

On Wednesday, February 4th, our monthly meetup took place at TechHub Riga. Pizza and cookies were provided courtesy of EGlobal, who have a bunch of pythonistas here in Latvia.

To spark new ideas, and get together more often, we have decided to have a monthly workshop at The Mill.


Alberts Pumpurs (@pumours) gave a great overview of the NLTK library in Python. He has shared his presentation here . If you squint, you can read some code examples there.

NLTK is a leading platform for building Python programs to work with human language data. It provides easy-to-use interfaces to over 50 corpora and lexical resources such as WordNet, along with a suite of text processing libraries for classification, tokenization, stemming, tagging, parsing, and semantic reasoning. Good starting points would be NLTK Wiki and the NLTK online book, which contains a lot of examples.

When working with Latvian language material, you have to create your own lexical resources, like Latvian positive and negative sentiment words. See Adding a Corpus documentation for details.

To fine-tune and choose sample size consult this scikit-learn algorithm cheat-sheet

scikit-learn algorithm cheat-sheet


The evening closed with a discussion about SQLAlchemy sessions when you want to reuse code between interfaces like Flask and console applications. In this use case the Flask-SQLAlchemy extension won't cut it, you have to roll your own code. If you're not careful, this can lead to serious bugs like sharing information between users. So, before writing code involving sessions, RTFM and consult experts. If you are one of the experts, then propose a talk, we would like to hear your opinions and advice.

Upcoming events

Have something to say? Propose a talk.


Python Latvia © Python Latvia Powered by Pelican and Twitter Bootstrap. Icons by Font Awesome and Font Awesome More