automated character networks for books and movie scripts
This module is designed to create an automated character network based on a book or a movie script.
Charnetto is implemented both with spaCy and Flair for the named entity recognition step. Please install the desired library using
pip install spacy
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.
The books must be in
.txt, ideally with one paragraph per line. For english books, replacing
',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
PERin 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.
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
|Filename, size||File type||Python version||Upload date||Hashes|
|Filename, size charnetto-0.1.2-py3-none-any.whl (13.5 kB)||File type Wheel||Python version py3||Upload date||Hashes View|
|Filename, size charnetto-0.1.2.tar.gz (10.2 kB)||File type Source||Python version None||Upload date||Hashes View|
Hashes for charnetto-0.1.2-py3-none-any.whl