# Imports
import gzip
import json
import re
import mwapi
import pandas as pd
# Parameters for accessing the API that contains metadata about each translated article
session = mwapi.Session(host='https://en.wikipedia.org',
                        user_agent='mwapi (python) -- outreachy content translation')

# articles translated from English -> Arabic
parameters = {'action':'query',
              'format':'json',
              'list':'cxpublishedtranslations',
              'from':'en',
              'to':'ar',
              'limit':500,
              'offset':10000}
res = session.get(parameters)
res['result']['translations'][:15]
[{'translationId': '471114',
  'sourceTitle': 'Boeing XP-7',
  'targetTitle': 'بوينغ أكس بي-7',
  'sourceLanguage': 'en',
  'sourceRevisionId': '782952416',
  'targetRevisionId': '28508242',
  'targetLanguage': 'ar',
  'sourceURL': '//en.wikipedia.org/wiki/Boeing XP-7',
  'targetURL': '//ar.wikipedia.org/wiki/بوينغ أكس بي-7',
  'publishedDate': '20180605032505',
  'stats': {'any': 0.19368421052632,
   'human': 0.058421052631579,
   'mt': 0.13526315789474,
   'mtSectionsCount': 6}},
 {'translationId': '471116',
  'sourceTitle': 'Boeing 929',
  'targetTitle': 'بوينغ 929',
  'sourceLanguage': 'en',
  'sourceRevisionId': '832530583',
  'targetRevisionId': '28508290',
  'targetLanguage': 'ar',
  'sourceURL': '//en.wikipedia.org/wiki/Boeing 929',
  'targetURL': '//ar.wikipedia.org/wiki/بوينغ 929',
  'publishedDate': '20180605032503',
  'stats': {'any': 0.40936421882701,
   'human': 0.39339576145885,
   'mt': 0.015968457368162,
   'mtSectionsCount': 8}},
 {'translationId': '471126',
  'sourceTitle': 'Boeing Model 203',
  'targetTitle': 'بوينغ طراز 203',
  'sourceLanguage': 'en',
  'sourceRevisionId': '806818822',
  'targetRevisionId': '28508360',
  'targetLanguage': 'ar',
  'sourceURL': '//en.wikipedia.org/wiki/Boeing Model 203',
  'targetURL': '//ar.wikipedia.org/wiki/بوينغ طراز 203',
  'publishedDate': '20180605032500',
  'stats': {'any': 0.089250297500992,
   'human': 0.061880206267354,
   'mt': 0.027370091233637,
   'mtSectionsCount': 4}},
 {'translationId': '471180',
  'sourceTitle': 'Khash County',
  'targetTitle': 'مستخدم:أبو هشام السوعان/م',
  'sourceLanguage': 'en',
  'sourceRevisionId': '778801526',
  'targetRevisionId': '28509114',
  'targetLanguage': 'ar',
  'sourceURL': '//en.wikipedia.org/wiki/Khash County',
  'targetURL': '//ar.wikipedia.org/wiki/مستخدم:أبو هشام السوعان/مسودة',
  'publishedDate': '20180507084220',
  'stats': {'any': 0.9297385620915,
   'human': 0.74509803921569,
   'mt': 0.18464052287582,
   'mtSectionsCount': 2}},
 {'translationId': '471186',
  'sourceTitle': 'Altab Ali',
  'targetTitle': 'أطلب علي',
  'sourceLanguage': 'en',
  'sourceRevisionId': '839161567',
  'targetRevisionId': '28509190',
  'targetLanguage': 'ar',
  'sourceURL': '//en.wikipedia.org/wiki/Altab Ali',
  'targetURL': '//ar.wikipedia.org/wiki/أطلب علي',
  'publishedDate': '20180507090033',
  'stats': {'any': 0.12379853902345,
   'human': 0.12290144816096,
   'mt': 0.00089709086248879,
   'mtSectionsCount': 1}},
 {'translationId': '471210',
  'sourceTitle': 'United Arab Emirates takeover of Socotra',
  'targetTitle': 'استيلاء الإمارات على سقطرى',
  'sourceLanguage': 'en',
  'sourceRevisionId': '840018869',
  'targetRevisionId': '28509443',
  'targetLanguage': 'ar',
  'sourceURL': '//en.wikipedia.org/wiki/United Arab Emirates takeover of Socotra',
  'targetURL': '//ar.wikipedia.org/wiki/استيلاء الإمارات على سقطرى',
  'publishedDate': '20180507100129',
  'stats': {'any': 0.3146913937989,
   'human': 0.3146913937989,
   'mt': 0,
   'mtSectionsCount': 0}},
 {'translationId': '471277',
  'sourceTitle': 'Macaroni',
  'targetTitle': 'ماكاروني',
  'sourceLanguage': 'en',
  'sourceRevisionId': '838716372',
  'targetRevisionId': '28510927',
  'targetLanguage': 'ar',
  'sourceURL': '//en.wikipedia.org/wiki/Macaroni',
  'targetURL': '//ar.wikipedia.org/wiki/ماكاروني',
  'publishedDate': '20180507150317',
  'stats': {'any': 0.9611886976291,
   'human': 0.94462487820721,
   'mt': 0.01656381942189,
   'mtSectionsCount': 4}},
 {'translationId': '471304',
  'sourceTitle': 'Perdita Weeks',
  'targetTitle': 'مستخدم:0Albaraa0/Perdita Weeks',
  'sourceLanguage': 'en',
  'sourceRevisionId': '838698827',
  'targetRevisionId': '28510717',
  'targetLanguage': 'ar',
  'sourceURL': '//en.wikipedia.org/wiki/Perdita Weeks',
  'targetURL': '//ar.wikipedia.org/wiki/مستخدم:0Albaraa0/Perdita Weeks',
  'publishedDate': '20180507142649',
  'stats': {'any': 0.86446043165468,
   'human': 0.42647482014388,
   'mt': 0.43798561151079,
   'mtSectionsCount': 3}},
 {'translationId': '471312',
  'sourceTitle': '1977–78 Serie A',
  'targetTitle': 'مستخدم:علاء فحصي/ملعب5',
  'sourceLanguage': 'en',
  'sourceRevisionId': '819867399',
  'targetRevisionId': '28510462',
  'targetLanguage': 'ar',
  'sourceURL': '//en.wikipedia.org/wiki/1977–78 Serie A',
  'targetURL': '//ar.wikipedia.org/wiki/مستخدم:علاء فحصي/ملعب5',
  'publishedDate': '20180507132212',
  'stats': {'any': 0.41451414514145,
   'human': 0.013837638376384,
   'mt': 0.40067650676507,
   'mtSectionsCount': 16}},
 {'translationId': '471328',
  'sourceTitle': 'Tortiglioni',
  'targetTitle': 'تورتيليوني',
  'sourceLanguage': 'en',
  'sourceRevisionId': '822229634',
  'targetRevisionId': '28510621',
  'targetLanguage': 'ar',
  'sourceURL': '//en.wikipedia.org/wiki/Tortiglioni',
  'targetURL': '//ar.wikipedia.org/wiki/تورتيليوني',
  'publishedDate': '20180507140314',
  'stats': {'any': 0.49677419354839,
   'human': 0.47096774193548,
   'mt': 0.025806451612903,
   'mtSectionsCount': 1}},
 {'translationId': '471377',
  'sourceTitle': 'Captain Scarlet and the Mysterons',
  'targetTitle': 'كابتن سكارليت و ذا ميسترونس',
  'sourceLanguage': 'en',
  'sourceRevisionId': '837180108',
  'targetRevisionId': '28597712',
  'targetLanguage': 'ar',
  'sourceURL': '//en.wikipedia.org/wiki/Captain Scarlet and the Mysterons',
  'targetURL': '//ar.wikipedia.org/wiki/كابتن سكارليت و ذا ميسترونس',
  'publishedDate': '20180512101232',
  'stats': {'any': 0.16274635674661,
   'human': 0.16274635674661,
   'mt': 0,
   'mtSectionsCount': 0}},
 {'translationId': '471402',
  'sourceTitle': 'Lie theory',
  'targetTitle': 'مستخدم:علاء فحصي/ملعب4\xa0',
  'sourceLanguage': 'en',
  'sourceRevisionId': '836228309',
  'targetRevisionId': '28511223',
  'targetLanguage': 'ar',
  'sourceURL': '//en.wikipedia.org/wiki/Lie theory',
  'targetURL': '//ar.wikipedia.org/wiki/مستخدم:علاء فحصي/ملعب4\xa0',
  'publishedDate': '20180507160241',
  'stats': {'any': 0.56175354784319,
   'human': 0.11746522411128,
   'mt': 0.44428832373191,
   'mtSectionsCount': 17}},
 {'translationId': '471407',
  'sourceTitle': 'Avro 720',
  'targetTitle': 'أفرو 720',
  'sourceLanguage': 'en',
  'sourceRevisionId': '838479068',
  'targetRevisionId': '28511307',
  'targetLanguage': 'ar',
  'sourceURL': '//en.wikipedia.org/wiki/Avro 720',
  'targetURL': '//ar.wikipedia.org/wiki/أفرو 720',
  'publishedDate': '20180605032458',
  'stats': {'any': 0.093966854437097,
   'human': 0.020409829373826,
   'mt': 0.07355702506327,
   'mtSectionsCount': 5}},
 {'translationId': '471422',
  'sourceTitle': 'Busiate',
  'targetTitle': 'بوسياته',
  'sourceLanguage': 'en',
  'sourceRevisionId': '832951327',
  'targetRevisionId': '28511465',
  'targetLanguage': 'ar',
  'sourceURL': '//en.wikipedia.org/wiki/Busiate',
  'targetURL': '//ar.wikipedia.org/wiki/بوسياته',
  'publishedDate': '20180507164303',
  'stats': {'any': 0.8780303030303,
   'human': 0.86439393939394,
   'mt': 0.013636363636364,
   'mtSectionsCount': 1}},
 {'translationId': '471426',
  'sourceTitle': 'Avro 707',
  'targetTitle': 'أفرو 707',
  'sourceLanguage': 'en',
  'sourceRevisionId': '807013022',
  'targetRevisionId': '28511464',
  'targetLanguage': 'ar',
  'sourceURL': '//en.wikipedia.org/wiki/Avro 707',
  'targetURL': '//ar.wikipedia.org/wiki/أفرو 707',
  'publishedDate': '20180605032455',
  'stats': {'any': 0.057442557442557,
   'human': 0.040709290709291,
   'mt': 0.016733266733267,
   'mtSectionsCount': 5}}]
