Metadata-Version: 2.1
Name: charnetto
Version: 0.1.4
Summary: automated character networks for books and movie scripts
Home-page: https://gitlab.com/maned_wolf/charnetto
Author: Coline Métrailler
Author-email: Coline Métrailler <coline.metrailler@unil.ch>
License: MIT License
Project-URL: Homepage, https://gitlab.com/maned_wolf/charnetto
Project-URL: Documentation, https://charnetto.readthedocs.io/en/latest/
Project-URL: Repository, https://gitlab.com/maned_wolf/charnetto
Project-URL: Issues, https://gitlab.com/maned_wolf/charnetto/-/issues
Keywords: character networks,networks,books,movies,network extraction
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Science/Research
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: 3.6
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
Classifier: Topic :: Scientific/Engineering :: Information Analysis
Classifier: Topic :: Software Development :: Libraries
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Topic :: Text Processing :: Linguistic
Classifier: Topic :: Utilities
Requires-Python: >=3.6
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: tqdm >=1.0
Requires-Dist: networkx >=2.5
Requires-Dist: numpy >=1.19.2
Requires-Dist: pandas >=1.0.5

# 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](https://charnetto.readthedocs.io/en/latest/).

## 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](https://imsdb.com/): 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](https://stackedit.io/) 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.
