History of word_assoc
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 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/word_assoc/__init__.py b/entries/word_assoc/__init__.py
index f8f3ad4..623cac7 100644
--- a/entries/word_assoc/__init__.py
+++ b/entries/word_assoc/__init__.py
@@ -31,7 +31,7 @@ The network has the following properties:
tags = ['Informational', 'Language', 'Weighted', 'Metadata']
url = 'https://web.archive.org/web/20111228191351/http://www.eat.rl.ac.uk/'
citation = [('G. R. Kiss, C. Armstrong, R. Milroy, J. Piper, "An associative thesaurus of English and its computer analysis." In A. J. Aitken, R. W. Bailey, N. Hamilton-Smith (Eds.), The Computer and Literary Studies, 153-165. Edinburgh University Press (1973)', 'https://web.archive.org/web/20150513211304/http://www.eat.rl.ac.uk/Kiss_EAT_Chapter_1973.pdf')]
-icon_hash = '580655df8cf714f319c3be8b'
+date_added = '2020-08-11'
upstream_license = None
# The EAT site is gone; the archive is obtained from the Internet Archive.
upstream_prefix = 'https://web.archive.org/web/20110716112113id_/http://www.eat.rl.ac.uk'
[entries] Prefix the properties in the descriptions with (Node), (Edge) or (Graph) 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/word_assoc/__init__.py b/entries/word_assoc/__init__.py
index 8972266..f8f3ad4 100644
--- a/entries/word_assoc/__init__.py
+++ b/entries/word_assoc/__init__.py
@@ -25,8 +25,9 @@ Nodes are words (or short phrases, as given by the subjects; words longer than 1
The network has the following properties:
-- Nodes: `name`, the word; `stimulus`, whether the word was used as a stimulus.
-- Edges: `count`, the number of subjects who gave the response to the stimulus."""
+- (Node) `name`: the word.
+- (Node) `stimulus`: whether the word was used as a stimulus.
+- (Edge) `count`: the number of subjects who gave the response to the stimulus."""
tags = ['Informational', 'Language', 'Weighted', 'Metadata']
url = 'https://web.archive.org/web/20111228191351/http://www.eat.rl.ac.uk/'
citation = [('G. R. Kiss, C. Armstrong, R. Milroy, J. Piper, "An associative thesaurus of English and its computer analysis." In A. J. Aitken, R. W. Bailey, N. Hamilton-Smith (Eds.), The Computer and Literary Studies, 153-165. Edinburgh University Press (1973)', 'https://web.archive.org/web/20150513211304/http://www.eat.rl.ac.uk/Kiss_EAT_Chapter_1973.pdf')]
[entries] Remove unneeded code from the entries 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/word_assoc/__init__.py b/entries/word_assoc/__init__.py
index 04fc3af..8972266 100644
--- a/entries/word_assoc/__init__.py
+++ b/entries/word_assoc/__init__.py
@@ -44,7 +44,6 @@ def fetch_upstream(force=False):
@coerce_props()
@annotate()
def parse(alts=None):
- global files
name = __name__.split(".")[-1]
for fname, alt, fmt in files:
if alts is not None and alt not in alts:
[entries] Move KONECT-derived entries to their original sources 45943ea
The entries now download the data from where KONECT obtained them (live or via the Wayback Machine), gaining the metadata KONECT dropped (names, identifiers, timestamps, attributes), with descriptions and citations rewritten from the original sources: - Ma'ayan lab collection: faa_routes, foodweb_little_rock (taxon names were assigned to the wrong nodes), interactome_pdz, interactome_figeys, interactome_stelzl, interactome_vidal - Pajek collection and primary sources: word_assoc (from the Edinburgh Associative Thesaurus; KONECT dropped all counts >= 10), foldoc, new_guinea_tribes - bitriad: elite, ceo_club (adds the CEO KONECT's copy lacked) - Lovro Subelj: cora, euroroad (adds isolated cities and parallel roads) - SNAP: elec (all votes, with elections and nominators) - Zenodo: wiki_talk (user ids and roles) - MPI-SWS: flickr_growth, facebook_wall (edges now point from poster to wall owner, as documented), wikipedia_growth (full timestamps) - Other sources: prosper, jester, reactome (the 2014 release KONECT used), unicodelang (CLDR 27), wordnet (WordNet 3.1), chicago_road (TNTP ChicagoRegional)
diff --git a/entries/word_assoc/__init__.py b/entries/word_assoc/__init__.py
index 2e48c3f..04fc3af 100644
--- a/entries/word_assoc/__init__.py
+++ b/entries/word_assoc/__init__.py
@@ -18,15 +18,23 @@
from .. import *
-title = "Edinburgh word associations"
-description = """A network of word associations showing the count of such associations as collected from subjects, from the Edinburgh Associative Thesaurus (EAT). Each node represents a word, and a directed edge (i, j) denotes that word i was used as a stimulus to which word j was given as a response. Multiple edges are allowed.[^icon]
-[^icon]: Description obtained from the [ICON](https://icon.colorado.edu) project."""
-tags = ['Informational', 'Language', 'Unweighted', 'Multigraph']
-url = 'http://konect.cc/networks/eat'
-citation = [('G. Kiss et al. "An associative thesaurus of English and its computer analysis." The computer and literary studies (1973): 153-165.', 'http://www.eat.rl.ac.uk/Kiss_EAT_Chapter_1973.pdf')]
+title = "Edinburgh word associations (1968-1971)"
+description = """A network of word associations from the Edinburgh Associative Thesaurus (EAT), a set of empirical word association norms collected by George Kiss and collaborators between June 1968 and May 1971. Subjects, mostly undergraduates from a wide range of British universities (aged 17 to 22), were shown a stimulus word and asked to give the first word that came to mind. Each stimulus word was presented to 100 different subjects, each of whom received 100 words. The network was grown from a nucleus set of words: the responses to these were used as new stimuli, and so on, about three times, until 8,400 stimulus words had been used. The data were obtained from the version of the EAT distributed by the Rutherford Appleton Laboratory (derived from the MRC Psycholinguistic Database version), from its stimulus–response file.
+
+Nodes are words (or short phrases, as given by the subjects; words longer than 19 characters were truncated, with a `%` as 20th character; the empty word represents blank responses), and a directed edge points from a stimulus word to a response given to it. The file contains 8,210 stimuli; the last line of the file lists a response without its stimulus word, and is ignored. Self-loops denote stimulus words given as their own response.
+
+The network has the following properties:
+
+- Nodes: `name`, the word; `stimulus`, whether the word was used as a stimulus.
+- Edges: `count`, the number of subjects who gave the response to the stimulus."""
+tags = ['Informational', 'Language', 'Weighted', 'Metadata']
+url = 'https://web.archive.org/web/20111228191351/http://www.eat.rl.ac.uk/'
+citation = [('G. R. Kiss, C. Armstrong, R. Milroy, J. Piper, "An associative thesaurus of English and its computer analysis." In A. J. Aitken, R. W. Bailey, N. Hamilton-Smith (Eds.), The Computer and Literary Studies, 153-165. Edinburgh University Press (1973)', 'https://web.archive.org/web/20150513211304/http://www.eat.rl.ac.uk/Kiss_EAT_Chapter_1973.pdf')]
icon_hash = '580655df8cf714f319c3be8b'
-upstream_prefix = 'http://konect.cc/files'
-files = [('download.tsv.eat.tar.bz2', None, 'konect')]
+upstream_license = None
+# The EAT site is gone; the archive is obtained from the Internet Archive.
+upstream_prefix = 'https://web.archive.org/web/20110716112113id_/http://www.eat.rl.ac.uk'
+files = [('eat.zip:sr_concise', None, 'eat')]
def fetch_upstream(force=False):
return fetch_upstream_files(__name__.split(".")[-1], upstream_prefix, files,
@@ -38,12 +46,36 @@ def fetch_upstream(force=False):
def parse(alts=None):
global files
name = __name__.split(".")[-1]
- for fnames, alt, fmt in files:
+ for fname, 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)
+ # Each stimulus occupies two lines: the stimulus word, and the list
+ # of its responses and their counts, separated by "|".
+ with open_upstream_file(name, fname, "rb") as f:
+ lines = f.read().decode("latin-1").split("\n")
+ if lines[-1] == "":
+ lines = lines[:-1]
+ # the last line is a response list without its stimulus
+ if len(lines) % 2 == 1 and "|" in lines[-1]:
+ lines = lines[:-1]
+ vs = {}
+ stimuli = set()
+ edges = []
+ for i in range(0, len(lines), 2):
+ s = lines[i]
+ assert "|" not in s
+ r = lines[i + 1].split("|")
+ u = vs.setdefault(s, len(vs))
+ stimuli.add(u)
+ for w, c in zip(r[::2], r[1::2]):
+ edges.append((u, vs.setdefault(w, len(vs)), int(c)))
+ g = Graph(directed=True)
+ g.add_vertex(len(vs))
+ g.vp.name = g.new_vp("string")
+ g.vp.stimulus = g.new_vp("bool")
+ for w, v in vs.items():
+ g.vp.name[v] = w
+ g.vp.stimulus[v] = v in stimuli
+ g.ep.count = g.new_ep("int")
+ g.add_edge_list(edges, eprops=[g.ep.count])
yield alt, g
Update copyright information 73a4f0d
diff --git a/entries/word_assoc/__init__.py b/entries/word_assoc/__init__.py
index ceb4297..2e48c3f 100644
--- a/entries/word_assoc/__init__.py
+++ b/entries/word_assoc/__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 3d288ea
diff --git a/entries/word_assoc/__init__.py b/entries/word_assoc/__init__.py
index b8c07a3..ceb4297 100644
--- a/entries/word_assoc/__init__.py
+++ b/entries/word_assoc/__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 8d005ae
diff --git a/entries/word_assoc/__init__.py b/entries/word_assoc/__init__.py
index ec7f195..b8c07a3 100644
--- a/entries/word_assoc/__init__.py
+++ b/entries/word_assoc/__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 db2efcc
diff --git a/entries/word_assoc/__init__.py b/entries/word_assoc/__init__.py
index d29dca9..ec7f195 100644
--- a/entries/word_assoc/__init__.py
+++ b/entries/word_assoc/__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 894eba5
KONECT has been brought back from the dead for the time being.
diff --git a/entries/word_assoc/__init__.py b/entries/word_assoc/__init__.py
index c77c20b..d29dca9 100644
--- a/entries/word_assoc/__init__.py
+++ b/entries/word_assoc/__init__.py
@@ -26,7 +26,6 @@ url = 'http://konect.cc/networks/eat'
citation = [('G. Kiss et al. "An associative thesaurus of English and its computer analysis." The computer and literary studies (1973): 153-165.', 'http://www.eat.rl.ac.uk/Kiss_EAT_Chapter_1973.pdf')]
icon_hash = '580655df8cf714f319c3be8b'
upstream_prefix = 'http://konect.cc/files'
-orphan = True
files = [('download.tsv.eat.tar.bz2', None, 'konect')]
def fetch_upstream(force=False):
Add support for 'orphan' datasets and tag konect entries e330b80
diff --git a/entries/word_assoc/__init__.py b/entries/word_assoc/__init__.py
index d29dca9..c77c20b 100644
--- a/entries/word_assoc/__init__.py
+++ b/entries/word_assoc/__init__.py
@@ -26,6 +26,7 @@ url = 'http://konect.cc/networks/eat'
citation = [('G. Kiss et al. "An associative thesaurus of English and its computer analysis." The computer and literary studies (1973): 153-165.', 'http://www.eat.rl.ac.uk/Kiss_EAT_Chapter_1973.pdf')]
icon_hash = '580655df8cf714f319c3be8b'
upstream_prefix = 'http://konect.cc/files'
+orphan = True
files = [('download.tsv.eat.tar.bz2', None, 'konect')]
def fetch_upstream(force=False):
Change license from GPLv3 to AGPLv3 d754be5
diff --git a/entries/word_assoc/__init__.py b/entries/word_assoc/__init__.py
index b93bb92..d29dca9 100644
--- a/entries/word_assoc/__init__.py
+++ b/entries/word_assoc/__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 1645314
diff --git a/entries/word_assoc/__init__.py b/entries/word_assoc/__init__.py
index 2d0a0ce..b93bb92 100644
--- a/entries/word_assoc/__init__.py
+++ b/entries/word_assoc/__init__.py
@@ -19,7 +19,8 @@
from .. import *
title = "Edinburgh word associations"
-description = "A network of word associations showing the count of such associations as collected from subjects, from the Edinburgh Associative Thesaurus (EAT). Each node represents a word, and a directed edge (i, j) denotes that word i was used as a stimulus to which word j was given as a response. Multiple edges are allowed."
+description = """A network of word associations showing the count of such associations as collected from subjects, from the Edinburgh Associative Thesaurus (EAT). Each node represents a word, and a directed edge (i, j) denotes that word i was used as a stimulus to which word j was given as a response. Multiple edges are allowed.[^icon]
+[^icon]: Description obtained from the [ICON](https://icon.colorado.edu) project."""
tags = ['Informational', 'Language', 'Unweighted', 'Multigraph']
url = 'http://konect.cc/networks/eat'
citation = [('G. Kiss et al. "An associative thesaurus of English and its computer analysis." The computer and literary studies (1973): 153-165.', 'http://www.eat.rl.ac.uk/Kiss_EAT_Chapter_1973.pdf')]
Initial commit cc85872
diff --git a/entries/word_assoc/__init__.py b/entries/word_assoc/__init__.py
new file mode 100644
index 0000000..2d0a0ce
--- /dev/null
+++ b/entries/word_assoc/__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 = "Edinburgh word associations"
+description = "A network of word associations showing the count of such associations as collected from subjects, from the Edinburgh Associative Thesaurus (EAT). Each node represents a word, and a directed edge (i, j) denotes that word i was used as a stimulus to which word j was given as a response. Multiple edges are allowed."
+tags = ['Informational', 'Language', 'Unweighted', 'Multigraph']
+url = 'http://konect.cc/networks/eat'
+citation = [('G. Kiss et al. "An associative thesaurus of English and its computer analysis." The computer and literary studies (1973): 153-165.', 'http://www.eat.rl.ac.uk/Kiss_EAT_Chapter_1973.pdf')]
+icon_hash = '580655df8cf714f319c3be8b'
+upstream_prefix = 'http://konect.cc/files'
+files = [('download.tsv.eat.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