Skip to content

CompNet/NaNet

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

NaNet

Extraction and analysis of character networks from bandes dessinées, comics, mangas, and such

  • Copyright 2018-2022 Vincent Labatut

NaNet is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation. For source availability and license information see licence.txt


If you use this source code or the associated dataset, please cite reference [L'22].

Description

This set of R scripts aims at extracting and analyzing character networks extracted from graphic novels. It actually works on manually constituted CSV files, so in theory the work of fiction could be anything besides graphic novels, provided the input format is enforced.

The script does the following:

  1. Extracts various networks based on some tabular data containing individual and relational information.
  2. Computes a number of statistics and generates the corresponding plots.
  3. Performs additional analysis of the networks.

Data

The raw dataset was manually constituted based on bande dessinée Thorgal. The output files (graphs, plots, tables...) can be obtained by running the scripts, but they are also directly available on Zenodo.

ThorgalStaticNet

Organization

Here are the folders composing the project:

  • Folder data: contains the data used by the R scripts, as well as produced by them. Each subfolder corresponds to a different series, and has the same structure:
    • File characters.csv: list of characters, see example in folder Test.
    • File interactions.csv: list of scenes with the involved characters.
    • File pages.csv: list of pages with their number of panels.
    • File volumes.csv: list of volumes (issues) in the series.
    • Folder networks: all the networks extracted from the above tables, as Graphml files and plots.
    • Folder stats: CSV and plot files containing the statistics computed for the corpus and for these networks.
  • Folder log: logs produced when running the scripts.
  • Folder res: resources used by the R scripts.
  • Folder src: contains the R source code.

Installation

You first need to install R and the required packages:

  1. Install the R language
  2. Download this project from GitHub and unzip.
  3. Install the required packages:
    1. Open the R console.
    2. Set the unzipped directory as the working directory, using setwd("<my directory>").
    3. Run the install script src/_install.R (that may take a while).

A part of the analysis requires to compile some C code. The main instructions are in src/common/stats/pli/README.txt, then follow the instructions in the following files (look for the TODOs):

  1. src/common/stats/pli/zeta.R/: concerns the files in folder src/common/stats/pli/zeta-function.
  2. src/common/stats/pli/powerexp.R: concerns the files in folder src/common/stats/pli/exponential-integral.
  3. src/common/stats/pli/discpowerexp.R: concerns the file in folder \src/common/stats/pli/discpowerexp.

Use

In order to extract the networks from the raw data, compute the statistics, and generate the plots:

  1. Open the R console.
  2. Set the current directory as the working directory, using setwd("<my directory>").
  3. Run the main script src/dev_main.R.

The scripts will produce a number of files in the subfolders of folder nets. They are grouped in subsubfolders, each one corresponding to a specific topological measure (degree, closeness, etc.).

The script src/Labatut2022.R reproduces the computations described in article [L'22]. Please, use v1.0.2 of the source code in the Releases page. Be warned that this will take a while (possibly several days). You can directly retrieve the data resulting from this process on Zenodo.

Dependencies

Tested with R version 4.0.5, with the following packages:

To-do List

  • ...

References

About

Extraction and analysis of character networks from comics, bandes dessinées and such

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages