Giter Club home page Giter Club logo

got-narrators's Introduction

got-narrators

Code for parsing the Game of Thrones book series into a set of chapters with the associated POV (point of view) character for each chapter, and classification of chapter POV character by chapter contents.

File structure

parse_chapters.py Module defining code to parse a given book into chapters with associated POV character per chapter.

prediction_utils.py Module containing scikit-learn implementation of SVM and Naive Bayes text classifiers, using TF-IDF text feature extraction, and some general utility functions such as k-fold cross-validation splitting.

run_predictions_crossval.py Executable script which runs parser for first 5 books of GoT series, trains SVM and Naive Bayes classifiers to predict POV character by chapter, tests with k-fold cross-validation, and exports a performance summary for each classifier to CSV files in the 'results' directory.

top_features.py Executable script which runs parser for first 5 books of GoT series, trains an SVM classifier on the full corpus, and exports trained feature weights to a CSV file in 'results/features'.

raw_text This directory holds the actual text of each of the first 5 GoT books. The texts are not included in this repository for copyright reasons.

results This directory contains CSV output for classifier performance.

results/features This directory contains CSV output for feature weights used to determine character-word associations.

got-narrators's People

Contributors

derrickstuckey avatar

Watchers

Josh Winters 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.