Skip to content

Starting from a text, it extracts the most important concepts and puts them into shapes.

Notifications You must be signed in to change notification settings

ffranchina/memory-distilled

Repository files navigation

Memory Distilled - Trasformatorio 2017 Project

Memory Distilled is a Python script that extracts the most used words from a text and places them into a shaped wordcloud.

The concept behind

This project starts in the bosom of the artistic residence of Trasformatorio 2017, to which I was honored to partecipate.

The main idea was to transform the energies and the resources that we found aboundant in Scaletta Zanclea into something to give back.

For days I observed the people, the feelings, the landscapes, the thoughts: an explosion of beauty that was awaking in me lots of forgotten stimuli. Only in the last days, I've suddenly realized that the biggest transformation had occurred inside me thanks to the new experiences I was put into: as a project I wanted to distillate my thoughts as the deepest expression of my inner processes.

I keep a diary in which I record my days and thoughts, that was my starting point.

The process

The starting point was given by the things I wrote down in those days. I've applied to it algorithms of Natural Language Processing to split the text, to bring back the words to their original lemma (basic form) and to compute the frequencies of usage of every single word.

At this stage, I can deduce which are the most dominant concepts reported in my diary. Through algorithms of Sentiment Analisys, I can assign different color to the words that belongs to the neutral, positive or negative semantic field. When it's all set I print them onto the shape of the beautiful castle that has hosted us for 10 days.

The result

Output Trasformatorio 2017 - Francesco Franchina

The technical stuffs

The script it's written for Python3. It requires a couple Python libraries to be installed:

  • Polyglot NLP library very easy and quite sufficient for trivial tasks
  • Wordcloud cool library to generate wordclouds, highly customizable
  • Pillow image library to manipulate the result images

The libraries can be installed typing:

pip3 install polyglot wordcloud pillow

NOTE: Since the script is designed to work exclusively on italian text, polyglot must be instructed to get the proper libraries:

polyglot download sentiment2.it

To generate the image above I've used the following command:

./alembic.py -b castle_background.png -m castle_mask.png memories.txt 

For more usage options check:

./alembic.py --help

Thanks to

  • Trasformatorio
  • Trasformatori
  • Scaletta Zanclea, the place and the inhabitants

Licence

Creative Commons BY-NC.

About

Starting from a text, it extracts the most important concepts and puts them into shapes.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages