Git Product home page Git Product logo

deepcomedy's Introduction

Deep Comedy

Introduction

This project was developed for the Deep Learning course held by professor Andrea Asperti at University of Bologna.

Our goal was to build a neural model capable of producing the correct syllabification of Italian poetry, and using this same model to produce poetry in hendecasyllables in the style of Dante.

We only used the Divine Comedy as training set. For the syllabified version we rely on the outputs of this project from professor Asperti.

Results

We provide three notebooks which explain our model and the results we obtained:

  • Initial syllabification experiments --> contains our first experiments with syllabification using the transformer architecture
  • Char2Char generation and syllabification --> uses a transformer architecture for both syllabification and text generation; as the name suggests, both encoder and decoder work at character-level.
  • Word2Char generation --> we tried to improve the semantics of generated text using a word-level encoder, however the results are only slightly better

You can download the models we trained from this link.

The deepcomedy folder contains the custom libraries we use in the notebooks.

The nlgpoetry folder contains an alternative syllabification algorithm from Neural Poetry. We used this for comparison.

In outputs we provide a syllabification of the "Orlando Furioso" by Ludovico Ariosto, obtained using the Char2Char model.

For a deep dive check the docs folder, which contains a report of our experiments and discoveries.

TODOs:

  • Using a syllable-based decoder for generation
  • Longer training
  • Bigger models :)

Running the code

With poetry

We manage dependencies using poetry.

You can create a virtual environment and install all dependencies using the following poetry command:

poetry install

Then activate the environment with:

poetry shell

Then you should be able to run the notebooks.

Without poetry

We also provide the freezed dependencies in the requirements.txt file. We highly recommend installing them in a virtual environment:

python -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt

Credits

Some of the code is adapted from these sources:

We used Overleaf as the LaTeX editor for the report.

deepcomedy's People

Contributors

alessandropacielli avatar michelalapenna avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.