df = pd.DataFrame(res['result']['translations'])
df.head(15)
publishedDate sourceLanguage sourceRevisionId sourceTitle sourceURL stats targetLanguage targetRevisionId targetTitle targetURL translationId
0 20180605032505 en 782952416 Boeing XP-7 //en.wikipedia.org/wiki/Boeing XP-7 {'any': 0.19368421052632, 'human': 0.058421052... ar 28508242 بوينغ أكس بي-7 //ar.wikipedia.org/wiki/بوينغ أكس بي-7 471114
1 20180605032503 en 832530583 Boeing 929 //en.wikipedia.org/wiki/Boeing 929 {'any': 0.40936421882701, 'human': 0.393395761... ar 28508290 بوينغ 929 //ar.wikipedia.org/wiki/بوينغ 929 471116
2 20180605032500 en 806818822 Boeing Model 203 //en.wikipedia.org/wiki/Boeing Model 203 {'any': 0.089250297500992, 'human': 0.06188020... ar 28508360 بوينغ طراز 203 //ar.wikipedia.org/wiki/بوينغ طراز 203 471126
3 20180507084220 en 778801526 Khash County //en.wikipedia.org/wiki/Khash County {'any': 0.9297385620915, 'human': 0.7450980392... ar 28509114 مستخدم:أبو هشام السوعان/م //ar.wikipedia.org/wiki/مستخدم:أبو هشام السوعا... 471180
4 20180507090033 en 839161567 Altab Ali //en.wikipedia.org/wiki/Altab Ali {'any': 0.12379853902345, 'human': 0.122901448... ar 28509190 أطلب علي //ar.wikipedia.org/wiki/أطلب علي 471186
5 20180507100129 en 840018869 United Arab Emirates takeover of Socotra //en.wikipedia.org/wiki/United Arab Emirates t... {'any': 0.3146913937989, 'human': 0.3146913937... ar 28509443 استيلاء الإمارات على سقطرى //ar.wikipedia.org/wiki/استيلاء الإمارات على س... 471210
6 20180507150317 en 838716372 Macaroni //en.wikipedia.org/wiki/Macaroni {'any': 0.9611886976291, 'human': 0.9446248782... ar 28510927 ماكاروني //ar.wikipedia.org/wiki/ماكاروني 471277
7 20180507142649 en 838698827 Perdita Weeks //en.wikipedia.org/wiki/Perdita Weeks {'any': 0.86446043165468, 'human': 0.426474820... ar 28510717 مستخدم:0Albaraa0/Perdita Weeks //ar.wikipedia.org/wiki/مستخدم:0Albaraa0/Perdi... 471304
8 20180507132212 en 819867399 1977–78 Serie A //en.wikipedia.org/wiki/1977–78 Serie A {'any': 0.41451414514145, 'human': 0.013837638... ar 28510462 مستخدم:علاء فحصي/ملعب5 //ar.wikipedia.org/wiki/مستخدم:علاء فحصي/ملعب5 471312
9 20180507140314 en 822229634 Tortiglioni //en.wikipedia.org/wiki/Tortiglioni {'any': 0.49677419354839, 'human': 0.470967741... ar 28510621 تورتيليوني //ar.wikipedia.org/wiki/تورتيليوني 471328
10 20180512101232 en 837180108 Captain Scarlet and the Mysterons //en.wikipedia.org/wiki/Captain Scarlet and th... {'any': 0.16274635674661, 'human': 0.162746356... ar 28597712 كابتن سكارليت و ذا ميسترونس //ar.wikipedia.org/wiki/كابتن سكارليت و ذا ميس... 471377
11 20180507160241 en 836228309 Lie theory //en.wikipedia.org/wiki/Lie theory {'any': 0.56175354784319, 'human': 0.117465224... ar 28511223 مستخدم:علاء فحصي/ملعب4 //ar.wikipedia.org/wiki/مستخدم:علاء فحصي/ملعب4 471402
12 20180605032458 en 838479068 Avro 720 //en.wikipedia.org/wiki/Avro 720 {'any': 0.093966854437097, 'human': 0.02040982... ar 28511307 أفرو 720 //ar.wikipedia.org/wiki/أفرو 720 471407
13 20180507164303 en 832951327 Busiate //en.wikipedia.org/wiki/Busiate {'any': 0.8780303030303, 'human': 0.8643939393... ar 28511465 بوسياته //ar.wikipedia.org/wiki/بوسياته 471422
14 20180605032455 en 807013022 Avro 707 //en.wikipedia.org/wiki/Avro 707 {'any': 0.057442557442557, 'human': 0.04070929... ar 28511464 أفرو 707 //ar.wikipedia.org/wiki/أفرو 707 471426
df[df['sourceTitle'] == 'United Arab Emirates takeover of Socotra']
publishedDate sourceLanguage sourceRevisionId sourceTitle sourceURL stats targetLanguage targetRevisionId targetTitle targetURL translationId
5 20180507100129 en 840018869 United Arab Emirates takeover of Socotra //en.wikipedia.org/wiki/United Arab Emirates t... {'any': 0.3146913937989, 'human': 0.3146913937... ar 28509443 استيلاء الإمارات على سقطرى //ar.wikipedia.org/wiki/استيلاء الإمارات على س... 471210
416 20180523175900 en 842026648 United Arab Emirates takeover of Socotra //en.wikipedia.org/wiki/United Arab Emirates t... {'any': 0.83350550964187, 'human': 0.306129476... ar 28749608 مستخدم:علاء فحصي/ملعب5 //ar.wikipedia.org/wiki/مستخدم:علاء فحصي/ملعب5 479112
df[df['sourceTitle'] == 'Macaroni']
publishedDate sourceLanguage sourceRevisionId sourceTitle sourceURL stats targetLanguage targetRevisionId targetTitle targetURL translationId
6 20180507150317 en 838716372 Macaroni //en.wikipedia.org/wiki/Macaroni {'any': 0.9611886976291, 'human': 0.9446248782... ar 28510927 ماكاروني //ar.wikipedia.org/wiki/ماكاروني 471277
gboost_source_title = df.loc[5, 'sourceTitle']
gboost_target_title = df.loc[5, 'targetTitle']
gboost_tid = df.loc[5,'translationId']
gboost_source_revid = df.loc[5, 'sourceRevisionId']
print(gboost_source_title)
print(gboost_target_title)
print(gboost_tid)
print(gboost_source_revid)
United Arab Emirates takeover of Socotra
استيلاء الإمارات على سقطرى
471210
840018869
# get corresponding parallel translation
json_str = ""
with gzip.open('cx-corpora.en2ar.text.json.gz', 'rt') as fin:
    for line in fin:
        json_str += line.strip()
