Renard

^home ^projects

@Github @JOSS

Renard (Relationships Extraction from NARrative Documents) is a library for creating and using custom character networks extraction pipelines. Renard can extract dynamic as well as static character networks. I wrote Renard as part of my PhD in natural language processing. Renard is published in the Journal of Open Source Software!

Here is an example of using Renard:

from renard.pipeline import Pipeline
from renard.pipeline.tokenization import NLTKTokenizer
from renard.pipeline.ner import NLTKNamedEntityRecognizer
from renard.pipeline.character_unification import GraphRulesCharacterUnifier
from renard.pipeline.graph_extraction import CoOccurrencesGraphExtractor

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

pipeline = Pipeline(
        [
                NLTKTokenizer(),
                NLTKNamedEntityRecognizer(),
                GraphRulesCharacterUnifier(min_appearance=10),
                CoOccurrencesGraphExtractor(co_occurrences_dist=25)
        ]
)

out = pipeline(text)