All Projects → praktiskt → nlg-markovify-api

praktiskt / nlg-markovify-api

Licence: other
An API built on Plumber (R) utilizing Markovify, a Python package, wrapped in markovifyR (R). It builds a Markov Chain-model based on text (user input) and generates new text based on the model.

Programming Languages

r
7636 projects
shell
77523 projects

Projects that are alternatives of or similar to nlg-markovify-api

Discord-Study-Bot
Discord-Study-Bot is a Study-Time-based leaderboard system in discord servers. This features an Overall leaderboard and leaderboards based on a Daily, Weekly, and Monthly basis.
Stars: ✭ 20 (+5.26%)
Mutual labels:  heroku
telemirror
Telegram forwarder from channels via Telegram Client API (telethon)
Stars: ✭ 66 (+247.37%)
Mutual labels:  heroku
buildpacks-ruby
An experimental Cloud Native Buildpack for Ruby
Stars: ✭ 15 (-21.05%)
Mutual labels:  heroku
representable
We’re creating maps of communities to fight for fair representation. Add your community to the map today and make your voice heard.
Stars: ✭ 14 (-26.32%)
Mutual labels:  heroku
Tasks
Simple tasks & notes manager written in PHP, jQuery and Bootstrap using a custom flat file database.
Stars: ✭ 102 (+436.84%)
Mutual labels:  heroku
ai-image-recognition-web
Derin Öğrenme Kütüphanesi Keras ile Python Flask Web Framework Üzerinde Nesne Tanıma Uygulaması - https://vision-image-classify.herokuapp.com/
Stars: ✭ 24 (+26.32%)
Mutual labels:  heroku
NadekoBot
This is fork of the original NadekoBot, the general purpose of this fork is to make it work on Heroku cloud. Microsoft Sql Server and PostgreSQL edition.
Stars: ✭ 17 (-10.53%)
Mutual labels:  heroku
teller
Cloud native secrets management for developers - never leave your command line for secrets.
Stars: ✭ 998 (+5152.63%)
Mutual labels:  heroku
telegram-bot-tutorial
Telegram bot tutorial using python and flask
Stars: ✭ 44 (+131.58%)
Mutual labels:  heroku
plaxt
Webhooks based Trakt.tv scrobbling for Plex
Stars: ✭ 20 (+5.26%)
Mutual labels:  heroku
wikiHow paper list
A paper list of research conducted based on wikiHow
Stars: ✭ 25 (+31.58%)
Mutual labels:  natural-language-generation
pack-images
Recipies for building Heroku's Cloud Native Buildpacks builder images
Stars: ✭ 32 (+68.42%)
Mutual labels:  heroku
ChartTheStockMarket
🔥 📈 💸 Chart the Stock Market - FCC Challenge
Stars: ✭ 39 (+105.26%)
Mutual labels:  heroku
sinatras-skeleton
Basic Sinatra Skeleton MVC CRUD App with Sprockets, Warden, ActiveRecord and PostgresQL
Stars: ✭ 13 (-31.58%)
Mutual labels:  heroku
honeyku
A Heroku-based web honeypot that can be used to create and monitor fake HTTP endpoints (i.e. honeytokens).
Stars: ✭ 56 (+194.74%)
Mutual labels:  heroku
quirrel.dev
Quirrel Landing Page & Console
Stars: ✭ 41 (+115.79%)
Mutual labels:  heroku
IsSeptaFcked
Real-time status for Philadelphia Regional Rail
Stars: ✭ 47 (+147.37%)
Mutual labels:  heroku
django-kcproject-starter
Kickstart Coding's Django Project Starter Template
Stars: ✭ 14 (-26.32%)
Mutual labels:  heroku
akamai-collector
Akamai sensor data collector with API and database support!
Stars: ✭ 60 (+215.79%)
Mutual labels:  heroku
TextFeatureSelection
Python library for feature selection for text features. It has filter method, genetic algorithm and TextFeatureSelectionEnsemble for improving text classification models. Helps improve your machine learning models
Stars: ✭ 42 (+121.05%)
Mutual labels:  natural-language-generation

nlg-markovify-api

An API built on Plumber (R) utilizing Markovify, a Python package, wrapped in markovifyR (R). It builds a Markov Chain-model based on text (user input) and generates new text based on the model.

General

The API is hosted on a free instance on Heroku. If left unused for 30 minutes it will automatically shut down, making the initial call take a couple of extra seconds (for the container to boot up again).

Usage

The API is available here: https://nlg-markovify-api.herokuapp.com/

All documentation is available in the Swagger docs.

Routes

GET /

Returns status=OK and should be used for starting the Heroku instance / checking if it's up.

POST /generate

The main route for generating new sentences based on input.

Requires input_sentences: A character vector of sentences for the model to learn from.

Many more parameters are available and documented in the Swagger docs, including maximum_sentence_length and sentences_to_generate.

Example (R-code)

# Get 40 pages of tweets (~800 tweets).
tweets = tweetDumpR::get_tweets_fast("hadleywickham", 40)$text

# Build JSON-body. Ask API to generate 2 sentences.
body = jsonlite::toJSON(
  list(
    input_sentences = tweets, 
    sentences_to_generate = 2
  )
)

# Make request, store parsed response as `content`.
content = httr::content(
  httr::POST(
    url = "https://nlg-markovify-api.herokuapp.com/generate", 
    body = body
  )
)

Returns

content

$generated
$generated[[1]]
[1] "R is your last chance to process and write about my reflections on rstudio::conf."

$generated[[2]]
[1] "I'm a free-agent data scientist, statistician, analyst, scientist, machine learner ...?"

Credits

Markovify: https://github.com/jsvine/markovify

R wrapper functions for Markovify: https://github.com/abresler/markovifyR

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].