# remove repetitive commas
json_str = re.sub(',{2,}', ',', json_str)
parallel_corpus = json.loads(json_str)
# Example:
# id: a string composed of <translationID>/<sectionID>
# <translationID> is in the data accessed from the first API
# each section in the article that was translated gets its own <sectionID>
# mt indicates whether machine translation was used in the interface
print("Descriptive statistics:")
print("{0} translated sections.".format(len(parallel_corpus)))
print("{0} translated articles.".format(len(set(sec['id'].split('/')[0] for sec in parallel_corpus))))
mt_counts = {}
for sec in parallel_corpus:
    if sec['mt']:
        service = sec['mt']['engine']
        mt_counts[service] = mt_counts.get(service, 0) + 1
    else:
        mt_counts['no-mt'] = mt_counts.get('no-mt', 0) + 1
print("Machine translation services used: {0}".format(mt_counts))
print("\nExample:\n", parallel_corpus[5])
Descriptive statistics:
135640 translated sections.
12138 translated articles.
Machine translation services used: {'no-mt': 97454, 'Yandex': 35769, 'Google': 1335, 'source-mt': 2, 'scratch': 1080}

Example:
 {'id': '58832/mwDw', 'sourceLanguage': 'en', 'targetLanguage': 'ar', 'source': {'content': 'The algorithm depends on the efficient estimation of the lower and upper bounds of a region/branch of the search space and approaches exhaustive enumeration as the size (n-dimensional volume) of the region tends to zero.'}, 'mt': None, 'target': {'content': 'الخوارزمية تعتمد على جودة تقدير القيمة العلوية والسفلية للحل الأمثل.\xa0'}}
# Translated sections for "United Arab Emirates takeover of Socotra" article
for translated_section in parallel_corpus:
    if translated_section['id'].split('/')[0] == gboost_tid:
        print(translated_section, '\n')
{'id': '471210/69824d3b0e70ca6aaa0da1613b65fd', 'sourceLanguage': 'en', 'targetLanguage': 'ar', 'source': {'content': 'References'}, 'mt': None, 'target': {'content': 'المراجع'}} 

{'id': '471210/ea2b8a878841df5955c78edc6cae47', 'sourceLanguage': 'en', 'targetLanguage': 'ar', 'source': {'content': 'Background'}, 'mt': None, 'target': {'content': 'خلفية'}} 

{'id': '471210/mwBA', 'sourceLanguage': 'en', 'targetLanguage': 'ar', 'source': {'content': 'UAE takeover of SocotraPart of the Yemeni Crisis Date3 May 2018 LocationSocotra, YemenResult UAE Army troops take over Socotra Airport and sea ports on the island Belligerents Yemen Yemen Armed Forces United Arab Emirates United Arab Emirates Army Commanders and leaders Ahmed Obeid bin Daghr Ahmed Abdallah Ali al-Socotri Khalifa bin Zayed Al Nahyan Strength Unknown 100-300 troopsCasualties and losses None None'}, 'mt': None, 'target': {'content': 'استيلاء الإمارات على سقطرى تعديل\xa0'}} 

