Skip to main content

license package publish

CharNet: Dynamic Social Network Analysis for TV Series Dialogues

CharNet is a Python package designed for performing graph analysis on dynamic social networks based on dialogues in TV series. It provides tools for loading dialogue data, calculating and creating weighted graphs, and visualizing character interactions over time.

Simple example


import charnet as cn
import pandas as pd

df = pd.read_csv('bigbang_lines_test.csv')
net_test = cn.CharNet(df, ('Season', 'Episode', 'Scene', 'Line'),
                   interactions='Words', speakers='Speaker', listeners='Listener', directed=True)
net_test.get_weights(lambda x: len(x))
net_test.draw(plot='matplotlib')

net_test.get_weights(lambda x: len(x))
net_test.set_min_step('Scene')
subset = net_test.get_interval((1, 1, 1, 1), (1, 2, 1, 1))
subset.normalize_weights()
subset.set_layout('circular')
subset.draw(plot='matplotlib')

from charnet.analysis import simple_degree

degree_results = simple_degree(subset, weighted=True)
degree_results.to_csv('results.csv', index=False)

Install


Install the latest version of CharNet:

$ pip install charnet

Install with all optional dependencies:

$ pip install charnet[all]

To Do

  • Add non-directed graph support
  • Add closeness centrality
  • Add Eigenvector centrality
  • Add Louvain community detection
  • Add temporal visualization
  • Add centrality visualizer (with visualization)

License

Released under the GNU General Public License v3.0.

Copyright (c) 2024 Media Comprehension Lab

Metadata

Release files for charnet 0.0.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for charnet 0.0.4
File Size Uploaded Provenance Actions
charnet-0.0.4.tar.gz 25.4 kB Without provenance Details for charnet-0.0.4.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for charnet 0.0.4
File Interpreter ABI Platform Actions
charnet-0.0.4-py3-none-any.whl Python 3 none any Details for charnet-0.0.4-py3-none-any.whl

Total release size: 53.1 kB

Release files / charnet-0.0.4.tar.gz

Download URL charnet-0.0.4.tar.gz
Size 25.4 kB
Tags Source
SHA-256 checksum
How to use checksums
bcf16635bd0f694d417e50923b737a37b701feacf03655740c415d498df64169
BLAKE2b-256 checksum
How to use checksums
5ef9dff009c7bbe59e124af1a6b28a7ccc3dc09731c4f3dafca2511c3f86769d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.10.14

Release files / charnet-0.0.4-py3-none-any.whl

Download URL charnet-0.0.4-py3-none-any.whl
Size 27.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
4811de9faa8640f8652f2664dee1f8df7a5e02aa64949e82dc880df78e2574ac
BLAKE2b-256 checksum
How to use checksums
4d89546e0a6709998225e8ffa64be547f9e8525aa30b26f133f6d93eaf996c5f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.10.14

Security for charnet 0.0.4

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page