logo Netzschleuder network catalog, repository, and centrifuge

History of reuters

The changes to the source code of this entry in the repository, newest first, each with the differences it made to the entry's files. They are also listed on GitLab.

[entries] Add the date when each entry was added, and remove icon_hash by Tiago de Paula Peixoto beff7c9
The dates are those of the commits that first added the entries' files
(2020-08-11 for the entries of the initial commit); renamed entries keep
the date of their first name.

Changed: none
diff --git a/entries/reuters/__init__.py b/entries/reuters/__init__.py
index 86371c3..072c0d3 100644
--- a/entries/reuters/__init__.py
+++ b/entries/reuters/__init__.py
@@ -39,7 +39,7 @@ tags = ['Informational', 'Language', 'Bipartite', 'Weighted', 'Metadata']
 url = ['https://www.jmlr.org/papers/v5/lewis04a.html',
        'http://www.ai.mit.edu/projects/jmlr/papers/volume5/lewis04a/lyrl2004_rcv1v2_README.htm']
 citation = [('D. D. Lewis, Y. Yang, T. G. Rose, F. Li, "RCV1: A New Benchmark Collection for Text Categorization Research." Journal of Machine Learning Research 5, 361-397 (2004).', 'https://www.jmlr.org/papers/v5/lewis04a.html')]
-icon_hash = '5840fb8d8cf714f319c4540f'
+date_added = '2020-08-11'
 upstream_license = ("Available without license; attribution to Reuters requested",
                     "http://www.ai.mit.edu/projects/jmlr/papers/volume5/lewis04a/lyrl2004_rcv1v2_README.htm")
 # (the https version of the server does not answer)
[entries] Prefix the properties in the descriptions with (Node), (Edge) or (Graph) by Tiago de Paula Peixoto bc3dbbd
The lists of properties at the end of the descriptions marked edge
properties with "Edge" but left node properties unmarked, or grouped
them in "Nodes: `a`, ...; `b`, ..." items, so the kind of a property
was often unclear. Every item now starts with (Node), (Edge) or (Graph),
followed by the property names, a colon and the explanation, one item
per property or group of properties; qualifications (kinds of nodes,
networks) follow the names in parentheses. Properties that were only
named got a short explanation, and a few items that named the wrong
kind of property were corrected.
diff --git a/entries/reuters/__init__.py b/entries/reuters/__init__.py
index 184027d..86371c3 100644
--- a/entries/reuters/__init__.py
+++ b/entries/reuters/__init__.py
@@ -29,12 +29,12 @@ The data are derived from the Reuters Corpus, Volume 1 (Reuters Ltd.); the autho
 
 The network has the following properties:
 
-- `name`: the stem (empty for stories).
-- `is_word`: whether the node is a stem (otherwise a story).
-- `doc_id`: the Reuters id of the story (-1 for stems).
-- `is_train`: whether the story belongs to the training set of Lewis et al. (otherwise to the test set; false for stems).
-- `topics`, `industries`, `regions`: the codes of the topic, industry and region categories assigned to the story in RCV1-v2 (e.g. `CCAT`, `I81402`, `USA`; empty for stems).
-- Edge `weight`: the number of occurrences of the stem in the story."""
+- (Node) `name`: the stem (empty for stories).
+- (Node) `is_word`: whether the node is a stem (otherwise a story).
+- (Node) `doc_id`: the Reuters id of the story (-1 for stems).
+- (Node) `is_train`: whether the story belongs to the training set of Lewis et al. (otherwise to the test set; false for stems).
+- (Node) `topics`, `industries`, `regions`: the codes of the topic, industry and region categories assigned to the story in RCV1-v2 (e.g. `CCAT`, `I81402`, `USA`; empty for stems).
+- (Edge) `weight`: the number of occurrences of the stem in the story."""
 tags = ['Informational', 'Language', 'Bipartite', 'Weighted', 'Metadata']
 url = ['https://www.jmlr.org/papers/v5/lewis04a.html',
        'http://www.ai.mit.edu/projects/jmlr/papers/volume5/lewis04a/lyrl2004_rcv1v2_README.htm']
