Giter Site home page Giter Site logo

d.a.v.e's Introduction

D.A.V.E.

Meet DAVE, the screenwriting bot. DAVE generates formatted screenplays from other screenplays.

Install

pip install davebot

Use

Stanley module

Generate screenplays

DAVE.nlp.Stanley uses all the modules below (except web scraping) to generate formatted screenplays (PDF and plaintext).

Example:

from DAVE.nlp.Stanley import Stanley
characters = ['HAL', 'DAVE', 'Stanley Kubrick', 'Discovery One', 
              'Arthur C. Clarke', 'The Sentinel']
source = ['2001-A-Space-Odyssey.txt', '2012.txt']

director = Stanley(source, characters, destination='output', title='2013', author='DAVE')
director.direct(length=100)

DAVE will create two files in the destination directory: <title>.pdf and <title>.txt.

Scraper module

Scraping Screenplays

DAVE.scraper.DiscoveryOne scrapes from IMSDB using BeautifulSoup

from DAVE.scraper import DiscoveryOne, Sentinel
DiscoveryOne.crawl(path, directory='.', pattern=GENRE):

Parse

DAVE.scraper.Sentinel and parses screenplays into subsections: headings, transitions, actions, parentheticals, and dialogue, to be further prepared into Markov models.

Sentinel.parse(*sources, destination='.', write=True)

Or, parse recursively using Sentinel.parse_directory

Sentinel.parse_directory(source='.', destination='parsed_categories', genre='All')`

NLP module

Serialize markov models

DAVE.nlp.HAL generates Markov chains from the parsed categories made by DAVE.scraper.Sentinel and serializes the models into JSON.

To create the Markov models:

from DAVE.nlp.HAL import HAL
HAL.generate_models(source='parsed_categories', destination='.')

Inspiration

A Space Odyssey

Inspiration from the name D.A.V.E. came from Stanley Kubrick's masterpiece film 2001: A Space Odyssey. The names of this package's modules all reflect characters, creators, texts, and important people involved in A Space Odyssey.

Sunspring

The original inspiration for this project comes from a short science fiction film: Sunspring.

Description (from Ars Technica):

In the wake of Google's AI Go victory, filmmaker Oscar Sharp turned to his technologist collaborator Ross Goodwin to build a machine that could write screenplays. They created "Jetson" and fueled him with hundreds of sci-fi TV and movie scripts. Building a team including Thomas Middleditch, star of HBO's Silicon Valley, they gave themselves 48 hours to shoot and edit whatever Jetson decided to write.

Sunspring Short Film

Click the image above to see the full video.

d.a.v.e's People

Contributors

ded8ird 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.