Giter Site home page Giter Site logo

sasafrass / straattaal Goto Github PK

View Code? Open in Web Editor NEW
8.0 3.0 0.0 2.62 MB

Use an RNN to generate Dutch slang and interpret your newly created words!

License: GNU General Public License v2.0

Shell 0.34% Python 80.11% HTML 9.67% Mako 0.63% Jupyter Notebook 8.21% CSS 0.30% Dockerfile 0.74%

straattaal's Introduction

Straattaal

Build Status

Ever wanted to generate new Dutch slang? Look no further! This application makes use of Recurrent Neural Networks trained on a comprehensive database of Dutch slang to generate new slang. Some words may immediately bring up a visceral feeling of what they mean, and this application allows you to provide the community with your interpretation of what the newly created slang means.

Examples

We have several pre-trained models available to generate novel words from multiple classes. The following is a selection of some of our favorite generated words per category. Can you come up with a better meaning for the slang words?

Straattaal

  • rampa: Een grote ramp / A big disaster.
  • joeko: Groot / Big.
  • opjo: Cool / cool.
  • daggie: Een mes / A knife.
  • zittie: Irritant / Annoying.

Plaatsnamen

  • Boschem
  • De Heel
  • Echterberg
  • Zeernenbroek
  • Schoosnijk

Dutch words in general

  • tertokraat
  • gebelenster
  • besteerding
  • verstrijf
  • wulveroeking

How to use?

Instructions on how to run this application locally. If you don't have Postgres set up (with the correct environment variables), it should run a SQLite database with more or less the same functionality. This should be sufficient for testing purposes and making tweaks to the code. Everything in these blocks are considered terminal commands.

  • git clone https://github.com/Sasafrass/straattaal
  • Navigate to the directory where you cloned using your terminal, e.g. cd straattaal
  • Use an environment manager to install the packages: either venv and pip ** python3 -m venv venv or python -m venv venv depending on your Python installation to create a new virtual environment within the working directory. ** source venv/bin/activate to activate your new virtual environment. ** python -m pip install -r requirements.txt or with python3 depending on your Python installation.
  • Or, alternatively, conda: ** conda env create -f environment.yml ** conda activate straattaal
  • flask db upgrade migrate your database to the latest schema.
  • flask run
  • You should now be able to access a fully working local copy at http://localhost:5000

Run with Docker

This project can also be run with Docker in the following way:

  • Create a .env file in the parent directory with the following variables: POSTGRES_USER=<postgres_user> POSTGRES_DB=<postgres_db> POSTGRES_PASSWORD=<postgres_password> PG_PORT=<postgres_port> (standard port is 5432).
    • You should be able to set any combination of POSTGRES_USER, POSTGRES_DB, and POSTGRES_PASSWORD as it will use the same combination for both the environment variables in the server docker container hosting the Flask app as for the Postgres container.
  • Then build and run docker-compose with docker-compose -f docker-compose-dev.yml up --build. This will build a full Docker Compose setup with the (latest) Dockerfile defined in your branch or folder.
  • Database should be mounted to a volume, and thus data should be persisted between container restarts.
  • Navigate to http://127.0.0.1:5000. Your local port 5000 should be forwarded to the Docker Compose network.

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.