{"id":17614158,"url":"https://github.com/gsarti/svevo-letters-analysis","last_synced_at":"2025-10-15T02:02:14.186Z","repository":{"id":109885009,"uuid":"166678818","full_name":"gsarti/svevo-letters-analysis","owner":"gsarti","description":"Topic Modeling and Sentiment Analysis on Italo Svevo Epistolary Corpus","archived":false,"fork":false,"pushed_at":"2019-05-13T14:09:30.000Z","size":12049,"stargazers_count":7,"open_issues_count":0,"forks_count":4,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-05-08T03:15:29.509Z","etag":null,"topics":["data-science","digital-humanities","dssc","italian","italian-nlp","italo-svevo","machine","machine-learning","nlp","nlproc","research-project","sentiment-analysis","text-mining","topic-modeling","university-of-trieste"],"latest_commit_sha":null,"homepage":"","language":"Jupyter Notebook","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/gsarti.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-01-20T15:48:26.000Z","updated_at":"2021-06-03T08:55:06.000Z","dependencies_parsed_at":"2023-04-10T11:32:33.399Z","dependency_job_id":null,"html_url":"https://github.com/gsarti/svevo-letters-analysis","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gsarti%2Fsvevo-letters-analysis","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gsarti%2Fsvevo-letters-analysis/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gsarti%2Fsvevo-letters-analysis/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gsarti%2Fsvevo-letters-analysis/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gsarti","download_url":"https://codeload.github.com/gsarti/svevo-letters-analysis/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252990004,"owners_count":21836668,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["data-science","digital-humanities","dssc","italian","italian-nlp","italo-svevo","machine","machine-learning","nlp","nlproc","research-project","sentiment-analysis","text-mining","topic-modeling","university-of-trieste"],"created_at":"2024-10-22T18:25:17.435Z","updated_at":"2025-10-15T02:02:14.099Z","avatar_url":"https://github.com/gsarti.png","language":"Jupyter Notebook","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Svevo Letters Analysis\n\n## News\n\n* The project was presented at [2019 AILC Lectures on Computational Linguistics](http://www.ai-lc.it/lectures-2019-it/)! The poster created for the presentation is available [here](https://github.com/gsarti/svevo-letters-analysis/blob/master/svevo_poster.pdf).\n\n## Description\n\nThe purpose of this research project is to analyze the epistolary corpus of [Italo Svevo](https://en.wikipedia.org/wiki/Italo_Svevo), one of the great italian novelists of the twentieth century and a pioneer of the psychological novel in Italy. The analysis were performed on the corpus created by Cristina Fenu as final project work for the [Masters in Digital Humanities](https://www.unive.it/pag/9180/) of Università Ca' Foscari of Venice during academic year 2015-2016.\n\nResults of the first analysis were published in the proceedings of the [2017 AIUCD Conference](http://amsacta.unibo.it/5885/1/AIUCD_2017_BoA.pdf) and are available on the website of the [Svevian Museum of Trieste](http://www.museosveviano.it/ar/progetto/archivio-digitale/ ).\n\nThe analysis was structured in two parts:\n\n- __Topic modeling__ of the italian corpus using latent Dirichlet allocation to extract the main topics contained in the corpus and estimate their association with interlocutors in time.\n\n- __Sentiment analysis__ of the whole corpus using the Word-Emotion Association Lexicon (EmoLex) by [Mohammad \u0026 al.](https://aclanthology.info/pdf/W/W10/W10-0204.pdf) to highlight relations between emotive states, topics and interlocutors through time.\n\nThis repository is structured as follows:\n\n- The `datasets` folder contains the original letter corpus, and is the location where all subsequent datasets used for our purposes are saved. **New:** Added positive/negative sentiment italian wordlist for recurrent words connotation analysis.\n\n- The `results` folder contain plots describing our findings and evaluating the performance of our LDA model in svg and png format.\n\n- The `topic_modeling` notebook contains all the code I used to perform my topic modeling analysis. In the end, it produces a `svevo_with_topics.csv` file containing topics assigned to each letter. Only the 500 italian letters with most separated topics are taken into account.\n\n- The `sentiment_analysis_extraction` notebook generates a `sentiment.csv` file containing the sentiment intensity percentage for all the letters in the original corpus.\n\n- The `sentiment_analysis_evaluation` notebook creates many additional datasets used to evaluate and plot our results.\n\n- **New:** The `recurrent_words_connotation_analysis` notebook is used to inspect which words are the cause of most positive/negative sentiment over Svevo lifespan.\n\n- The `future_perspectives` notebook contains approaches that were tested for the analysis and finally disregarded for their complexity or their results, but definitely deserve a second look for future utilization.\n\n## Requirements\n\nIn order for all the notebooks to work properly, the following requirements should be met.\n\n**Warning:** The last part of future perspective notebook will not function out-of-the-box. See additional requirements below and notebook for more information on this topic.\n\n### Python packages\n\n- `numpy`\n- `pandas`\n- `gensim`\n- `spacy`\n- `sklearn`\n- `pyLDAvis`\n- `matplotlib`\n- `seaborn`\n- `tqdm`\n\nSimply run `pip install -r requirements.txt` inside this folder to automatically install all dependencies.\n\nFor the spacy package, the languages should be installed as follows:\n\n`python -m spacy download en`\n\n`python -m spacy download fr`\n\n`python -m spacy download it`\n\n`python -m spacy download de`\n\n### R packages\n\n- `syuzhet`\n- `dplyr`\n- `pander`\n\nRun `install.packages(\"syuzhet\", \"dplyr\", \"pander\")` inside a R shell.\n\n### Additional requirements for Future Perspectives notebook\n\nThe set of italian embeddings necessary to test the Word2Vec approach in `future_perspectives` is available on the [Italian NLP Lab](http://www.italianlp.it/resources/italian-word-embeddings/) website.\n\n## Results\n\nA short report of the research project has been updated and is available! The last section contains a textual description of our findings. For a visual understanding, please refer to the results folder.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgsarti%2Fsvevo-letters-analysis","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgsarti%2Fsvevo-letters-analysis","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgsarti%2Fsvevo-letters-analysis/lists"}