Skip to main content

automated character networks for books and movie scripts

Project description

Charnetto

This module is designed to create an automated character network based on a book or a movie script.

Getting started

Charnetto is implemented both with spaCy and Flair for the named entity recognition step. Please install the desired library using

pip install spacy

or

pip install flair

For more information, see the online documentation.

How to use charnetto

You can use the Jupyter Notebook charnetto_example.ipynb to see a full example of how to generate a character network based on a book (with Flair as a NER tool or with manual annotations) or on a movie script.

Supported data

  • The books must be in .txt, ideally with one paragraph per line. For english books, replacing ,' by ', at the end of dialogues tends to give better results with the NER part.

  • The movie scripts need to resemble those available on IMSDB: the regex for character names looks for capital letters preceded by at least two line breaks.

  • If you want to annotate some books manually, you can follow the URL notation in Markdown to identify characters. Online editors like StackEdit allow you to double-click on a name and add an URL (with CTRL+L). By writing PER in the URL part (for the tag "PERSON"), you will then be able to use charnetto to extract the annotated entities and generate a character network.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

charnetto-0.1.3.tar.gz (11.7 kB view details)

Uploaded Source

Built Distribution

charnetto-0.1.3-py3-none-any.whl (14.6 kB view details)

Uploaded Python 3

File details

Details for the file charnetto-0.1.3.tar.gz.

File metadata

  • Download URL: charnetto-0.1.3.tar.gz
  • Upload date:
  • Size: 11.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.7.8

File hashes

Hashes for charnetto-0.1.3.tar.gz
Algorithm Hash digest
SHA256 bd5bbf3c10fa578afab877a400ab94d511aa15ffccb8d3639227b864f0d0d69b
MD5 3503d2acfe67970e02ac2e8c2e377bd1
BLAKE2b-256 f578c2e145bd20fb5b66cb79f799f761078c4e4fb1e9e6e76724c03532c9ccbd

See more details on using hashes here.

File details

Details for the file charnetto-0.1.3-py3-none-any.whl.

File metadata

  • Download URL: charnetto-0.1.3-py3-none-any.whl
  • Upload date:
  • Size: 14.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.7.8

File hashes

Hashes for charnetto-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 102f5cb42ddd78b72a78e9dbfb1b7b5a27e495609113a2a369918de6440b4360
MD5 aebf3af931d3059a3fe632c3f836b8a7
BLAKE2b-256 26116af5717311a155c15fa6fa7cb918946b382c1a296a409e391266e8ac9fe1

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page