Skip to content

A simple Python program that reads in text from un-punctuated novels and generates a new story based on the frequency of word occurrence in the given material

Notifications You must be signed in to change notification settings

tekgeek88/ai-story-teller

Repository files navigation

Ai Storyteller

What it is

Ai storyteller is a simple standalone Python program that runs from the command line. After selecting some plain text novels to be digested the program builds a trigram language model that is used to generate new stories based on the frequency of words that occur given the previous set of words in proportion to the frequency of their appearance in the given text or text's.

This project was completed as part of the final project for the Introduction to Artificial Intellegence course taught at the University of Washington

The latest version

The current version of this program is written for Python 3.7 due to the usage of Python's new f-string syntax.

Installation

To to use this program begin by opening your favorite terminal program or command prompt on windows machines and navigating to the directory in which the program resides.

Install dependencies

Currently the Natural Language Toolkit is the only dependency and is used to generate the bigram data structure

:~$ pip3 install -r requirements.txt

To run the program type

:~$ python3 main_app.py into your terminal.

Navigating the program

Licensing

Copyright 2016 Carl Argabright

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

   http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Contact

If you have any comments or suggestions please feel free to leave them for me on GitHub

If you need to say something a little more personal feel free to send me an email at carl.argbright@gmail.com

About

A simple Python program that reads in text from un-punctuated novels and generates a new story based on the frequency of word occurrence in the given material

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages