ufal / perl-pmltq-web

Simple web build on the top of the PML Tree Query server
https://lindat.mff.cuni.cz/services/pmltq/
0 stars 0 forks source link

Arabic Treebanks conversion for LDC #138

Open matyaskopp opened 6 years ago

matyaskopp commented 6 years ago

Use anchors (such as A01) to determine which problem is pinned in comments

G) General problems common for all treebanks

G01) multiple trees in Paragraph

Currently one paragraph is divided to multiple trees. Some of the roots nodes are not S category. Is this correct? http://hdl.handle.net/11346/PMLTQ-WPET

G02) terminal node directly under Paragraph (related to G01)

Fixed with adding new root node PARAGRAPH. fixed paragraphs in Arabic Treebank - Weblog: http://hdl.handle.net/11346/PMLTQ-PRWB For example

( Paragraph 
    ( S ( VP ( PRT 0 ) 1 ( NP-SBJ * ) ( NP-ADV 2 ) ( NP-OBJ 3 ( NP 4 5 ) ) ) ) 
    6 
    ( S ( VP ( PRT 7 ) 8 ( NP-SBJ * ) ( NP-OBJ 9 ( NP 10 ) ) ( PP-CLR 11 ( NP 12 13 14 ) ) ) )
) 

is replaced with

( Paragraph 
    ( PARAGRAPH 
        ( S ( VP ( PRT 0 ) 1 ( NP-SBJ * ) ( NP-ADV 2 ) ( NP-OBJ 3 ( NP 4 5 ) ) ) ) 
        6 
        ( S ( VP ( PRT 7 ) 8 ( NP-SBJ * ) ( NP-OBJ 9 ( NP 10 ) ) ( PP-CLR 11 ( NP 12 13 14 ) ) ) ) 
    )
)

G03) new category EDITED

http://hdl.handle.net/11346/PMLTQ-5VH5

G04) new functions ETC and UNF

http://hdl.handle.net/11346/PMLTQ-XLKU

G05) wrong reference conversion

these queries should be valid:

FIXED with: https://github.com/ufal/perl-pmltq/commit/5b78d55e1147f0b92524a61dd50e6147e79a8e4d

A) LDC2010T13 | Arabic Treebank: Part 1 v 4.1

treebank: http://quest.ms.mff.cuni.cz:10280/#!/treebank/atb1_v41 source: https://catalog.ldc.upenn.edu/LDC2010T13

A01) invalid parentheses in text TrEd vs. Web

http://hdl.handle.net/11346/PMLTQ-C8TH image original sentence (part of Paragraph): image

A02) invalid xml entity &Cx0b;

http://hdl.handle.net/11346/PMLTQ-D8QT entity is replaced with #### in treebank

$ nl sgm/20000915_AFP_ARB.0034.sgm | grep '&Cx0b;'
    12   واشنطن 15-9 (اف ب)- وجهت الولايات المتحدة اليوم الجمعة تحذيرا الى العراق الذي اتهمته الكويت بالسعي الى افتعال حرب جديدة بزعمه انها تسرق من نفطه الخامخ* &Cx0b; " وصرح المتحدث باسم البيت الابيض جو لوكهارت خلال لقائه اليومي مع الصحافيين "منذ عشر سنوات ونحن نسمع الرئيس العراقي صدام حسين يدلي بتصريحات شديدة اللهجة لكنه يجب ان يعلم بوضوح اننا لا زلنا مصممين على وضع حد لقدرته على ايذاء جيرانه وعلى اعادة تشكيل ترسانة اسلحة الدمار الشامل".

A03) invalid xml entity &UR

http://hdl.handle.net/11346/PMLTQ-XZUH

$ nl sgm/20000915_AFP_ARB.0041.sgm | grep '&UR;'
    24   وتعادل المعادن والمصري بهدفين لكل منهما بعد مباراة مثيرة وسريعة من الجانبين. تقدم سيف داود ل\آش &UR; و في الدقيقة ال42 وهو اول اهداف البطولة وحاول اصحاب الارض ادراك التعادل الذي استعصى عليهم حتى الدقيقة ال78 عندما احرز اشرف ممدوح هدف التعادل للمعادن وعاود عمرو الدسوقي التقدم للمصري من ضربة رأس في الدقيقةال 83 ونجح هاني يونس في احراز هدف التعادل للمعادن من ضربة رأس ايضا في الدقيقة ال87. 

B) LDC2011T09 | Arabic Treebank: Part 2 v 3.1

treebank: http://quest.ms.mff.cuni.cz:10280/#!/treebank/atb2_v31 source: https://catalog.ldc.upenn.edu/LDC2011T09

