Renard

Renard: A Modular Pipeline for Extracting Character Networks from Narrative Texts - Published in JOSS (2024)

https://github.com/compnet/renard

Science Score: 96.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
    Found 5 DOI reference(s) in README and JOSS metadata
  • Academic publication links
    Links to: joss.theoj.org
  • Committers with academic emails
  • Institutional organization owner
    Organization compnet has institutional domain (lia.univ-avignon.fr)
  • JOSS paper metadata
    Published in Journal of Open Source Software

Keywords

alias-resolution character-networks coreference-resolution ner network-extraction novels speaker-attribution

Scientific Fields

Mathematics Computer Science - 88% confidence
Last synced: 4 months ago · JSON representation

Repository

Relationship Extraction from NARrative Documents

Basic Info
  • Host: GitHub
  • Owner: CompNet
  • License: gpl-3.0
  • Language: Python
  • Default Branch: main
  • Homepage:
  • Size: 8.46 MB
Statistics
  • Stars: 13
  • Watchers: 3
  • Forks: 2
  • Open Issues: 0
  • Releases: 16
Topics
alias-resolution character-networks coreference-resolution ner network-extraction novels speaker-attribution
Created about 4 years ago · Last pushed 5 months ago
Metadata Files
Readme Contributing License

README.md

Renard

DOI

the Renard logo

Renard (Relationship Extraction from NARrative Documents) is a modular library for creating and using custom character networks extraction pipelines. Renard can extract dynamic as well as static character networks. Renard is modular, in the sense that you can easily create a custom extraction pipeline that fits your needs.

Installation

You can install the latest version using pip:

pip install renard-pipeline

Currently, Renard supports Python>=3.9,<=3.12

Documentation

Documentation, including installation instructions, can be found at https://compnet.github.io/Renard/

If you need local documentation, it can be generated using Sphinx. From the docs directory, make html should create documentation under docs/_build/html.

Interactive Demo

You can check the interactive demo of Renard at HuggingFace. The UI used for the demo is currently in development and will be available directly in Renard in the next version.

Tutorial

Renard's central concept is the Pipeline.A Pipeline is a list of PipelineStep that are run sequentially in order to extract a character graph from a document. Here is a simple example:

```python from renard.pipeline import Pipeline from renard.pipeline.tokenization import NLTKTokenizer from renard.pipeline.ner import NLTKNamedEntityRecognizer from renard.pipeline.characterunification import GraphRulesCharacterUnifier from renard.pipeline.graphextraction import CoOccurrencesGraphExtractor

with open("./my_doc.txt") as f: text = f.read()

pipeline = Pipeline( [ NLTKTokenizer(), NLTKNamedEntityRecognizer(), GraphRulesCharacterUnifier(minappearance=10), CoOccurrencesGraphExtractor(cooccurrences_dist=25) ] )

out = pipeline(text) ```

For more information, see renard_tutorial.py, which is a tutorial in the jupytext format. You can open it as a notebook in Jupyter Notebook (or export it as a notebook with jupytext --to ipynb renard-tutorial.py).

Contributing

see the "Contributing" section of the documentation.

Running tests

Renard uses pytest for testing. To launch tests, use the following command :

uv run python -m pytest tests

Expensive tests are disabled by default. These can be run by setting the environment variable RENARD_TEST_ALL to 1.

How to cite

If you use Renard in your research project, please cite it as follows:

bibtex @Article{Amalvy2024, doi = {10.21105/joss.06574}, year = {2024}, publisher = {The Open Journal}, volume = {9}, number = {98}, pages = {6574}, author = {Amalvy, A. and Labatut, V. and Dufour, R.}, title = {Renard: A Modular Pipeline for Extracting Character Networks from Narrative Texts}, journal = {Journal of Open Source Software}, }

We would be happy to hear about your usage of Renard, so don't hesitate to reach out!

Owner

  • Name: Complex Networks
  • Login: CompNet
  • Kind: organization
  • Location: Avignon, France

JOSS Publication

Renard: A Modular Pipeline for Extracting Character Networks from Narrative Texts
Published
June 20, 2024
Volume 9, Issue 98, Page 6574
Authors
Arthur Amalvy ORCID
Laboratoire Informatique d'Avignon, France
Vincent Labatut ORCID
Laboratoire Informatique d'Avignon, France
Richard Dufour ORCID
Laboratoire des Sciences du Numérique de Nantes, France
Editor
Tristan Miller ORCID
Tags
character networks pipeline nlp

GitHub Events

Total
  • Release event: 4
  • Watch event: 3
  • Push event: 32
  • Fork event: 1
  • Create event: 3
Last Year
  • Release event: 4
  • Watch event: 3
  • Push event: 32
  • Fork event: 1
  • Create event: 3

Committers

Last synced: 5 months ago

All Time
  • Total Commits: 407
  • Total Committers: 2
  • Avg Commits per committer: 203.5
  • Development Distribution Score (DDS): 0.007
Past Year
  • Commits: 34
  • Committers: 2
  • Avg Commits per committer: 17.0
  • Development Distribution Score (DDS): 0.029
Top Committers
Name Email Commits
Aethor o****e@g****m 404
Vincent Labatut v****t@g****m 3

Issues and Pull Requests

Last synced: 4 months ago

All Time
  • Total issues: 1
  • Total pull requests: 8
  • Average time to close issues: 27 minutes
  • Average time to close pull requests: 12 minutes
  • Total issue authors: 1
  • Total pull request authors: 3
  • Average comments per issue: 1.0
  • Average comments per pull request: 0.13
  • Merged pull requests: 8
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 0
  • Pull requests: 0
  • Average time to close issues: N/A
  • Average time to close pull requests: N/A
  • Issue authors: 0
  • Pull request authors: 0
  • Average comments per issue: 0
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
  • LCB0B (1)
Pull Request Authors
  • Aethor (6)
  • arfon (2)
  • logological (2)
Top Labels
Issue Labels
Pull Request Labels

Packages

  • Total packages: 1
  • Total downloads:
    • pypi 38 last-month
  • Total dependent packages: 0
  • Total dependent repositories: 0
  • Total versions: 17
  • Total maintainers: 1
pypi.org: renard-pipeline

Relationships Extraction from NARrative Documents

  • Versions: 17
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Downloads: 38 Last month
Rankings
Dependent packages count: 7.5%
Average: 39.4%
Downloads: 41.0%
Dependent repos count: 69.8%
Maintainers (1)
Last synced: 4 months ago

Dependencies

.github/workflows/ci.yml actions
  • JamesIves/github-pages-deploy-action v4.2.3 composite
  • actions/cache v2 composite
  • actions/checkout v2 composite
  • actions/setup-python v2 composite
  • snok/install-poetry v1 composite
poetry.lock pypi
  • 110 dependencies
pyproject.toml pypi
  • Sphinx ^4.3.1 develop
  • hypothesis ^6.24.0 develop
  • sphinx-autodoc-typehints ^1.12.0 develop
  • sphinx-rtd-theme ^1.0.0 develop
  • coreferee ^1.4.0
  • matplotlib ^3.5.3
  • more-itertools ^8.12.0
  • nameparser ^1.1.0
  • networkx ^2.6.3
  • nltk ^3.6.5
  • pandas ^1.4.4
  • pytest ^7.2.1
  • python ^3.8,<3.11
  • seqeval 1.2.2
  • spacy ^3.5.0
  • spacy-transformers ^1.2.1
  • stanza ^1.3.0
  • torch >=2.0.0, !=2.0.1
  • tqdm ^4.62.3
  • transformers ^4.30.2