Giter Site home page Giter Site logo

carlobeltrame / pfadinamen Goto Github PK

View Code? Open in Web Editor NEW
3.0 3.0 0.0 179.82 MB

Artificial intelligence to generate novel scout names

Home Page: https://pfadinamen.app/

Dockerfile 0.19% Python 17.26% HTML 49.77% JavaScript 19.32% CSS 13.45%
pfadi scouting

pfadinamen's Introduction

Pfadinamen-Generator

This repository contains a char-rnn that was trained with roughly 20000 unique scout/CEVI/Jubla nicknames. It can generate a stream of names, generating novel names that are not in the training set about 74% of the time.

Example generated names:

Auk
Fälge
Truffi
Munti
Joye
Sussi
Pisedondi
Pauba
Giava
Kawela
Nave
Marena
Ahuk
Eboja
Orica
Astian
Sminyra
Tinimi
Krokos
Kirpper

It's not perfect, but usable as inspiration for new names, especially since it's cheap to generate new names.

How to use it:

# Build and run a Docker container for working with the model
docker build -t pfadinamen .
docker run -it --rm -v $(pwd):/app pfadinamen
# Normalize your input file (optional)
# This will print removed lines to stdout and write kept lines to the output file
python normalize.py --input=input.txt --output=input-normalized.txt
# Train the model using a training file in data/input.txt
python train.py --input input-normalized.txt
# Sample from a trained model at a specific epoch
python sample.py 50

Repeat the last command for a new set of 20 names, or add e.g. --len 50 to generate 50 names at a time instead.

Deployment as web service

The trained models are also saved in TensorFlow.js format, which allows to serve the models as static files and use them on the client (in JavaScript in the browser). This repository contains an index.html and index.js file, and can simply be deployed to any static file server. To deploy:

  1. (Optional) Copy model.json and any .bin-files from your own trained model to the public directory
  2. yarn install
  3. yarn run build
  4. Deploy the contents of the dist to your static file server.

The models can also be deployed using Tensorflow serving, since they are also saved in the SavedModel format.

Updating the name explanation list

In regular intervals, pfadinamen.ch publishes newly added and corrected names and explanations. With the permission of the author, we are allowed to fetch them and prepare them in JSON format for offline use in this generator. To fetch the most current explanations, execute yarn run fetch-descriptions.

pfadinamen's People

Contributors

carlobeltrame avatar dependabot[bot] avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  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.