Giter Site home page Giter Site logo

markovs-species-and-letters's Introduction

Markov species

A quick experiment with Markov chains, where a dictionary of n-grams is built from a list of latin species names. Using a simple Markov model, new species names are then generated. This utility is content-independant, and can be used to generate any kind of sequence of words from a dictionary.

Utilisation

  • build dictionaries from a .csv list of words/sequences of words. --size denotes the maximum size of the n-grams to extract. A separate file will be generated for each n-gram size.

      markov_species build --size=3 path/to/file
    

    Log:

      Generating dictionnary with ngrams of size 2...
      Operation success: true. Dictionnary saved at path Markov Species/export_species_2.txt
      Generating dictionnary with ngrams of size 3...
      Operation success: true. Dictionnary saved at path Markov Species/export_species_3.txt
    
  • generate species and print them to the standard output. --species denotes the number of sequences to generate, --words the number of words in each sequence, and --seed the RNG seed (uses rand48 under the hood).

      markov_species generate --species=5 --words=2 --seed=1234 path/to/dictionary
    

    Log:

      Generating 5 species names with a length of 2 words.
      Detected ngrams of length 3.
      Seed: 1234
      New species: Oophrysosia Fimbophronster
      New species: Alopteristilor Omelanopora
      New species: Unicansonia Effenella
      New species: Cnemiphlox Glaucensis
      New species: Lutraea Exarmosmilneedwardalerhamala
    

About me

More info on my website simonrodriguez.fr and my blog.

markovs-species-and-letters's People

Contributors

kosua20 avatar

Watchers

 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.