[entries] Remove unneeded code from the entries by Tiago de Paula Peixoto 2c69f19
Unneeded "global files" statements, unused imports and variables,
f-strings without placeholders, duplicate keys in foodweb_little_rock
(keeping the order and the values used), and the second definition of
get_lines() in twitter_higgs. Nothing changes in the networks or
descriptions.

Changed: none
diff --git a/entries/reuters/__init__.py b/entries/reuters/__init__.py
index 7a63dd2..184027d 100644
--- a/entries/reuters/__init__.py
+++ b/entries/reuters/__init__.py
@@ -63,7 +63,6 @@ def fetch_upstream(force=False):
 @coerce_props()
 @annotate()
 def parse(alts=None):
-    global files
     name = __name__.split(".")[-1]
     for fnames, alt, fmt in files:
         if alts is not None and alt not in alts:
[entries] Move contact, convote_mentions, douban, email_company, epinions, flixster, football_league_results, hyves, lastfm, libimseti, livemocha, reuters, sa_companies, sister_cities, tripadvisor_ratings, wikilens_ratings and wikipedia_discussions_de to their original sources by Tiago de Paula Peixoto 8f097de
These entries downloaded KONECT's copies of the data. They now download
the original data (live, from pinned Wayback Machine snapshots, or by
re-extracting from public dumps), gaining the metadata KONECT dropped
(names, identifiers, timestamps, attributes), with descriptions and
citations rewritten from the original sources and factual errors fixed
(years and periods of contact, email_company, douban, flixster,
libimseti, sa_companies; the rated objects of epinions; the sign of
convote_mentions; songs merged by title alone in lastfm).

New networks: the trust network of epinions, the links of
wikilens_ratings, the JSON crawl of tripadvisor_ratings, and current
versions of sister_cities and wikipedia_discussions_de next to the ones
KONECT used. asu_social_networks only loses its mention of KONECT.

Changed: upstream contact convote_mentions douban email_company epinions flixster football_league_results hyves lastfm libimseti livemocha reuters sa_companies sister_cities tripadvisor_ratings wikilens_ratings wikipedia_discussions_de
diff --git a/entries/reuters/__init__.py b/entries/reuters/__init__.py
index c420e49..7a63dd2 100644
--- a/entries/reuters/__init__.py
+++ b/entries/reuters/__init__.py
@@ -16,16 +16,44 @@
 # You should have received a copy of the GNU Affero General Public License along
 # with this program.  If not, see <http://www.gnu.org/licenses/>.
 
+from array import array as pyarray
+
 from .. import *
 
 title = "Reuters news stories (1996-1997)"