{'id': '471210/mwBw', 'sourceLanguage': 'en', 'targetLanguage': 'ar', 'source': {'content': 'On 3 May 2018, the United Arab Emirates deployed over 100 troops, artillery and armoured vehicles to the Yemeni archipelago of Socotra in the Arabian Sea without prior coordination with Yemen[1]. Shortly after landing, UAE forces expelled Yemeni soldiers stationed at key installations, including Socotra Airport and the flag of the United Arab Emirates was raised above official government buildings in Hadibu.[2]'}, 'mt': None, 'target': {'content': 'في 3 مايو 2018, قامت\xa0United Arab Emirates بنشر أكثر من\xa0 100 جندي, وسلاح المدفعية و عربات مدرعة\xa0 في أرخبيل\xa0Socotra في the Arabian Sea\xa0بدون تنسيق مسبق مع اليمن\xa0.\xa0[1] Shortly after landing, UAE forces expelled Yemeni soldiers stationed at key installations, including Socotra Airport and the flag of the United Arab Emirates was raised above official government buildings in Hadibu.[2]'}} 

{'id': '471210/mwIA', 'sourceLanguage': 'en', 'targetLanguage': 'ar', 'source': {'content': '↑ "UAE deploys troops to Yemen\'s Socotra island". The Daily Star Newspaper - Lebanon. 7 May 2018. Retrieved 7 May 2018.\xa0 ↑ "Anger erupts on Yemen\'s Socotra as UAE deploys over 100 troops". Al-Jazeera. Retrieved 7 May 2018.\xa0 1 2 "UAE forces \'occupy\' sea and airports on Yemen\'s Socotra". Al-Jazeera. Retrieved 7 May 2018.\xa0 ↑ Forster, Robert. "The Southern Transitional Council: Implications for Yemen\'s Peace Process." Middle East Policy 24.3 (2017): 133-144. ↑ "Socotra residents rally in support of UAE". Gulf News. 6 May 2018. Retrieved 7 May 2018.\xa0 ↑ "Anger in Yemen after UAE troops take over \'alien\' island of Socotra". South China Morning Post. Retrieved 7 May 2018.\xa0'}, 'mt': None, 'target': {'content': '↑ "UAE deploys troops to Yemen\'s Socotra island". The Daily Star Newspaper - Lebanon. 7 May 2018. اطلع عليه بتاريخ 07 مايو 2018.\xa0 ↑ "Anger erupts on Yemen\'s Socotra as UAE deploys over 100 troops". Al-Jazeera. اطلع عليه بتاريخ 07 مايو 2018.\xa0 1 2 "UAE forces \'occupy\' sea and airports on Yemen\'s Socotra". Al-Jazeera. Retrieved 7 May 2018.\xa0 ↑ Forster, Robert. "The Southern Transitional Council: Implications for Yemen\'s Peace Process." Middle East Policy 24.3 (2017): 133-144. ↑ "Socotra residents rally in support of UAE". Gulf News. 6 May 2018. Retrieved 7 May 2018.\xa0 ↑ "Anger in Yemen after UAE troops take over \'alien\' island of Socotra". South China Morning Post. Retrieved 7 May 2018.\xa0'}} 

