History of stem_forma_mentis
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/stem_forma_mentis/__init__.py b/entries/stem_forma_mentis/__init__.py
index 716c927..587f64d 100644
--- a/entries/stem_forma_mentis/__init__.py
+++ b/entries/stem_forma_mentis/__init__.py
@@ -33,7 +33,7 @@ The networks have the following properties:
tags = ['Informational', 'Language', 'Unweighted', 'Metadata']
url = 'https://osf.io/xyfwg/'
citation = [('M. Stella, S. De Nigris, A. Aloric, C. S. Q. Siew, "Forma mentis networks quantify crucial differences in STEM perception between students and experts." PLOS ONE 14(10), e0222870 (2019)', 'https://doi.org/10.1371/journal.pone.0222870')]
-icon_hash = '5ee44babc12b3c8702b556bf'
+date_added = '2026-10-25'
upstream_license = ('Creative Commons Attribution 4.0 International (CC BY 4.0)', 'https://creativecommons.org/licenses/by/4.0/')
upstream_prefix = 'https://osf.io/download'
files = [(('qcpnh:zip:FormaMentisStudents.txt',
[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/stem_forma_mentis/__init__.py b/entries/stem_forma_mentis/__init__.py
index e4890bc..716c927 100644
--- a/entries/stem_forma_mentis/__init__.py
+++ b/entries/stem_forma_mentis/__init__.py
@@ -28,7 +28,8 @@ description = """Forma mentis networks (semantic networks of free associations a
The networks have the following properties:
-- Nodes: `name`, the word; `valence`, the valence category of the word ("Positive", "Neutral" or "Negative"). A word was labeled as positive (negative) if its median valence score was higher (lower) than that of the remaining words, according to a Kruskal-Wallis test at significance level 0.1, and neutral otherwise. The labels come from the valence files of the complete networks, and are empty for the few words that are missing from them (1 word in each complete network, and 13 in each filtered network, which contain a few words in different forms)."""
+- (Node) `name`: the word.
+- (Node) `valence`: the valence category of the word ("Positive", "Neutral" or "Negative"). A word was labeled as positive (negative) if its median valence score was higher (lower) than that of the remaining words, according to a Kruskal-Wallis test at significance level 0.1, and neutral otherwise. The labels come from the valence files of the complete networks, and are empty for the few words that are missing from them (1 word in each complete network, and 13 in each filtered network, which contain a few words in different forms)."""
tags = ['Informational', 'Language', 'Unweighted', 'Metadata']
url = 'https://osf.io/xyfwg/'
citation = [('M. Stella, S. De Nigris, A. Aloric, C. S. Q. Siew, "Forma mentis networks quantify crucial differences in STEM perception between students and experts." PLOS ONE 14(10), e0222870 (2019)', 'https://doi.org/10.1371/journal.pone.0222870')]
[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/stem_forma_mentis/__init__.py b/entries/stem_forma_mentis/__init__.py
index 3cb93bd..e4890bc 100644
--- a/entries/stem_forma_mentis/__init__.py
+++ b/entries/stem_forma_mentis/__init__.py
@@ -52,7 +52,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] Use American spelling in the descriptions 802d564
British spellings in the titles and descriptions of 69 entries (e.g. labelled, organisation, millimetres, centres, anonymised, neighbours, analysed, modelled, colour, licence) are replaced by the American ones. Proper names keep their spelling (Otago Harbour, the Centre for Water Systems, the Centre jeunesse de Montréal, the Dutch Ministry of Defence), as do quoted upstream terms, citations, and property names.
diff --git a/entries/stem_forma_mentis/__init__.py b/entries/stem_forma_mentis/__init__.py
index b0f265d..3cb93bd 100644
--- a/entries/stem_forma_mentis/__init__.py
+++ b/entries/stem_forma_mentis/__init__.py
@@ -28,7 +28,7 @@ description = """Forma mentis networks (semantic networks of free associations a
The networks have the following properties:
-- Nodes: `name`, the word; `valence`, the valence category of the word ("Positive", "Neutral" or "Negative"). A word was labelled as positive (negative) if its median valence score was higher (lower) than that of the remaining words, according to a Kruskal-Wallis test at significance level 0.1, and neutral otherwise. The labels come from the valence files of the complete networks, and are empty for the few words that are missing from them (1 word in each complete network, and 13 in each filtered network, which contain a few words in different forms)."""
+- Nodes: `name`, the word; `valence`, the valence category of the word ("Positive", "Neutral" or "Negative"). A word was labeled as positive (negative) if its median valence score was higher (lower) than that of the remaining words, according to a Kruskal-Wallis test at significance level 0.1, and neutral otherwise. The labels come from the valence files of the complete networks, and are empty for the few words that are missing from them (1 word in each complete network, and 13 in each filtered network, which contain a few words in different forms)."""
tags = ['Informational', 'Language', 'Unweighted', 'Metadata']
url = 'https://osf.io/xyfwg/'
citation = [('M. Stella, S. De Nigris, A. Aloric, C. S. Q. Siew, "Forma mentis networks quantify crucial differences in STEM perception between students and experts." PLOS ONE 14(10), e0222870 (2019)', 'https://doi.org/10.1371/journal.pone.0222870')]
[entries] New entry: stem_forma_mentis 8149a00
diff --git a/entries/stem_forma_mentis/__init__.py b/entries/stem_forma_mentis/__init__.py
new file mode 100644
index 0000000..b0f265d
--- /dev/null
+++ b/entries/stem_forma_mentis/__init__.py
@@ -0,0 +1,70 @@
+#! /usr/bin/env python
+# -*- coding: utf-8 -*-
+#
+# 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
+# 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 Affero General Public License for more
+# details.
+#
+# 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 *
+
+title = "STEM forma mentis networks of students and researchers (2019)"
+description = """Forma mentis networks (semantic networks of free associations annotated with the emotional valence of each concept) of 159 Italian high-school students (in their final year, aged 18 to 19) and 59 early-career international STEM researchers (doctoral students and post-docs working with quantitative methods on complex systems), from Stella et al. Each participant took part in a continuous free association task, in which they gave three associated words for each of 50 cue words: 10 cues common to all participants (mathematics, complex, physics, chemistry, system, biology, life, art, school and university), and 40 drawn at random from 390 frequent words of the Wikipedia pages on complex systems, physics, mathematics, biology, chemistry and psychology. The students answered in Italian, and the researchers in English. Each node is a word (converted to lowercase, spell-checked, and normalized to singular forms), and an undirected edge connects a cue to an associated response. Afterwards, the participants rated the valence of the cues and responses on a scale from 1 (very negative) to 5 (very positive). The following networks are included:
+
+- `students`: all associations given by the students.
+- `students_filtered`: only the associations given by at least two different students.
+- `researchers`: all associations given by the researchers.
+- `researchers_filtered`: the filtered network of the researchers, as distributed with the data (the paper analyzes only the unfiltered network of researchers, due to the smaller sample size).
+
+The networks have the following properties:
+
+- Nodes: `name`, the word; `valence`, the valence category of the word ("Positive", "Neutral" or "Negative"). A word was labelled as positive (negative) if its median valence score was higher (lower) than that of the remaining words, according to a Kruskal-Wallis test at significance level 0.1, and neutral otherwise. The labels come from the valence files of the complete networks, and are empty for the few words that are missing from them (1 word in each complete network, and 13 in each filtered network, which contain a few words in different forms)."""
+tags = ['Informational', 'Language', 'Unweighted', 'Metadata']
+url = 'https://osf.io/xyfwg/'
+citation = [('M. Stella, S. De Nigris, A. Aloric, C. S. Q. Siew, "Forma mentis networks quantify crucial differences in STEM perception between students and experts." PLOS ONE 14(10), e0222870 (2019)', 'https://doi.org/10.1371/journal.pone.0222870')]
+icon_hash = '5ee44babc12b3c8702b556bf'
+upstream_license = ('Creative Commons Attribution 4.0 International (CC BY 4.0)', 'https://creativecommons.org/licenses/by/4.0/')
+upstream_prefix = 'https://osf.io/download'
+files = [(('qcpnh:zip:FormaMentisStudents.txt',
+ 'qcpnh:zip:ValenceLabelsStudents.txt'), 'students', None),
+ (('qcpnh:zip:FormaMentisStudentsFiltered.txt',
+ 'qcpnh:zip:ValenceLabelsStudents.txt'), 'students_filtered', None),
+ (('qcpnh:zip:FormaMentisResearchers.txt',
+ 'qcpnh:zip:ValenceLabelsResearchers.txt'), 'researchers', None),
+ (('qcpnh:zip:FormaMentisResearchersFiltered.txt',
+ 'qcpnh:zip:ValenceLabelsResearchers.txt'), 'researchers_filtered', None)]
+
+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
+ with ExitStack() as stack:
+ fs = [stack.enter_context(open_upstream_file(name, fn, "r")) for fn in fnames]
+ # Tab-separated word pairs
+ edges = [l.rstrip("\r\n").split("\t") for l in fs[0] if l.strip()]
+ # Tab-separated word, valence
+ labels = dict(l.rstrip("\r\n").split("\t") for l in fs[1] if l.strip())
+ g = Graph(directed=False)
+ g.vp.name = g.add_edge_list(edges, hashed=True, hash_type="string")
+ g.vp.valence = g.new_vp("string", vals=[labels.get(g.vp.name[v], "")
+ for v in g.vertices()])
+ yield alt, g