-description = """A bipartite network of Reuters news stories and words, from the Reuters Corpus, Volume 1 (RCV1), as distributed by KONECT. The corpus consists of the English-language news stories written by Reuters journalists between August 1996 and August 1997. Nodes are 781,265 stories and 283,911 (stemmed) words (vertex property `is_word`), with the stemmed word given by the vertex property `name` (stories are not named), and an edge connects each story to each word it contains, with the edge property `weight` giving the number of occurrences of the word in the story (KONECT describes the network as "story–word frequency")."""
-tags = ['Informational', 'Language', 'Weighted']
-url = 'http://konect.cc/networks/reuters'
-citation = [('D. Lewis., et al. "Rcv1: A new benchmark collection for text categorization research." J. Machine Learning Research 5, 361-397 (2004).', 'http://www.jmlr.org/papers/v5/lewis04a.html')]
+description = r"""A bipartite network of news stories and the words they contain, from RCV1-v2, the version by Lewis, Yang, Rose and Li (2004) of the Reuters Corpus, Volume 1 (RCV1), an archive of English-language news stories written by Reuters journalists between August 1996 and August 1997. RCV1-v2 consists of 804,414 stories, which the Reuters editors had assigned to categories of three kinds: topics, industries and regions. For their text categorization experiments, Lewis et al. split them into 23,149 training stories (those of 20-31 August 1996) and 781,265 test stories, and published the tokenized stories: the words of each story, with the words of a large stop list (essentially all function words) removed, and the remaining ones replaced by their stems, in scrambled order, so that the texts of the stories cannot be reconstructed.
+
+Each node is a story or a stem, and an edge connects each story to each stem it contains, weighted by the number of occurrences of the stem in the story. The network contains all stories of RCV1-v2, those of the training set (marked by `is_train`) and of the test set. The 2,377 stories of the original RCV1 that are not in RCV1-v2 (because of invalid category codes), which the authors also published, are left out.
+
+The data are derived from the Reuters Corpus, Volume 1 (Reuters Ltd.); the authors of the data ask that publications using it give an attribution to Reuters.
+
+The network has the following properties:
+
+- `name`: the stem (empty for stories).
+- `is_word`: whether the node is a stem (otherwise a story).
+- `doc_id`: the Reuters id of the story (-1 for stems).
+- `is_train`: whether the story belongs to the training set of Lewis et al. (otherwise to the test set; false for stems).
+- `topics`, `industries`, `regions`: the codes of the topic, industry and region categories assigned to the story in RCV1-v2 (e.g. `CCAT`, `I81402`, `USA`; empty for stems).
+- Edge `weight`: the number of occurrences of the stem in the story."""
+tags = ['Informational', 'Language', 'Bipartite', 'Weighted', 'Metadata']
+url = ['https://www.jmlr.org/papers/v5/lewis04a.html',
+       'http://www.ai.mit.edu/projects/jmlr/papers/volume5/lewis04a/lyrl2004_rcv1v2_README.htm']
+citation = [('D. D. Lewis, Y. Yang, T. G. Rose, F. Li, "RCV1: A New Benchmark Collection for Text Categorization Research." Journal of Machine Learning Research 5, 361-397 (2004).', 'https://www.jmlr.org/papers/v5/lewis04a.html')]
 icon_hash = '5840fb8d8cf714f319c4540f'
