Giter Club home page Giter Club logo

screenplay's Introduction

Screenplay Parser

This is a screenplay parser that extracts dialogues between characters. However it extracts the dialogues if the second character has a paranthetical. The scripts are crawled from http://www.imsdb.com/ .

Getting Started

  1. Run scrapy : Go to brickset-scraper folder and run this in your terminal:

     scrapy runspider scraper.py --output=names_links.json
    

    This will generate "names_links.json" file in the same folder.

  2. Run "json_parser.py" via terminal command "python json_parser.py names_links.json". This will read "names_links.json" and will create "all_name_script.txt". This new txt file has a movie name and a link to its script for each movie in the json file. Note that each script takes 1-2 seconds.

  3. Run "html_list_parser.py" . This will read "all_name_script.txt" and will generate "all_dialogues.txt". This file has all the relevant dialogues from the movie scripts.

Prerequisites

You need to have

Authors

Kamil Veli Toraman: kvtoraman

License

There is no licence for now. You can use as you please. This code tries to have a rule-based algorithm for movie scripts. If you have a better way, please inform me :)

Acknowledgments

  • This is a result of a 2 month internship in Data Science Lab, Kaist.

screenplay's People

Contributors

kvtoraman avatar

Watchers

James Cloos 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.