# Page revision history example
revision_parameters = {
    "action": "query",
    "prop": "revisions",
    "titles": gboost_source_title,
    "rvprop": "timestamp|user|comment",
    "rvlimit": 100,
    "rvstartid": gboost_source_revid,
    "rvslots": "main",
    "formatversion": "2",
    "format": "json",
    "rvdir": "newer"
}
gboost_revisions = session.get(revision_parameters)
gboost_revisions
{'batchcomplete': True,
 'query': {'pages': [{'pageid': 57354291,
    'ns': 0,
    'title': 'United Arab Emirates takeover of Socotra',
    'revisions': [{'user': 'Koopinator',
      'timestamp': '2018-05-07T06:11:13Z',
      'comment': ''},
     {'user': 'Rainclaw7',
      'timestamp': '2018-05-07T17:41:53Z',
      'comment': '/* Background */Improved wording'},
     {'user': 'Rainclaw7',
      'timestamp': '2018-05-07T17:42:22Z',
      'comment': '/* Background */Capitalisation'},
     {'user': 'Chad The Goatman',
      'timestamp': '2018-05-08T04:28:55Z',
      'comment': ''},
     {'user': 'Chad The Goatman',
      'timestamp': '2018-05-08T04:30:00Z',
      'comment': ''},
     {'user': 'Chad The Goatman',
      'timestamp': '2018-05-08T04:30:24Z',
      'comment': ''},
     {'user': 'Chad The Goatman',
      'timestamp': '2018-05-08T04:33:29Z',
      'comment': '/* References */'},
     {'user': 'Murchison-Eye',
      'timestamp': '2018-05-08T04:56:36Z',
      'comment': '/* Background */ further interest in island'},
     {'user': 'Chad The Goatman',
      'timestamp': '2018-05-08T05:20:17Z',
      'comment': ''},
     {'user': 'Murchison-Eye',
      'timestamp': '2018-05-08T07:35:14Z',
      'comment': 'Correction: Localwide -->Local'},
     {'user': 'Pawnkingthree',
      'timestamp': '2018-05-08T16:35:12Z',
      'comment': '/* Reactions */ UAE Foreign Ministry response'},
     {'user': 'Knowledgekid87',
      'timestamp': '2018-05-09T14:46:13Z',
      'comment': '+See also'},
     {'user': 'Knowledgekid87',
      'timestamp': '2018-05-09T14:47:48Z',
      'comment': '/* See also */'},
     {'user': 'Super Dromaeosaurus',
      'timestamp': '2018-05-09T15:43:54Z',
      'comment': ''},
     {'user': 'Chad The Goatman',
      'timestamp': '2018-05-09T20:14:03Z',
      'comment': ''},
     {'user': '109.252.53.162',
      'anon': True,
      'timestamp': '2018-05-09T22:26:37Z',
      'comment': 'corrected'},
     {'user': 'Janitoalevic',
      'timestamp': '2018-05-09T22:55:25Z',
      'comment': ''},
     {'user': 'Rainclaw7',
      'timestamp': '2018-05-10T02:19:28Z',
      'comment': 'Removed unnecessary dash'},
     {'user': 'Rainclaw7',
      'timestamp': '2018-05-10T02:20:07Z',
      'comment': 'Punctuation in lead'},
     {'user': 'Rainclaw7',
      'timestamp': '2018-05-10T02:20:56Z',
      'comment': 'Citation at end of sentence'},
     {'user': 'Wikiemirati',
      'timestamp': '2018-05-10T03:11:08Z',
      'comment': ''},
     {'user': 'Wikiemirati',
      'timestamp': '2018-05-10T03:14:03Z',
      'comment': 'No news agency reported "99 lease" except Al Jazeera which is pro Qatari. Yemen and UAE both denied 99 lease statement. Removing to maintain neutrality.'},
     {'user': 'Wikiemirati',
      'timestamp': '2018-05-10T04:13:03Z',
      'comment': ''},
     {'user': 'Wikiemirati',
      'timestamp': '2018-05-10T04:25:59Z',
      'comment': ''},
     {'user': 'Chad The Goatman',
      'timestamp': '2018-05-10T05:31:45Z',
      'comment': ''},
     {'user': 'Donutcity',
      'timestamp': '2018-05-10T18:41:04Z',
      'comment': '/* Background */ grammar'},
     {'user': 'Rainclaw7',
      'timestamp': '2018-05-10T23:25:13Z',
      'comment': 'Added map'},
     {'user': 'Rainclaw7',
      'timestamp': '2018-05-10T23:25:54Z',
      'comment': 'Moved map'},
     {'user': 'GWA88',
      'timestamp': '2018-05-11T04:32:07Z',
      'comment': 'Added U.S. response to dispute'},
     {'user': '94.215.196.120',
      'anon': True,
      'timestamp': '2018-05-12T15:38:05Z',
      'comment': 'added category'},
     {'user': '91.124.117.29',
      'anon': True,
      'timestamp': '2018-05-12T22:52:08Z',
      'comment': ''},
     {'user': '217.30.192.236',
      'anon': True,
      'timestamp': '2018-05-14T16:29:37Z',
      'comment': '/* References */'},
     {'user': 'Wikiemirati',
      'timestamp': '2018-05-14T22:27:46Z',
      'comment': 'Airport and seaport back under Yemeni administration as per Yemeni PM.'},
     {'user': 'Kingston, CA',
      'timestamp': '2018-05-15T10:07:16Z',
      'comment': 'Fixing image'},
     {'user': 'YSSYguy',
      'timestamp': '2018-05-15T10:52:52Z',
      'comment': '/* top */ fixes'},
     {'user': 'Panam2014', 'timestamp': '2018-05-15T11:04:42Z', 'comment': ''},
     {'user': 'Kingston, CA',
      'timestamp': '2018-05-15T11:17:59Z',
      'comment': ''},
     {'user': 'Kingston, CA',
      'timestamp': '2018-05-15T11:19:52Z',
      'comment': ''},
     {'user': 'YSSYguy',
      'timestamp': '2018-05-15T19:41:27Z',
      'comment': 'Undid revision 841361289 by [[Special:Contributions/Kingston, CA|Kingston, CA]] ([[User talk:Kingston, CA|talk]]), those are English words but they did not explain the map properly'},
     {'user': 'YSSYguy',
      'timestamp': '2018-05-15T19:42:24Z',
      'comment': '/* top */'},
     {'user': 'YSSYguy',
      'timestamp': '2018-05-15T23:52:00Z',
      'comment': '/* top */ caption tweak'},
     {'user': 'Kingston, CA',
      'timestamp': '2018-05-16T07:44:20Z',
      'comment': '/* Reactions */Adding image.'},
     {'user': 'YSSYguy',
      'timestamp': '2018-05-16T08:05:56Z',
      'comment': '/* Reactions */ fixes arising from last edit'},
     {'user': 'Rainclaw7',
      'timestamp': '2018-05-16T13:54:40Z',
      'comment': 'Improved image caption'},
     {'user': 'Rainclaw7',
      'timestamp': '2018-05-16T13:56:28Z',
      'comment': 'Removed current event box, event has resolved according to lead'},
     {'user': 'Rainclaw7',
      'timestamp': '2018-05-16T13:58:47Z',
      'comment': 'Improved wording of lead'},
     {'user': 'Rainclaw7',
      'timestamp': '2018-05-16T14:00:52Z',
      'comment': 'Further improved image caption'},
     {'user': 'Super Dromaeosaurus',
      'timestamp': '2018-05-16T22:19:46Z',
      'comment': ''},
     {'user': 'محمد عبدالله يوسف سلطان',
      'timestamp': '2018-05-17T10:51:07Z',
      'comment': 'Delete'},
     {'user': 'محمد عبدالله يوسف سلطان',
      'timestamp': '2018-05-17T10:51:30Z',
      'comment': ''},
     {'user': 'محمد عبدالله يوسف سلطان',
      'timestamp': '2018-05-17T10:51:43Z',
      'comment': ''},
     {'user': 'محمد عبدالله يوسف سلطان',
      'timestamp': '2018-05-17T10:52:00Z',
      'comment': '[[WP:AES|←]]Blanked the page'},
     {'user': 'Panam2014', 'timestamp': '2018-05-17T12:08:11Z', 'comment': ''},
     {'user': 'GWA88',
      'timestamp': '2018-05-17T13:34:25Z',
      'comment': 'No need to delete this info from the infobox just because the dispute was resolved, it shows the timeline of events'},
     {'user': 'GWA88',
      'timestamp': '2018-05-17T13:38:14Z',
      'comment': 'Infobox tweaks'},
     {'user': 'Super Dromaeosaurus',
      'timestamp': '2018-05-17T21:17:53Z',
      'comment': 'Turkish reaction.'},
     {'user': '93.169.95.163',
      'anon': True,
      'timestamp': '2018-05-18T12:40:16Z',
      'comment': ''},
     {'user': 'Super Dromaeosaurus',
      'timestamp': '2018-05-18T13:03:40Z',
      'comment': 'Undid revision 841843032 by [[Special:Contributions/93.169.95.163|93.169.95.163]] ([[User talk:93.169.95.163|talk]])'},
     {'user': 'Thylacoop5',
      'timestamp': '2018-05-18T13:32:34Z',
      'comment': ''},
     {'user': 'Janitoalevic',
      'timestamp': '2018-05-18T17:40:24Z',
      'comment': ''},
     {'user': 'Janitoalevic',
      'timestamp': '2018-05-18T18:29:25Z',
      'comment': 'Undid revision 841848679 by [[Special:Contributions/Thylacoop5|Thylacoop5]] ([[User talk:Thylacoop5|talk]])'},
     {'user': 'CPA-5', 'timestamp': '2018-05-19T18:21:50Z', 'comment': ''},
     {'user': 'CPA-5', 'timestamp': '2018-05-19T18:37:06Z', 'comment': ''},
     {'user': 'محمد عبدالله يوسف سلطان',
      'timestamp': '2018-05-26T12:37:40Z',
      'comment': ''},
     {'user': 'محمد عبدالله يوسف سلطان',
      'timestamp': '2018-05-26T12:37:56Z',
      'comment': ''},
     {'user': 'محمد عبدالله يوسف سلطان',
      'timestamp': '2018-05-26T12:38:06Z',
      'comment': "[[WP:AES|←]]Replaced content with '==References== {{Reflist|2}}  {{Yemeni Civil War (2015)}}  [[Category:2018 in Yemen]] [[Category:2018 in the United Arab Emirates]] Category:2018 in intern...'"},
     {'user': 'Shellwood',
      'timestamp': '2018-05-26T12:38:12Z',
      'comment': 'Reverted edits by [[Special:Contributions/محمد_عبدالله_يوسف_سلطان|محمد_عبدالله_يوسف_سلطان]] ([[User talk:محمد_عبدالله_يوسف_سلطان|talk]]) ([[WP:HG|HG]]) (3.1.22)'},
     {'user': 'CMV512', 'timestamp': '2018-05-26T20:51:46Z', 'comment': ''},
     {'user': 'Super Dromaeosaurus',
      'timestamp': '2018-05-27T06:31:14Z',
      'comment': ''},
     {'user': 'Thylacoop5',
      'timestamp': '2018-05-27T10:42:17Z',
      'comment': ''},
     {'user': 'CommonsDelinker',
      'timestamp': '2018-06-01T16:46:57Z',
      'comment': 'Removing [[:c:File:Ee1a4604b0ef5e33a5744eff32f3d01a_920_420.jpg|Ee1a4604b0ef5e33a5744eff32f3d01a_920_420.jpg]], it has been deleted from Commons by [[:c:User:P199|P199]] because: per [[:c:Commons:Deletion requests/File:Ee1a4604b0ef5e33a5744eff32f3d01a 920'},
     {'user': 'CentreLeftRight',
      'timestamp': '2018-06-02T19:21:17Z',
      'comment': 'Infobox organised + grammatical corrections.'},
     {'user': 'Wikiemirati',
      'timestamp': '2018-06-23T07:49:13Z',
      'comment': 'Specified result and territory changes.'},
     {'user': 'Wikiemirati',
      'timestamp': '2018-06-27T02:00:25Z',
      'comment': ''},
     {'user': 'GeneralAdmiralAladeen',
      'timestamp': '2018-08-04T19:45:14Z',
      'comment': ''},
     {'user': 'Tobby72',
      'timestamp': '2018-08-25T13:42:15Z',
      'comment': 'add info'},
     {'user': 'Wikiemirati',
      'timestamp': '2018-09-04T03:39:57Z',
      'comment': 'paraphrased The Independent source.'},
     {'user': 'Wikiemirati',
      'timestamp': '2018-09-04T03:50:49Z',
      'comment': ''},
     {'user': 'Super Dromaeosaurus',
      'timestamp': '2018-09-04T08:44:21Z',
      'comment': 'Linking newspapers.'},
     {'user': 'Super Dromaeosaurus',
      'timestamp': '2018-09-04T08:45:41Z',
      'comment': ''},
     {'user': 'Wikiemirati',
      'timestamp': '2018-09-16T20:17:55Z',
      'comment': ''},
     {'user': 'Esn',
      'timestamp': '2019-01-02T11:03:30Z',
      'comment': 'recent news'},
     {'user': '82.140.128.223',
      'anon': True,
      'timestamp': '2019-01-03T11:40:28Z',
      'comment': ''},
     {'user': 'Wikiemirati',
      'timestamp': '2019-01-12T03:33:24Z',
      'comment': 'Unreliable source, discuss in talk.'},
     {'user': 'Mar4d',
      'timestamp': '2019-01-21T09:26:07Z',
      'comment': 'added [[Category:United Arab Emirates–Yemen relations]] using [[WP:HC|HotCat]]'},
     {'user': 'Citation bot',
      'timestamp': '2019-02-03T15:02:07Z',
      'comment': 'Alter: url. Add: doi, pages. Removed parameters. Formatted [[WP:ENDASH|dashes]]. | You can [[WP:UCB|use this bot]] yourself. [[WP:DBUG|Report bugs here]]. | [[WP:UCB|User-activated]].'},
     {'user': 'Wikiemirati',
      'timestamp': '2019-02-16T21:55:07Z',
      'comment': ''},
     {'user': 'Wikiemirati',
      'timestamp': '2019-02-16T21:56:19Z',
      'comment': '/* Background */ per source'}]}]}}