-upstream_prefix = 'http://konect.cc/files'
-files = [('download.tsv.reuters.tar.bz2', None, 'konect')]
+upstream_license = ("Available without license; attribution to Reuters requested",
+                    "http://www.ai.mit.edu/projects/jmlr/papers/volume5/lewis04a/lyrl2004_rcv1v2_README.htm")
+# (the https version of the server does not answer)
+upstream_prefix = 'http://www.ai.mit.edu/projects/jmlr/papers/volume5/lewis04a'
+_tokens = ["a12-token-files/lyrl2004_tokens_train.dat.gz"] + \
+    [f"a12-token-files/lyrl2004_tokens_test_pt{i}.dat.gz" for i in range(4)]
+_qrels = {"topics": "a08-topic-qrels/rcv1-v2.topics.qrels.gz",
+          "industries": "a09-industry-qrels/rcv1-v2.industries.qrels.gz",
+          "regions": "a10-region-qrels/rcv1-v2.regions.qrels.gz"}
+files = [(tuple(_tokens) + tuple(_qrels.values()), None, None)]
+
+# Limit on the number of stories read from each token file, for checks
+# (None: all)
+_check_rows = None
 
 def fetch_upstream(force=False):
     return fetch_upstream_files(__name__.split(".")[-1], upstream_prefix, files,
@@ -40,9 +68,71 @@ def parse(alts=None):
     for fnames, alt, fmt in files:
         if alts is not None and alt not in alts:
             continue
-        if isinstance(fnames, str):
-            fnames = [fnames]
-        with ExitStack() as stack:
-            fs = [stack.enter_context(open_upstream_file(name, fn, "rb")) for fn in fnames]
-            g = parse_graph(fs, fmt, directed=True)
+        words = {}
+        doc_ids = pyarray("q")
+        train = pyarray("b")
+        src, tgt, weight = pyarray("q"), pyarray("q"), pyarray("q")
+        for fname in _tokens:
+            is_train = "train" in fname
+            ndocs = 0
+            # ".I <doc id>", ".W", lines of tokens, and an empty line
+            with open_upstream_file(name, fname, "r") as f:
+                counts = None
+                def flush():
+                    d = len(doc_ids) - 1
+                    for w, c in counts.items():
+                        src.append(d)
+                        tgt.append(words.setdefault(w, len(words)))
+                        weight.append(c)
+                for line in f:
+                    if line.startswith(".I "):
+                        if counts is not None:
+                            flush()
+                        if _check_rows is not None and ndocs >= _check_rows:
+                            counts = None
+                            break
+                        doc_ids.append(int(line[3:]))
+                        train.append(is_train)
+                        ndocs += 1
+                        counts = {}
+                    elif line.startswith(".W"):
+                        continue
+                    else:
+                        for w in line.split():
+                            counts[w] = counts.get(w, 0) + 1
+                if counts is not None:
+                    flush()
+        nd = len(doc_ids)
+        g = Graph(directed=False)
+        g.add_vertex(nd + len(words))
+        g.vp.name = g.new_vp("string", vals=[""] * nd + list(words.keys()))
+        g.vp.is_word = g.new_vp("bool")
+        g.vp.is_word.a[nd:] = True
+        g.vp.doc_id = g.new_vp("int64_t", val=-1)
+        g.vp.doc_id.a[:nd] = doc_ids
+        g.vp.is_train = g.new_vp("bool")
+        g.vp.is_train.a[:nd] = train
+        del words, train
+        g.ep.weight = g.new_ep("int64_t")
+        tgt = numpy.frombuffer(tgt, dtype="int64") + nd
+        g.add_edge_list(numpy.column_stack([numpy.frombuffer(src, dtype="int64"),
+                                            tgt,
+                                            numpy.frombuffer(weight, dtype="int64")]),
+                        eprops=[g.ep.weight])
+        del src, tgt, weight
+
+        # "<category> <doc id> 1"
+        index = {d: i for i, d in enumerate(doc_ids)}
+        for kind, fname in _qrels.items():
+            cats = defaultdict(list)
+            with open_upstream_file(name, fname, "r") as f:
+                for line in f:
+                    c, d, _ = line.split()
+                    i = index.get(int(d))
+                    if i is not None:
+                        cats[i].append(c)
+            p = g.new_vp("vector<string>")
+            for i, cs in cats.items():
+                p[i] = cs
+            g.vp[kind] = p
         yield alt, g
[pipeline] Fix KONECT entity files, seekable upstream files and archive formats by Tiago de Paula Peixoto 2f6e19f
- konect.py: each ent.<net>.<entity>.<attr> file becomes a vertex
  property on the side of the entity it describes (per-vertex or per-edge
  files), instead of all of them being written from vertex 0 into `meta`
  (which put e.g. the item names of bibsonomy and reuters on the wrong
  nodes); only leading "%" lines are comments.
- open_upstream_file(..., seekable=True) returns a seekable file (via a
  temporary file) for readers that need one (openpyxl, scipy.io.loadmat,
  zipfile), replacing the per-entry BytesIO copies.
- .xz files can be read again; .xz, .rar and .7z downloads are stored as
  they are, and "x.tar.xz:", "x.rar:" and "x.7z:" member access works
  (with py7zr or the 7z command); caches in the previous layouts are still
  read.
- parsers.py: vprops_from_txt matches rows by name for graphs keyed by
  name; the Wikimedia dump readers (stub histories, SQL tables) are shared
  helpers; new read_doc (tables of Word documents via LibreOffice) and
  read_epanet (EPANET water network files) readers.
- The entries' workarounds are removed (all parse identically).
diff --git a/entries/reuters/__init__.py b/entries/reuters/__init__.py
index f04fc98..c420e49 100644
--- a/entries/reuters/__init__.py
+++ b/entries/reuters/__init__.py
@@ -45,21 +45,4 @@ def parse(alts=None):
         with ExitStack() as stack:
             fs = [stack.enter_context(open_upstream_file(name, fn, "rb")) for fn in fnames]
             g = parse_graph(fs, fmt, directed=True)
-
-        # ent.reuters.word.name has one line per edge (in the order of
-        # out.reuters), giving the name of the edge's word, not one line per
-        # word as assumed by the generic KONECT parser
-        del g.vp["meta"]
-        g.vp.name = g.new_vp("string")
-        eidx = g.get_edges([g.edge_index])
-        target = numpy.zeros(len(eidx), dtype="int64")
-        target[eidx[:, 2]] = eidx[:, 1]
-        with open_upstream_file(name, fnames[0], "rb") as f:
-            with tarfile.open(fileobj=f, mode="r|bz2") as tf:
-                for m in tf:
-                    if not m.name.endswith("ent.reuters.word.name"):
-                        continue
-                    for i, line in enumerate(tf.extractfile(m)):
-                        g.vp.name[target[i]] = line.decode("utf8").strip()
-                    break
         yield alt, g
[entries] Fix parse bugs and improve descriptions and metadata by Tiago de Paula Peixoto 6bb6851
- parse fixes from the review of the descriptions, e.g. us_patents
  (directed), celegans_2019 (synapse direction), ecoli_transcription and
  yeast_transcription (regulator to target), bitcoin (direction, phantom
  node), ego_social (Google+ features and circles), scotus_majority,
  arxiv_authors and social_location (as in SNAP), caida_as, dnc, dom,
  mist, reuters and bibsonomy (names on the right nodes), uci_zoo
- every description now states explicitly what the nodes and edges
  represent; corrected titles, years, tags, citations and licences
- the "Hypergraph" tag is removed; very large entries are marked
  `huge = True` (see --skip-huge)
- ICON ids of partial duplicates added (hiv_transmission, congress_bills,
  openflights, dutch_school)
diff --git a/entries/reuters/__init__.py b/entries/reuters/__init__.py
index b2f67bb..f04fc98 100644
--- a/entries/reuters/__init__.py
+++ b/entries/reuters/__init__.py
@@ -18,10 +18,9 @@
 
 from .. import *
 
-title = "Reuters news stories (1987, 2000)"
-description = """A bipartite network of Reuters news stories and words. Edges connect each story to all the words it contains.[^icon]
-[^icon]: Description obtained from the [ICON](https://icon.colorado.edu) project."""
-tags = ['Informational', 'Language', 'Unweighted']
+title = "Reuters news stories (1996-1997)"
+description = """A bipartite network of Reuters news stories and words, from the Reuters Corpus, Volume 1 (RCV1), as distributed by KONECT. The corpus consists of the English-language news stories written by Reuters journalists between August 1996 and August 1997. Nodes are 781,265 stories and 283,911 (stemmed) words (vertex property `is_word`), with the stemmed word given by the vertex property `name` (stories are not named), and an edge connects each story to each word it contains, with the edge property `weight` giving the number of occurrences of the word in the story (KONECT describes the network as "story–word frequency")."""
+tags = ['Informational', 'Language', 'Weighted']
 url = 'http://konect.cc/networks/reuters'
 citation = [('D. Lewis., et al. "Rcv1: A new benchmark collection for text categorization research." J. Machine Learning Research 5, 361-397 (2004).', 'http://www.jmlr.org/papers/v5/lewis04a.html')]
 icon_hash = '5840fb8d8cf714f319c4540f'
@@ -46,4 +45,21 @@ def parse(alts=None):
         with ExitStack() as stack:
             fs = [stack.enter_context(open_upstream_file(name, fn, "rb")) for fn in fnames]
             g = parse_graph(fs, fmt, directed=True)
+
+        # ent.reuters.word.name has one line per edge (in the order of
+        # out.reuters), giving the name of the edge's word, not one line per
+        # word as assumed by the generic KONECT parser
+        del g.vp["meta"]
+        g.vp.name = g.new_vp("string")
+        eidx = g.get_edges([g.edge_index])
+        target = numpy.zeros(len(eidx), dtype="int64")
+        target[eidx[:, 2]] = eidx[:, 1]
+        with open_upstream_file(name, fnames[0], "rb") as f:
+            with tarfile.open(fileobj=f, mode="r|bz2") as tf:
+                for m in tf:
+                    if not m.name.endswith("ent.reuters.word.name"):
+                        continue
+                    for i, line in enumerate(tf.extractfile(m)):
+                        g.vp.name[target[i]] = line.decode("utf8").strip()
+                    break
         yield alt, g
Update copyright information by Tiago de Paula Peixoto 73a4f0d
diff --git a/entries/reuters/__init__.py b/entries/reuters/__init__.py
index 93665a1..b2f67bb 100644
--- a/entries/reuters/__init__.py
+++ b/entries/reuters/__init__.py
@@ -1,7 +1,7 @@
 #! /usr/bin/env python
 # -*- coding: utf-8 -*-
 #
-# Copyright (C) 2020-2024 Tiago de Paula Peixoto <tiago@skewed.de>
+# Copyright (C) 2020-2026 Tiago de Paula Peixoto <tiago@skewed.de>
 #
 # This program is free software: you can redistribute it and/or modify it under
 # the terms of the GNU Affero General Public License as published by the Free
Update copyright information by Tiago de Paula Peixoto 3d288ea
diff --git a/entries/reuters/__init__.py b/entries/reuters/__init__.py
index 2de58f4..93665a1 100644
--- a/entries/reuters/__init__.py
+++ b/entries/reuters/__init__.py
@@ -1,7 +1,7 @@
 #! /usr/bin/env python
 # -*- coding: utf-8 -*-
 #
-# Copyright (C) 2020-2023 Tiago de Paula Peixoto <tiago@skewed.de>
+# Copyright (C) 2020-2024 Tiago de Paula Peixoto <tiago@skewed.de>
 #
 # This program is free software: you can redistribute it and/or modify it under
 # the terms of the GNU Affero General Public License as published by the Free
Update copyright information by Tiago de Paula Peixoto 8d005ae
diff --git a/entries/reuters/__init__.py b/entries/reuters/__init__.py
index daa79f3..2de58f4 100644
--- a/entries/reuters/__init__.py
+++ b/entries/reuters/__init__.py
@@ -1,7 +1,7 @@
 #! /usr/bin/env python
 # -*- coding: utf-8 -*-
 #
-# Copyright (C) 2021 Tiago de Paula Peixoto <tiago@skewed.de>
+# Copyright (C) 2020-2023 Tiago de Paula Peixoto <tiago@skewed.de>
 #
 # This program is free software: you can redistribute it and/or modify it under
 # the terms of the GNU Affero General Public License as published by the Free
Update copyright info by Tiago de Paula Peixoto db2efcc
diff --git a/entries/reuters/__init__.py b/entries/reuters/__init__.py
index 3c454f0..daa79f3 100644
--- a/entries/reuters/__init__.py
+++ b/entries/reuters/__init__.py
@@ -1,7 +1,7 @@
 #! /usr/bin/env python
 # -*- coding: utf-8 -*-
 #
-# Copyright (C) 2020 Tiago de Paula Peixoto <tiago@skewed.de>
+# Copyright (C) 2021 Tiago de Paula Peixoto <tiago@skewed.de>
 #
 # This program is free software: you can redistribute it and/or modify it under
 # the terms of the GNU Affero General Public License as published by the Free
Un-orphan KONECT datasets by Tiago de Paula Peixoto 894eba5
KONECT has been brought back from the dead for the time being.
diff --git a/entries/reuters/__init__.py b/entries/reuters/__init__.py
index dbe4890..3c454f0 100644
--- a/entries/reuters/__init__.py
+++ b/entries/reuters/__init__.py
@@ -26,7 +26,6 @@ url = 'http://konect.cc/networks/reuters'
 citation = [('D. Lewis., et al. "Rcv1: A new benchmark collection for text categorization research." J. Machine Learning Research 5, 361-397 (2004).', 'http://www.jmlr.org/papers/v5/lewis04a.html')]
 icon_hash = '5840fb8d8cf714f319c4540f'
 upstream_prefix = 'http://konect.cc/files'
-orphan = True
 files = [('download.tsv.reuters.tar.bz2', None, 'konect')]
 
 def fetch_upstream(force=False):
Add support for 'orphan' datasets and tag konect entries by Tiago de Paula Peixoto e330b80
diff --git a/entries/reuters/__init__.py b/entries/reuters/__init__.py
index 3c454f0..dbe4890 100644
--- a/entries/reuters/__init__.py
+++ b/entries/reuters/__init__.py
@@ -26,6 +26,7 @@ url = 'http://konect.cc/networks/reuters'
 citation = [('D. Lewis., et al. "Rcv1: A new benchmark collection for text categorization research." J. Machine Learning Research 5, 361-397 (2004).', 'http://www.jmlr.org/papers/v5/lewis04a.html')]
 icon_hash = '5840fb8d8cf714f319c4540f'
 upstream_prefix = 'http://konect.cc/files'
+orphan = True
 files = [('download.tsv.reuters.tar.bz2', None, 'konect')]
 
 def fetch_upstream(force=False):
Change license from GPLv3 to AGPLv3 by Tiago de Paula Peixoto d754be5
diff --git a/entries/reuters/__init__.py b/entries/reuters/__init__.py
index 1cc2fb1..3c454f0 100644
--- a/entries/reuters/__init__.py
+++ b/entries/reuters/__init__.py
@@ -3,18 +3,18 @@
 #
 # Copyright (C) 2020 Tiago de Paula Peixoto <tiago@skewed.de>
 #
-# This program 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, either version 3 of the License, or
-# (at your option) any later version.
+# This program is free software: you can redistribute it and/or modify it under
+# the terms of the GNU Affero General Public License as published by the Free
+# Software Foundation, either version 3 of the License, or (at your option) any
+# later version.
 #
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
+# This program is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+# FOR A PARTICULAR PURPOSE.  See the GNU Affero General Public License for more
+# details.
 #
-# You should have received a copy of the GNU General Public License
-# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+# You should have received a copy of the GNU Affero General Public License along
+# with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 from .. import *
 
Add explicit attribution to descriptions obtained from ICON by Tiago de Paula Peixoto 1645314
diff --git a/entries/reuters/__init__.py b/entries/reuters/__init__.py
index 1a587f8..1cc2fb1 100644
--- a/entries/reuters/__init__.py
+++ b/entries/reuters/__init__.py
@@ -19,7 +19,8 @@
 from .. import *
 
 title = "Reuters news stories (1987, 2000)"
-description = "A bipartite network of Reuters news stories and words. Edges connect each story to all the words it contains."
+description = """A bipartite network of Reuters news stories and words. Edges connect each story to all the words it contains.[^icon]
+[^icon]: Description obtained from the [ICON](https://icon.colorado.edu) project."""
 tags = ['Informational', 'Language', 'Unweighted']
 url = 'http://konect.cc/networks/reuters'
 citation = [('D. Lewis., et al. "Rcv1: A new benchmark collection for text categorization research." J. Machine Learning Research 5, 361-397 (2004).', 'http://www.jmlr.org/papers/v5/lewis04a.html')]
Initial commit by Tiago de Paula Peixoto cc85872
diff --git a/entries/reuters/__init__.py b/entries/reuters/__init__.py
new file mode 100644
index 0000000..1a587f8
--- /dev/null
+++ b/entries/reuters/__init__.py
@@ -0,0 +1,48 @@
+#! /usr/bin/env python
+# -*- coding: utf-8 -*-
+#
+# Copyright (C) 2020 Tiago de Paula Peixoto <tiago@skewed.de>
+#
+# This program 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, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+from .. import *
+
+title = "Reuters news stories (1987, 2000)"
+description = "A bipartite network of Reuters news stories and words. Edges connect each story to all the words it contains."
+tags = ['Informational', 'Language', 'Unweighted']
+url = 'http://konect.cc/networks/reuters'
+citation = [('D. Lewis., et al. "Rcv1: A new benchmark collection for text categorization research." J. Machine Learning Research 5, 361-397 (2004).', 'http://www.jmlr.org/papers/v5/lewis04a.html')]
+icon_hash = '5840fb8d8cf714f319c4540f'
+upstream_prefix = 'http://konect.cc/files'
+files = [('download.tsv.reuters.tar.bz2', None, 'konect')]
+
+def fetch_upstream(force=False):
+    return fetch_upstream_files(__name__.split(".")[-1], upstream_prefix, files,
+                                force)
+
+@cache_network()
+@coerce_props()
+@annotate()
+def parse(alts=None):
+    global files
+    name = __name__.split(".")[-1]
+    for fnames, alt, fmt in files:
+        if alts is not None and alt not in alts:
+            continue
+        if isinstance(fnames, str):
+            fnames = [fnames]
+        with ExitStack() as stack:
+            fs = [stack.enter_context(open_upstream_file(name, fn, "rb")) for fn in fnames]
+            g = parse_graph(fs, fmt, directed=True)
+        yield alt, g