Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save he7d3r/f945adb3f47c2bd22d0e7589ef6afdce to your computer and use it in GitHub Desktop.
Save he7d3r/f945adb3f47c2bd22d0e7589ef6afdce to your computer and use it in GitHub Desktop.
Quality assessments by bots by year on ptwiki
Display the source blob
Display the rendered blob
Raw
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
diff --git a/articlequality/extractors/extractor.py b/articlequality/extractors/extractor.py
index d8899f9..a0257e1 100644
--- a/articlequality/extractors/extractor.py
+++ b/articlequality/extractors/extractor.py
@@ -103,6 +103,7 @@ class Extractor:
if len(new_labels) > 0:
labelings[revision.id] = [
{'rev_id': revision.id,
+ 'user': str(revision.user.text),
'project': project,
'wp10': wp10,
'timestamp': revision.timestamp,
diff --git a/articlequality/utilities/extract_labelings.py b/articlequality/utilities/extract_labelings.py
index f5d42a6..8978ebc 100644
--- a/articlequality/utilities/extract_labelings.py
+++ b/articlequality/utilities/extract_labelings.py
@@ -125,7 +125,7 @@ def extract_labelings(dump, extractor=None, verbose=False):
for obs in extractor.extract(page, verbose=verbose):
yield {'page_title': normalize_title(page.title, page.namespace),
- 'project': obs['project'],
+ 'project': obs['project'], 'user': obs['user'],
'timestamp': obs['timestamp'].short_format(),
'wp10': obs['wp10']}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment