https://github.com/imthaghost/tweetgen
tweetGen generates tweets from any given corpus. The sentences are calculated via a stochastic model describing a sequence of possible events in which the probability of each event depends only on the state attained in the previous event (Markov Chain)
https://github.com/imthaghost/tweetgen
Last synced: over 1 year ago
JSON representation
tweetGen generates tweets from any given corpus. The sentences are calculated via a stochastic model describing a sequence of possible events in which the probability of each event depends only on the state attained in the previous event (Markov Chain)
- Host: GitHub
- URL: https://github.com/imthaghost/tweetgen
- Owner: imthaghost
- Created: 2019-10-21T21:44:33.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2023-06-11T01:06:31.000Z (about 3 years ago)
- Last Synced: 2025-02-11T20:50:58.278Z (over 1 year ago)
- Language: Python
- Homepage:
- Size: 24.5 MB
- Stars: 1
- Watchers: 2
- Forks: 1
- Open Issues: 11
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
tweetGen generates tweets from any given corpus. The sentences are calculated via a stochastic model describing a sequence of possible events in which the probability of each event depends only on the state attained in the previous event (Markov Chain).

### 💻 Prerequisites
What things you need to install the software and how to install them
```bash
- python 3.4+
```
## 🚀 Getting Started
The python modules were configured in a virtual enviornment with `pipenv`:
#### macOS Mojave 10.0+
```bash
# (if you have pipenv installed skip this step)
brew install pipenv
# clone repository
git clone https://github.com/imthaghost/tweetGen
# active the virtual enviornment
pipenv shell
# install modules into virtual environment
pipenv install
# start server
python3 app.py
```
> This also assumes that you have `brew` installed. After cloning the repository in desired directory we run the command `pipenv shell` to initialize and activate our virtual enviornment. Unless specified pipenv will default to whatever virtualenv defaults to. We then allow pipenv to find and install the necessary modules for our server. All modules can be viewed inside the file `Pipfile` under the [packages] section. We then start running the server on port 8080.
#### apt systems Ubuntu, Debian, Mint, Etc
```bash
# install pipenv
sudo pip install pipenv
# clone repository
git clone https://github.com/imthaghost/tweetGen
# active the virtual enviornment
pipenv shell
# install modules into virtual environment
pipenv install
# start flask server
python3 app.py
```
## Built With
- [Flask Micro-Framework](http://flask.palletsprojects.com/en/1.1.x/) - The web framework used
- [Wordcloud](https://pypi.org/project/wordcloud/) - Dependency
## Acknowledgments
- Hat tip to my professor [Alan Davis](https://github.com/neptunius)
- Great way of understanding Vose Alias Method [Keith Schwarz](http://www.keithschwarz.com/darts-dice-coins/)