项目作者: hppRC

项目描述 :
🤖 Automatic uzimaru bot projects🤖
高级语言: Python
项目地址: git://github.com/hppRC/ujimaru.git
创建时间: 2020-05-25T03:29:37Z
项目社区:https://github.com/hppRC/ujimaru

开源协议:

下载


Ujimaru (Happy Birthday uzimaru0000)

This project is a twitter bot like @uzimaru0000

projects:

  • Twitter Client (Rust, Kuon)
  • Twitter Crawler (Go, anaconda)
  • Ujimaru API (Python, flask)
  • Ujimaru Markov Experiment(Python, NLP)
  • Ujimaru Markov Model (Python, NLP)
  • Ujimaru Reformer (Python, NLP)

Twitter Client

Twitter client implementations for @ujimaru0000

Written in Rust. (Using Kuon)

TL;DR

Just below.

  1. let api: kuon::TwitterAPI = get_api_client().await?;
  2. let endpoint = &std::env::var("UJIMARU_API")?;
  3. let text = reqwest::get(endpoint).await?.text().await?;
  4. api.tweet(&text).await?;

Twitter Crawler

Twitter crawler to collect tweets of Uzimaru and other users.

Written in Go. (Using anaconda)

Ujimaru API

Text generation API for ujimaru.

Written in Python. (Using markovify and ujimaru-markov-model)

This is a flask application, and deployed on the Cloud Run.

Ujimaru Markov Experiment

Implementations and experiments.

  • build Markov models
  • dump models as JSON
  • cleansing texts
  • library usage tests

Ujimaru Markov Model

An easy ujimaru(uzimaru0000 like) text generator library.

PyPI: ujimaru-markov-model

This library generates text using a third-order Markov chain.

  1. pip install ujimaru-markov-model

Usage

  1. # On CLI
  2. ujimaru
  3. # へーー自然を撮るならいいってことか(それはそうなんだけど普通のRTになってるって!

or

  1. # In a Python program
  2. # load model (model included).
  3. from ujimaru_markov_model import Ujimaru
  4. ujimaru = Ujimaru()
  5. print(ujimaru.make_sentence())
  6. # なんでかElmでCLI作って得られた知見をいくつかqiitaとかにいれておいてcpすることにします!!
  7. print(ujimaru.make_tweet()) # A sentence of 140 characters or less
  8. # 検索しても無限にredux-thunkが出てきて「なっっっっつ」ってなったけど0.1.0のtagを打ったらちゃんとブランチ分けます

Ujimaru Reformer

A text generation program by reformer and sentencepiece.

see below

Caution

This program will use your computer resources extremely.
You should use Google Colaboratory to run this model.