C) LDC2010T08 | Arabic Treebank: Part 3 v 3.2

treebank: http://quest.ms.mff.cuni.cz:10280/#!/treebank/atb3_v32 source: https://catalog.ldc.upenn.edu/LDC2010T08

C01) & is not escaped in sgm file

http://hdl.handle.net/11346/PMLTQ-HNUU & is replaced with # in text

$ egrep -r '&\s' sgm/
sgm/ANN20020515.0042.sgm:<seg id=10> & اصدرت "الجبهة الشعبية لتحرير فلسطين" (القيادة العامة/ بيانا جاء فيه انها "فوجئت بالبيان الصادر عن قمة شرم الشيخ الثلاثية الاخيرة (...)". </seg>
sgm/ANN20020515.0042.sgm:<seg id=11> & بحثت الاحزاب اللبنانية خلال اجتماعها الدوري الذي عقد في مكتب "حزب الله" في بعلبك المستجدات السياسية المختلفة، و"توقفت عند الذكرى الرابعة والخمسين لاغتصاب فلسطين"، مؤكدة "ان خيار المقاومة والانتفاضة الذي يتبناه عمليا الكثير من القوى الفلسطينية هو الخيار الوحيد القادر على استرجاع فلسطين وتحرير الارض والانسان". </seg>
sgm/ANN20020515.0042.sgm:<seg id=13> & عقدت قيادتا "حركة الناصريين المستقلين (المرابطون) و"حركة التوحيد الاسلامي" اجتماعا. </seg>
sgm/ANN20020415.0035.sgm:<seg id=7> & اعتبر النائب حسين الحاج حسن ان "ما يجري في فلسطين هو محاولة اميركية لاستثمار العدوان الصهيوني على الشعب الفلسطيني لتحويله نتائج سياسية، وما يريد (كولن) باول عرضه على (ياسر) عرفات هو صك استسلام فلسطين امام آلة الحرب الصهيونية في اطار اتفاقات تينيت وميتشل". </seg>
sgm/ANN20020215.0098.sgm:<seg id=4> ويذكر ان الجامعة تسلمت قبل اسبوع محركاً نفاثاً من طراز & 3- تقدمة شركة طيران عبر المتوسط (). </seg>
sgm/ANN20021215.0044.sgm:<seg id=10> & صدر امس مزيد من المواقف المنددة بقرار الحكومة الكندية فرض حظر على"حزب الله". </seg>
sgm/ANN20020615.0043.sgm:<seg id=5> في مطلع عام ،1998 أقرّ مجلس ادارة الشركة خطة لاصلاح الوضعين الاداري والمالي في الشركة استناداً الى دراسات قام بها فريق من الخبراء الفرنسيين، وبعد مراجعة دراسات للمستشارين العالميين و & . </seg>

D) LDC2012T07 | Arabic Treebank - Broadcast News v1.0

treebank: http://quest.ms.mff.cuni.cz:10280/#!/treebank/atb_bn_v10 source: https://catalog.ldc.upenn.edu/LDC2012T07

D01) new category INTERJ (related to G03)

http://hdl.handle.net/11346/PMLTQ-QZVJ

E) LDC2016T02 | Arabic Treebank - Weblog

treebank: http://quest.ms.mff.cuni.cz:10280/#!/treebank/atbw source: https://catalog.ldc.upenn.edu/LDC2016T02

F) LDC2016T18 | ARL Arabic Dependency Treebank

treebank: http://quest.ms.mff.cuni.cz:10280/#!/treebank/arl_adt source: https://catalog.ldc.upenn.edu/LDC2016T18

F01) Vowelized data has been used

F02) Inspired with treex attributes

Each node has these attributes: id, ord, type, deprel, root, lemma, form, form_transliterated, xpos, gloss, misk

node $a := [
  xml:id = 'ABUDHABI_ABUDHNEWS2_ARB_20070228_000000.qrtrs-1-21',
  ord = '21',
  type = 'core',
  deprel = 'cc',
  root = '-',
  lemma = 'wa_1',
  form = 'وَ',
  form_transliterated = 'wa',
  xpos = 'CONJ',
  gloss = 'and',
  misk = '-',
]

Should be dashes - leaved or should be used empty strings?

F03) not NCName compatible filenames

I have to rename some no compatible filenames s/[^-\._0-9A-Za-z]/_/g;/^[^a-zA-Z_]/s/^/ARL_/ because I need to use this filename as a prefix of node ids.

F04) Node types pref and suff have no head (column 3)

I have hang them under node corresponding to following/preceding line and highlight it with blue/green color. image

F05) Prefixes and suffixes in text