Skip to main content

No project description provided

Project description

MuMiN-Build

This repository contains the package used to build the MuMiN dataset from the paper Nielsen and McConville: MuMiN: A Large-Scale Multilingual Multimodal Fact-Checked Misinformation Social Network Dataset (2021).

See the MuMiN website for more information, including a leaderboard of the top performing models.

Installation

The mumin package can be installed using pip:

$ pip install mumin

To be able to build the dataset, Twitter data needs to be downloaded, which requires a Twitter API key. You can get one for free here. You will need the Bearer Token.

Quickstart

The main class of the package is the MuminDataset class:

>>> from mumin import MuminDataset
>>> dataset = MuminDataset(twitter_bearer_token=XXXXX)
>>> dataset
MuminDataset(size='small', compiled=False)

By default, this loads the small version of the dataset. This can be changed by setting the size argument of MuminDataset to one of 'small', 'medium' or 'large'. To begin using the dataset, it first needs to be compiled. This will download the dataset, rehydrate the tweets and users, and download all the associated news articles, images and videos. This usually takes a while.

>>> dataset.compile()
MuminDataset(num_nodes=388,149, num_relations=475,490, size='small', compiled=True)

Note that this dataset does not contain all the nodes and relations in MuMiN-small, as that would take way longer to compile. The data left out are timelines, profile pictures and article images. These can be included by specifying include_extra_images=True and/or include_timelines=True in the constructor of MuminDataset.

After compilation, the dataset can also be found in the mumin-<size>.zip file. This file name can be changed using the dataset_path argument when initialising the MuminDataset class. If you need embeddings of the nodes, for instance for use in machine learning models, then you can simply call the add_embeddings method:

>>> dataset.add_embeddings()
MuminDataset(num_nodes=388,149, num_relations=475,490, size='small', compiled=True)

Note: If you need to use the add_embeddings method, you need to install the mumin package as either pip install mumin[embeddings] or pip install mumin[all], which will install the transformers and torch libraries. This is to ensure that such large libraries are only downloaded if needed.

It is possible to export the dataset to the Deep Graph Library, using the to_dgl method:

>>> dgl_graph = dataset.to_dgl()
>>> type(dgl_graph)
dgl.heterograph.DGLHeteroGraph

Note: If you need to use the to_dgl method, you need to install the mumin package as pip install mumin[dgl] or pip install mumin[all], which will install the dgl and torch libraries.

For a more in-depth tutorial of how to work with the dataset, including training multiple different misinformation classifiers, see the tutorial.

Dataset Statistics

Dataset #Claims #Threads #Tweets #Users #Articles #Images #Languages %Misinfo
MuMiN-large 12,914 26,048 21,565,018 1,986,354 10,920 6,573 41 94.57%
MuMiN-medium 5,565 10,832 12,650,371 1,150,259 4,212 2,510 37 94.07%
MuMiN-small 2,183 4,344 7,202,506 639,559 1,497 1,036 35 92.87%

Related Repositories

  • MuMiN website, the central place for the MuMiN ecosystem, containing tutorials, leaderboards and links to the paper and related repositories.
  • MuMiN, containing the paper in PDF and LaTeX form.
  • MuMiN-trawl, containing the source code used to construct the dataset from scratch.
  • MuMiN-baseline, containing the source code for the baselines.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mumin-1.7.0.tar.gz (30.1 kB view details)

Uploaded Source

Built Distribution

mumin-1.7.0-py3-none-any.whl (30.9 kB view details)

Uploaded Python 3

File details

Details for the file mumin-1.7.0.tar.gz.

File metadata

  • Download URL: mumin-1.7.0.tar.gz
  • Upload date:
  • Size: 30.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/34.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.9 tqdm/4.63.0 importlib-metadata/4.11.3 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.8.3

File hashes

Hashes for mumin-1.7.0.tar.gz
Algorithm Hash digest
SHA256 8f9642297ee0559017554f95a5bc7f0856814a662b5d07ac6c5443071c94f071
MD5 92328116a4da43f4d28c299241438d9a
BLAKE2b-256 81788d11f5be885818784229e41888d7a0530a5a972867903126b509470ce7cc

See more details on using hashes here.

File details

Details for the file mumin-1.7.0-py3-none-any.whl.

File metadata

  • Download URL: mumin-1.7.0-py3-none-any.whl
  • Upload date:
  • Size: 30.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/34.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.9 tqdm/4.63.0 importlib-metadata/4.11.3 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.8.3

File hashes

Hashes for mumin-1.7.0-py3-none-any.whl
Algorithm Hash digest
SHA256 ac989bb349e8c61405d52a92a6b56e5219956fa57bd2063add6185cc9d3b47ab
MD5 5a41959a8e8ab23b2f998a053bc37882
BLAKE2b-256 58d0a947504751514e02a83f0ec5c28b02af75e14f95fba8bf650e82ecbfffa8

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page