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.4.tar.gz (11.7 kB view details)

Uploaded Source

Built Distribution

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

Uploaded Python 3

File details

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

File metadata

  • Download URL: charnetto-0.1.4.tar.gz
  • Upload date:
  • Size: 11.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.6.0 pkginfo/1.7.1 requests/2.31.0 requests-toolbelt/0.9.1 tqdm/4.49.0 CPython/3.11.2

File hashes

Hashes for charnetto-0.1.4.tar.gz
Algorithm Hash digest
SHA256 897a76a487dd90352200672a6f81c33fd6087c693f174f3fc9a115e14100aabe
MD5 d0409731f7e718d29e8e778a8d3e4a5a
BLAKE2b-256 7f1efc4d863880a7f43a66f65e73fa5f6ceb975a07cc7353cea9ba9b82ea4052

See more details on using hashes here.

File details

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

File metadata

  • Download URL: charnetto-0.1.4-py3-none-any.whl
  • Upload date:
  • Size: 14.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.6.0 pkginfo/1.7.1 requests/2.31.0 requests-toolbelt/0.9.1 tqdm/4.49.0 CPython/3.11.2

File hashes

Hashes for charnetto-0.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 c9f48d0588c60ae7d9e453afb34ed0984cc14c08a085c78f4a8930e6d16a47cd
MD5 0f82313635f9460f02178dec0ac5b078
BLAKE2b-256 18fcaeef242b814a28c7c85b1bcb81411ece5cf075784e166a9de2c3b7231786

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