Datasets:

Languages:
Icelandic
Multilinguality:
monolingual
Size Categories:
10K<n<100K
Annotations Creators:
expert-generated
Source Datasets:
original
Tags:
License:
icelandic-error-corpus-IceEC / icelandic-error-corpus-IceEC.py
vesteinn's picture
Corrected pyarrow type
393fae1
# collected from errorCodes.tsv -- see https://github.com/antonkarl/iceErrorCorpus
ERROR_INFORMATION = {'dem4noun': {'category': 'coherence',
'subcategory': 'accuracy',
'description': 'A demonstrative pronoun used where a noun should be'},
'noun4dem': {'category': 'coherence',
'subcategory': 'accuracy',
'description': 'A noun used where a demonstrative pronoun should be'},
'dem-pro': {'category': 'coherence',
'subcategory': 'pro',
'description': 'An incorrect demonstrative pronoun used'},
'dem4pers': {'category': 'coherence',
'subcategory': 'pro',
'description': 'A demonstrative pronoun used where a personal pronoun should be used'},
'noun4pro': {'category': 'coherence',
'subcategory': 'pro',
'description': 'A noun used where a pronoun should be used'},
'pers4dem': {'category': 'coherence',
'subcategory': 'pro',
'description': 'A personal pronoun used instead of a demonstrative pronoun'},
'pro4noun': {'category': 'coherence',
'subcategory': 'pro',
'description': 'A pronoun used where a noun should be used'},
'pro4reflexive': {'category': 'coherence',
'subcategory': 'pro',
'description': 'A personal pronoun used instead of a reflexive pronoun'},
'reflexive4noun': {'category': 'coherence',
'subcategory': 'pro',
'description': 'A reflexive pronoun used instead of a noun'},
'reflexive4pro': {'category': 'coherence',
'subcategory': 'pro',
'description': 'A reflexive pronoun used instead of a personal pronoun'},
'dir4loc': {'category': 'coherence',
'subcategory': 'reference',
'description': 'Directional instead of locative'},
'loc4dir': {'category': 'coherence',
'subcategory': 'reference',
'description': 'Locative instead of directional'},
'agreement': {'category': 'grammar',
'subcategory': 'agreement',
'description': 'A finite verb not in agreement with a noun phrase'},
'agreement-concord': {'category': 'grammar',
'subcategory': 'agreement',
'description': 'An error in agreement within a noun phrase'},
'agreement-pred': {'category': 'grammar',
'subcategory': 'agreement',
'description': 'A predicate not in agreement with its subject'},
'agreement-pro': {'category': 'grammar',
'subcategory': 'agreement',
'description': 'A pronoun not in agreement with its antecedent'},
'marked4unmarked': {'category': 'grammar',
'subcategory': 'agreement',
'description': 'A marked grammatical gender used instead of the unmarked one, the feminine or neuter used instead of masculine'},
'cont4simple': {'category': 'grammar',
'subcategory': 'aspect',
'description': 'A verb in the continuous tense which should be in the simple tense'},
'perfect4tense': {'category': 'grammar',
'subcategory': 'aspect',
'description': 'A verb in the perfect aspect which should be in the present or past tense'},
'simple4cont': {'category': 'grammar',
'subcategory': 'aspect',
'description': 'A verb in the simple tense which should be in the continuous tense'},
'tense4perfect': {'category': 'grammar',
'subcategory': 'aspect',
'description': 'A verb in the present or past tense which should be in the perfect aspect'},
'extra-munu': {'category': 'grammar',
'subcategory': 'aux',
'description': 'Redundant verb ‘munu’ used'},
'geta': {'category': 'grammar',
'subcategory': 'aux',
'description': 'The verb ‘geta’ used with an infinitive or a verb in the present tense'},
'acc4nom-sub': {'category': 'grammar',
'subcategory': 'case',
'description': 'A subject in the accusative case which should be in the nominative case'},
'case-adj': {'category': 'grammar',
'subcategory': 'case',
'description': 'A word whose case is governed by an adjective is not in the correct case'},
'case-collocation': {'category': 'grammar',
'subcategory': 'case',
'description': 'Incorrect case within a collocation'},
'case-prep': {'category': 'grammar',
'subcategory': 'case',
'description': 'A word whose case is governed by a preposition is not in the correct case'},
'case-verb': {'category': 'grammar',
'subcategory': 'case',
'description': 'A word whose case is governed by a verb is not in the correct case'},
'dative-sub': {'category': 'grammar',
'subcategory': 'case',
'description': 'A subject incorrectly in the dative case'},
'nom4acc-sub': {'category': 'grammar',
'subcategory': 'case',
'description': 'A subject in the nominal case which should be in the accusative case'},
'conjunction': {'category': 'grammar',
'subcategory': 'conjunction',
'description': 'A conjunction used incorrectly'},
'def4ind': {'category': 'grammar',
'subcategory': 'definitiveness',
'description': 'An definite word which should be indefinite'},
'extra-dem-pro': {'category': 'grammar',
'subcategory': 'definitiveness',
'description': 'A redundant demonstrative pronoun'},
'ind4def': {'category': 'grammar',
'subcategory': 'definitiveness',
'description': 'An indefinite word which should be definite'},
'missing-dem-pro': {'category': 'grammar',
'subcategory': 'definitiveness',
'description': 'A demonstrative pronoun missing'},
'adjective-inflection': {'category': 'grammar',
'subcategory': 'inflection',
'description': 'An adjective inflected incorrectly'},
'gen-escape': {'category': 'grammar',
'subcategory': 'inflection',
'description': 'A noun which should be in the genitive case is incorrectly in another case'},
'genitive': {'category': 'grammar',
'subcategory': 'inflection',
'description': 'Errors related to the genitive case'},
'nominal-inflection': {'category': 'grammar',
'subcategory': 'inflection',
'description': 'A noun inflected incorrectly, i.e. the inflection form exists but does not fit in the sentence'},
'numeral-inflection': {'category': 'grammar',
'subcategory': 'inflection',
'description': 'A numeral inflected incorrectly'},
'pro-inflection': {'category': 'grammar',
'subcategory': 'inflection',
'description': 'A pronoun inflected incorrectly'},
'verb-inflection': {'category': 'grammar',
'subcategory': 'inflection',
'description': 'A verb inflected incorrectly'},
'want': {'category': 'grammar',
'subcategory': 'inflection',
'description': 'The third person singular ‘vill’ used where the first person singular ‘vil’ should be used, and the opposite'},
'extra-prep': {'category': 'grammar',
'subcategory': 'insertion',
'description': 'A redundant preposition'},
'ind4sub': {'category': 'grammar',
'subcategory': 'mood',
'description': 'A verb in the indicative mood which should be in the subjunctive mood'},
'sub4ind': {'category': 'grammar',
'subcategory': 'mood',
'description': 'A verb in the subjunctive mood which should be in the indicative mood'},
'missing-prep': {'category': 'grammar',
'subcategory': 'omission',
'description': 'A preposition missing'},
'að4af': {'category': 'grammar',
'subcategory': 'prep',
'description': 'The preposition ‘að’ used instead of the preposition ‘af’'},
'af4að': {'category': 'grammar',
'subcategory': 'prep',
'description': 'The preposition ‘af’ used instead of the preposition ‘að’'},
'wrong-prep': {'category': 'grammar',
'subcategory': 'prep',
'description': 'An incorrect preposition used'},
'adj4adv': {'category': 'grammar',
'subcategory': 'syntax',
'description': 'An adjective used where an adverb should be'},
'adv4adj': {'category': 'grammar',
'subcategory': 'syntax',
'description': 'An adverb used where an adjective should be'},
'each': {'category': 'grammar',
'subcategory': 'syntax',
'description': 'An error in reciprocal pronouns'},
'extra-fin-verb': {'category': 'grammar',
'subcategory': 'syntax',
'description': 'persónubeygðri sögn ofaukið'},
'extra-inf-part': {'category': 'grammar',
'subcategory': 'syntax',
'description': 'A redundant infinitive particle'},
'extra-sub': {'category': 'grammar',
'subcategory': 'syntax',
'description': 'A redundant subject'},
'loan-syntax': {'category': 'grammar',
'subcategory': 'syntax',
'description': 'Syntax borrowed from another language'},
'missing-fin-verb': {'category': 'grammar',
'subcategory': 'syntax',
'description': 'A finite verb missing from a sentence'},
'missing-inf-part': {'category': 'grammar',
'subcategory': 'syntax',
'description': 'An infinitive particle missing'},
'missing-obj': {'category': 'grammar',
'subcategory': 'syntax',
'description': 'An object missing from a clause'},
'missing-sub': {'category': 'grammar',
'subcategory': 'syntax',
'description': 'A subject missing from a clause'},
'new-passive': {'category': 'grammar',
'subcategory': 'syntax',
'description': 'The new passive construction used'},
'syntax-other': {'category': 'grammar',
'subcategory': 'syntax',
'description': 'An error relating to syntax'},
'v3': {'category': 'grammar',
'subcategory': 'syntax',
'description': 'A verb incorrectly in the third position'},
'v3-subordinate': {'category': 'grammar',
'subcategory': 'syntax',
'description': 'A verb incorrectly in the third position in a subordinate clause'},
'past4pres': {'category': 'grammar',
'subcategory': 'tense',
'description': 'A verb in the past tense which should be in the present tense'},
'pres4past': {'category': 'grammar',
'subcategory': 'tense',
'description': 'A verb in the present tense which should be in the past tense'},
'act4mid': {'category': 'grammar',
'subcategory': 'voice',
'description': 'A verb in active voice which should be in middle voice'},
'act4pass': {'category': 'grammar',
'subcategory': 'voice',
'description': 'A verb in active voice which should be in passive voice'},
'mid4act': {'category': 'grammar',
'subcategory': 'voice',
'description': 'A verb in middle voice which should be in active voice'},
'mid4pass': {'category': 'grammar',
'subcategory': 'voice',
'description': 'A verb in middle voice which should be in passive voice'},
'pass4act': {'category': 'grammar',
'subcategory': 'voice',
'description': 'A verb in passive voice which should be in active voice'},
'pass4mid': {'category': 'grammar',
'subcategory': 'voice',
'description': 'A verb in passive voice which should be in middle voice'},
'passive': {'category': 'grammar',
'subcategory': 'voice',
'description': 'The passive construction incorrectly formed'},
'caps4low': {'category': 'orthography',
'subcategory': 'capitalization',
'description': 'An uppercase letter which should be lowercase'},
'low4caps': {'category': 'orthography',
'subcategory': 'capitalization',
'description': 'An lowercase letter which should be uppercase'},
'lower4upper-acro': {'category': 'orthography',
'subcategory': 'capitalization',
'description': 'A lowercase letter in an acronym which should be upper case'},
'lower4upper-initial': {'category': 'orthography',
'subcategory': 'capitalization',
'description': 'A lowercase letter at the beginning of a sentence which should be upper case'},
'lower4upper-proper': {'category': 'orthography',
'subcategory': 'capitalization',
'description': 'A lowercase letter at the beginning of a proper noun which should be upper case'},
'upper4lower-common': {'category': 'orthography',
'subcategory': 'capitalization',
'description': 'An uppercase letter in a common noun which should be lowercase'},
'upper4lower-noninitial': {'category': 'orthography',
'subcategory': 'capitalization',
'description': 'An uppercase letter not at the beginning of a sentence which should be lowercase'},
'upper4lower-proper': {'category': 'orthography',
'subcategory': 'capitalization',
'description': 'An uppercase letter in a proper noun which should be lowercase'},
'foreign-error': {'category': 'orthography',
'subcategory': 'foreign',
'description': 'An error in a foreign word'},
'foreign-name': {'category': 'orthography',
'subcategory': 'foreign',
'description': 'An error in a foreign name'},
'compound-collocation': {'category': 'orthography',
'subcategory': 'nonword',
'description': 'A compound word not formed according to tradition'},
'nonword': {'category': 'orthography',
'subcategory': 'nonword',
'description': 'A word which does not exist'},
'abbreviation': {'category': 'orthography',
'subcategory': 'punctuation',
'description': 'Various errors in abbreviations'},
'abbreviation-period': {'category': 'orthography',
'subcategory': 'punctuation',
'description': 'Incorrect use of a period in an abbreviation'},
'bracket4comma': {'category': 'orthography',
'subcategory': 'punctuation',
'description': 'A bracket used where a comma should be'},
'bracket4period': {'category': 'orthography',
'subcategory': 'punctuation',
'description': 'A bracket used where a period should be'},
'bracket4square': {'category': 'orthography',
'subcategory': 'punctuation',
'description': 'A bracket used where a square bracket should be'},
'colon4comma': {'category': 'orthography',
'subcategory': 'punctuation',
'description': 'A colon used where a comma should be'},
'colon4period': {'category': 'orthography',
'subcategory': 'punctuation',
'description': 'A colon used where a period should be'},
'colon4semicolon': {'category': 'orthography',
'subcategory': 'punctuation',
'description': 'A colon used where a semicolon should be'},
'comma-plus-conjunction': {'category': 'orthography',
'subcategory': 'punctuation',
'description': 'A comma incorrectly used before a conjunction'},
'comma4bracket': {'category': 'orthography',
'subcategory': 'punctuation',
'description': 'A comma used where a bracket should be'},
'comma4colon': {'category': 'orthography',
'subcategory': 'punctuation',
'description': 'A comma used where a colon should be'},
'comma4conjunction': {'category': 'orthography',
'subcategory': 'punctuation',
'description': 'A comma used where a conjunction should be'},
'comma4dash': {'category': 'orthography',
'subcategory': 'punctuation',
'description': 'A comma used where a dash should be'},
'comma4ex': {'category': 'orthography',
'subcategory': 'punctuation',
'description': 'A comma used where an exclamation mark should be'},
'comma4period': {'category': 'orthography',
'subcategory': 'punctuation',
'description': 'A comma used where a period should be'},
'comma4qm': {'category': 'orthography',
'subcategory': 'punctuation',
'description': 'A comma used where a question mark should be'},
'comma4semicolon': {'category': 'orthography',
'subcategory': 'punctuation',
'description': 'A comma used where a semicolon should be'},
'conjunction-drop': {'category': 'orthography',
'subcategory': 'punctuation',
'description': 'A longer form of a word than necessary is used in contraction'},
'conjunction4comma': {'category': 'orthography',
'subcategory': 'punctuation',
'description': 'A conjunction used where a comma should be'},
'conjunction4period': {'category': 'orthography',
'subcategory': 'punctuation',
'description': 'A conjunction used where a period should be'},
'conjunction4qm': {'category': 'orthography',
'subcategory': 'punctuation',
'description': 'A conjunction used where a question mark should be'},
'conjunction4semicolon': {'category': 'orthography',
'subcategory': 'punctuation',
'description': 'A conjunction used instead of a semicolon'},
'date-abbreviation': {'category': 'orthography',
'subcategory': 'punctuation',
'description': 'Date abbreviated incorrectly'},
'dots4comma': {'category': 'orthography',
'subcategory': 'punctuation',
'description': 'Three dots used where a comma should be'},
'dots4period': {'category': 'orthography',
'subcategory': 'punctuation',
'description': 'Three dots used where a period should be'},
'double-punctuation': {'category': 'orthography',
'subcategory': 'punctuation',
'description': 'Double punctuation incorrectly used'},
'emdash4endash': {'category': 'orthography',
'subcategory': 'punctuation',
'description': 'An em dash used where an en dash should be'},
'emdash4hyphen': {'category': 'orthography',
'subcategory': 'punctuation',
'description': 'An em dash used where a hyphen should be'},
'endash4colon': {'category': 'orthography',
'subcategory': 'punctuation',
'description': 'An en dash used where a colon should be'},
'endash4comma': {'category': 'orthography',
'subcategory': 'punctuation',
'description': 'An en dash used where a comma should be'},
'endash4hyphen': {'category': 'orthography',
'subcategory': 'punctuation',
'description': 'An en dash used where a hyphen should be'},
'endash4period': {'category': 'orthography',
'subcategory': 'punctuation',
'description': 'An en dash used where a period should be'},
'endash4semicolon': {'category': 'orthography',
'subcategory': 'punctuation',
'description': 'An en dash used where a semicolon should be'},
'endash4word': {'category': 'orthography',
'subcategory': 'punctuation',
'description': 'An en dash used where a word should be'},
'ex4comma': {'category': 'orthography',
'subcategory': 'punctuation',
'description': 'An exclamation mark used where a comma should be'},
'ex4period': {'category': 'orthography',
'subcategory': 'punctuation',
'description': 'Exclamation mark used instead of a period'},
'ex4qm': {'category': 'orthography',
'subcategory': 'punctuation',
'description': 'Exclamation mark used instead of a question mark'},
'extra-bracket': {'category': 'orthography',
'subcategory': 'punctuation',
'description': 'A redundant bracket'},
'extra-brackets': {'category': 'orthography',
'subcategory': 'punctuation',
'description': 'Redundant brackets'},
'extra-colon': {'category': 'orthography',
'subcategory': 'punctuation',
'description': 'A redundant colon'},
'extra-comma': {'category': 'orthography',
'subcategory': 'punctuation',
'description': 'Redundant comma'},
'extra-commas': {'category': 'orthography',
'subcategory': 'punctuation',
'description': 'Redundant commas used around an insertion'},
'extra-conjunction': {'category': 'orthography',
'subcategory': 'punctuation',
'description': 'A redundant conjunction'},
'extra-endash': {'category': 'orthography',
'subcategory': 'punctuation',
'description': 'A redundant en dash used'},
'extra-hyphen': {'category': 'orthography',
'subcategory': 'punctuation',
'description': 'A redundant hyphen used'},
'extra-period': {'category': 'orthography',
'subcategory': 'punctuation',
'description': 'Redundant period'},
'extra-punctuation': {'category': 'orthography',
'subcategory': 'punctuation',
'description': 'Redundant punctuation'},
'extra-qm': {'category': 'orthography',
'subcategory': 'punctuation',
'description': 'A redundant question mark'},
'extra-quot': {'category': 'orthography',
'subcategory': 'punctuation',
'description': 'A redundant single quote'},
'extra-quots': {'category': 'orthography',
'subcategory': 'punctuation',
'description': 'Redundant quotes'},
'extra-semicolon': {'category': 'orthography',
'subcategory': 'punctuation',
'description': 'A redundant semicolon'},
'extra-slash': {'category': 'orthography',
'subcategory': 'punctuation',
'description': 'A redundant slash'},
'extra-square': {'category': 'orthography',
'subcategory': 'punctuation',
'description': 'A redundant square bracket'},
'hypercorr': {'category': 'orthography',
'subcategory': 'punctuation',
'description': 'Hypercorrection'},
'hyphen4colon': {'category': 'orthography',
'subcategory': 'punctuation',
'description': 'A hyphen used where a colon should be'},
'hyphen4comma': {'category': 'orthography',
'subcategory': 'punctuation',
'description': 'A hyphen used where a comma should be'},
'hyphen4endash': {'category': 'orthography',
'subcategory': 'punctuation',
'description': 'A hyphen used where an en dash should be'},
'hyphen4period': {'category': 'orthography',
'subcategory': 'punctuation',
'description': 'A hyphen used where a period should be'},
'hyphen4semicolon': {'category': 'orthography',
'subcategory': 'punctuation',
'description': 'A hyphen used where a semicolon should be'},
'hyphen4word': {'category': 'orthography',
'subcategory': 'punctuation',
'description': 'A hyphen used where a word should be'},
'misplaced-quot': {'category': 'orthography',
'subcategory': 'punctuation',
'description': 'A quote is in the wrong position within a sentence'},
'missing-bracket': {'category': 'orthography',
'subcategory': 'punctuation',
'description': 'A single bracket missing'},
'missing-colon': {'category': 'orthography',
'subcategory': 'punctuation',
'description': 'A colon missing'},
'missing-comma': {'category': 'orthography',
'subcategory': 'punctuation',
'description': 'A comma missing'},
'missing-commas': {'category': 'orthography',
'subcategory': 'punctuation',
'description': 'Commas missing around insertion'},
'missing-conjunction': {'category': 'orthography',
'subcategory': 'punctuation',
'description': 'A conjunction missing'},
'missing-ex': {'category': 'orthography',
'subcategory': 'punctuation',
'description': 'An exclamation mark missing'},
'missing-period': {'category': 'orthography',
'subcategory': 'punctuation',
'description': 'A period missing'},
'missing-qm': {'category': 'orthography',
'subcategory': 'punctuation',
'description': 'A question mark missing'},
'missing-quot': {'category': 'orthography',
'subcategory': 'punctuation',
'description': 'A single quote missing'},
'missing-quots': {'category': 'orthography',
'subcategory': 'punctuation',
'description': 'Quotes missing'},
'missing-semicolon': {'category': 'orthography',
'subcategory': 'punctuation',
'description': 'A semicolon missing from a sentence'},
'missing-slash': {'category': 'orthography',
'subcategory': 'punctuation',
'description': 'Slash missing'},
'missing-square': {'category': 'orthography',
'subcategory': 'punctuation',
'description': 'A square bracket missing'},
'missing-symbol': {'category': 'orthography',
'subcategory': 'punctuation',
'description': 'A symbol missing'},
'nonsup4sup': {'category': 'orthography',
'subcategory': 'punctuation',
'description': 'Normal style of script used instead of superscript'},
'period-plus-conjunction': {'category': 'orthography',
'subcategory': 'punctuation',
'description': 'A period incorrectly used before a conjunction'},
'period4colon': {'category': 'orthography',
'subcategory': 'punctuation',
'description': 'A period used where a colon should be'},
'period4comma': {'category': 'orthography',
'subcategory': 'punctuation',
'description': 'A period used where a comma should be'},
'period4conjunction': {'category': 'orthography',
'subcategory': 'punctuation',
'description': 'A period used where a conjunction should be'},
'period4dash': {'category': 'orthography',
'subcategory': 'punctuation',
'description': 'A period used instead of a dash (en dash or em dash)'},
'period4ex': {'category': 'orthography',
'subcategory': 'punctuation',
'description': 'A period used where an exclamation mark should be'},
'period4qm': {'category': 'orthography',
'subcategory': 'punctuation',
'description': 'A period used where a question mark should be'},
'period4semicolon': {'category': 'orthography',
'subcategory': 'punctuation',
'description': 'A period used instead of a semicolon'},
'qm4comma': {'category': 'orthography',
'subcategory': 'punctuation',
'description': 'A question mark used where a comma should be'},
'qm4ex': {'category': 'orthography',
'subcategory': 'punctuation',
'description': 'A question mark for an exclamation mark'},
'qm4period': {'category': 'orthography',
'subcategory': 'punctuation',
'description': 'A question mark for a period'},
'semicolon4colon': {'category': 'orthography',
'subcategory': 'punctuation',
'description': 'A semicolon used where a colon should be'},
'semicolon4comma': {'category': 'orthography',
'subcategory': 'punctuation',
'description': 'A semicolon used where a comma should be'},
'semicolon4conjunction': {'category': 'orthography',
'subcategory': 'punctuation',
'description': 'semíkomma fyrir samtengingu'},
'semicolon4period': {'category': 'orthography',
'subcategory': 'punctuation',
'description': 'Semicolon used instead of a period'},
'slash4hyphen': {'category': 'orthography',
'subcategory': 'punctuation',
'description': 'A slash used instead of a hyphen'},
'slash4or': {'category': 'orthography',
'subcategory': 'punctuation',
'description': "A slash used instead of 'eða'"},
'square4bracket': {'category': 'orthography',
'subcategory': 'punctuation',
'description': 'A square bracket used where a bracket should be'},
'word4endash': {'category': 'orthography',
'subcategory': 'punctuation',
'description': 'A word used where an en dash should be'},
'word4symbol': {'category': 'orthography',
'subcategory': 'punctuation',
'description': 'A word used instead of a symbol'},
'wrong-quot': {'category': 'orthography',
'subcategory': 'punctuation',
'description': 'One part of a quotes pair is the wrong type of quote'},
'wrong-quots': {'category': 'orthography',
'subcategory': 'punctuation',
'description': 'The wrong type of quotes used which do not conform with Icelandic rules'},
'wrong-symbol': {'category': 'orthography',
'subcategory': 'punctuation',
'description': 'A wrong symbol used'},
'extra-space': {'category': 'orthography',
'subcategory': 'spacing',
'description': 'Redundant space'},
'merged-words': {'category': 'orthography',
'subcategory': 'spacing',
'description': 'Words incorrectly joined'},
'missing-endash': {'category': 'orthography',
'subcategory': 'spacing',
'description': 'An en dash missing'},
'missing-hyphen': {'category': 'orthography',
'subcategory': 'spacing',
'description': 'A hyphen missing in a compound'},
'missing-space': {'category': 'orthography',
'subcategory': 'spacing',
'description': 'Space missing'},
'split-compound': {'category': 'orthography',
'subcategory': 'spacing',
'description': 'A compound word split up'},
'split-word': {'category': 'orthography',
'subcategory': 'spacing',
'description': 'A word split in two parts'},
'split-words': {'category': 'orthography',
'subcategory': 'spacing',
'description': 'A word split into more than two parts'},
'bad-contraction': {'category': 'orthography',
'subcategory': 'spelling',
'description': 'An incorrect contraction'},
'hv4kv': {'category': 'orthography',
'subcategory': 'spelling',
'description': 'A word written with ‘hv’ instead of ‘kv’'},
'i4y': {'category': 'orthography',
'subcategory': 'spelling',
'description': '‘i’ written instead of ‘y’'},
'í4ý': {'category': 'orthography',
'subcategory': 'spelling',
'description': '‘í’ written instead of ‘ý’'},
'kv4hv': {'category': 'orthography',
'subcategory': 'spelling',
'description': 'A word written with ‘kv’ instead of ‘hv’'},
'n4nn': {'category': 'orthography',
'subcategory': 'spelling',
'description': '‘n’ written instead of ‘nn’, particularly in an inflectional ending'},
'name-error': {'category': 'orthography',
'subcategory': 'spelling',
'description': 'A proper name written incorrectly'},
'ngnk': {'category': 'orthography',
'subcategory': 'spelling',
'description': 'A broad vowel used before ‘ng’ or ‘nk’'},
'nn4n': {'category': 'orthography',
'subcategory': 'spelling',
'description': '‘nn’ written instead of ‘n’, particularly in an inflectional ending'},
'pronun-writing': {'category': 'orthography',
'subcategory': 'spelling',
'description': 'A word written according to its pronunciation'},
'u4y': {'category': 'orthography',
'subcategory': 'spelling',
'description': '‘U’ written instead of ‘y’ in the two words demonstrated below'},
'y4i': {'category': 'orthography',
'subcategory': 'spelling',
'description': '‘y’ written instead of ‘i’'},
'ý4í': {'category': 'orthography',
'subcategory': 'spelling',
'description': '‘ý’ written instead of ‘í’'},
'abbreviation4words': {'category': 'orthography',
'subcategory': 'style',
'description': 'An abbreviation used instead of the full words'},
'words4abbreviation': {'category': 'orthography',
'subcategory': 'style',
'description': 'Words used instead of their abbreviation'},
'extra-accent': {'category': 'orthography',
'subcategory': 'typo',
'description': 'A redundant accent used with a letter'},
'extra-letter': {'category': 'orthography',
'subcategory': 'typo',
'description': 'A redundant letter in a word'},
'extra-letters': {'category': 'orthography',
'subcategory': 'typo',
'description': 'More than one redundant letter in a word'},
'letter-rep': {'category': 'orthography',
'subcategory': 'typo',
'description': 'A letter within a word replaced with another letter'},
'missing-accent': {'category': 'orthography',
'subcategory': 'typo',
'description': 'An accent missing from a letter'},
'missing-letter': {'category': 'orthography',
'subcategory': 'typo',
'description': 'A letter missing in a word'},
'missing-letters': {'category': 'orthography',
'subcategory': 'typo',
'description': 'More than one letter missing in a word'},
'swapped-letters': {'category': 'orthography',
'subcategory': 'typo',
'description': 'Letters within a word swapped'},
'wrong-accent': {'category': 'orthography',
'subcategory': 'typo',
'description': 'A wrong accent used with a letter or an accent used with an incorrect letter'},
'dep': {'category': 'other',
'subcategory': 'other',
'description': 'An error dependent on another one'},
'gendered': {'category': 'style',
'subcategory': 'exclusion',
'description': 'Gendered language'},
'extra-number': {'category': 'style',
'subcategory': 'numbers',
'description': 'A redundant number'},
'number-fail': {'category': 'style',
'subcategory': 'numbers',
'description': 'An error relating to a number'},
'number4word': {'category': 'style',
'subcategory': 'numbers',
'description': 'A numeral used instead of a word. All numbers below and including 10 should be written as a word, except when they appear as part of a date or before a unit of measurement. Ordinals which are part of a proper name are always written as numerals.'},
'symbol4number': {'category': 'style',
'subcategory': 'numbers',
'description': 'A symbol used instead of a numeral'},
'word4number': {'category': 'style',
'subcategory': 'numbers',
'description': 'A word used instead of a numeral. All numbers higher than 10 should be written as a numeral, except when a number lower than 11 appears immediately before or after a number higher than that. Ordinals which are part of a proper name are always written as numerals.'},
'extra-symbol': {'category': 'style',
'subcategory': 'other',
'description': 'A redundant symbol'},
'symbol4word': {'category': 'style',
'subcategory': 'other',
'description': 'A symbol used where a word should be'},
'fw4ice': {'category': 'style',
'subcategory': 'style',
'description': 'A foreign word used instead of an Icelandic one'},
'ice4fw': {'category': 'style',
'subcategory': 'style',
'description': 'An Icelandic word used instead of a foreign one'},
'it4nonit': {'category': 'style',
'subcategory': 'style',
'description': 'A word in italic font which should be non-italic'},
'nonit4it': {'category': 'style',
'subcategory': 'style',
'description': 'A word in non-italic font which should be italic'},
'style': {'category': 'style',
'subcategory': 'style',
'description': 'A particular style in writing used'},
'taboo-word': {'category': 'style',
'subcategory': 'style',
'description': 'An inappropriate word used'},
'unicelandic': {'category': 'style',
'subcategory': 'style',
'description': 'Unicelandic usage in a sentence'},
'wording': {'category': 'style',
'subcategory': 'wording',
'description': 'Various errors regarding wording'},
'aux': {'category': 'vocabulary',
'subcategory': 'aux',
'description': 'Auxiliary verbs used incorrectly'},
'have': {'category': 'vocabulary',
'subcategory': 'aux',
'description': 'Confusion in the use of ‘hafa’, ‘eiga’ and ‘vera með’'},
'collocation': {'category': 'vocabulary',
'subcategory': 'collocation',
'description': 'An error in a collocation'},
'collocation-idiom': {'category': 'vocabulary',
'subcategory': 'collocation',
'description': 'An error in a collocation with an opaque meaning'},
'though': {'category': 'vocabulary',
'subcategory': 'collocation',
'description': "Confusion between 'þó að' and 'þótt'"},
'extra-word': {'category': 'vocabulary',
'subcategory': 'insertion',
'description': 'A redundant word'},
'extra-words': {'category': 'vocabulary',
'subcategory': 'insertion',
'description': 'More than one redundant word'},
'repeat-word': {'category': 'vocabulary',
'subcategory': 'insertion',
'description': 'A word repeated just after the other'},
'repeat-word-split': {'category': 'vocabulary',
'subcategory': 'insertion',
'description': 'A word repeated with some other words in between'},
'adj4noun': {'category': 'vocabulary',
'subcategory': 'lexical',
'description': 'An adjective used where a noun should be used'},
'context': {'category': 'vocabulary',
'subcategory': 'lexical',
'description': 'An incorrect word chosen for the particular context'},
'noun4adj': {'category': 'vocabulary',
'subcategory': 'lexical',
'description': 'A noun used where an adjective should be used'},
'það4þar': {'category': 'vocabulary',
'subcategory': 'lexical',
'description': 'það í stað þar'},
'þar4það': {'category': 'vocabulary',
'subcategory': 'lexical',
'description': 'The adverb ‘þar’ used where ‘það’ should be'},
'missing-word': {'category': 'vocabulary',
'subcategory': 'omission',
'description': 'A word missing'},
'missing-words': {'category': 'vocabulary',
'subcategory': 'omission',
'description': 'More than one word missing'},
'indef-pro': {'category': 'vocabulary',
'subcategory': 'pro',
'description': 'An indefinite pronoun used incorrectly'},
'interr-pro': {'category': 'vocabulary',
'subcategory': 'pro',
'description': 'An incorrect interrogative pronoun used'},
'plural4singular': {'category': 'vocabulary',
'subcategory': 'semantic',
'description': 'A plural word which should be singular'},
'singular4plural': {'category': 'vocabulary',
'subcategory': 'semantic',
'description': 'A singular word which should be plural'}}
_DESCRIPTION = """The Icelandic Error Corpus (IceEC) is a collection of texts in modern Icelandic annotated for mistakes related to spelling, grammar, and other issues. The texts are organized by genre. The current version includes sentences from student essays, online news texts and Wikipedia articles.
Sentences within texts in the student essays had to be shuffled due to the license which they were originally published under, but neither the online news texts nor the Wikipedia articles needed to be shuffled.
"""
_CITATION = "Anton Karl Ingason, Lilja Björk Stefánsdóttir, Þórunn Arnardóttir, and Xindan Xu. 2021. The Icelandic Error Corpus (IceEC). Version 1.1. (https://github.com/antonkarl/iceErrorCorpus)"
import json
import datasets
from dataclasses import dataclass
@dataclass
class IceECConfig(datasets.BuilderConfig):
"""BuilderConfig for IceEC."""
level: str = None
_URL = "https://huggingface.co/datasets/mideind/icelandic-error-corpus-IceEC/resolve/main"
_URLS = {
"train": _URL + "/train.json" ,
"test": _URL + "/test.json"
}
class IceEC(datasets.GeneratorBasedBuilder):
"""The Icelandic Error Corpus, IceEC."""
BUILDER_CONFIGS = [
IceECConfig(
name="fine-grained",
level=None,
description="Load the IEC using fine grained information",
),
IceECConfig(
name="subcategory",
level="subcategory",
description="Load the IEC using subcategories",
),
IceECConfig(
name="category",
level="category",
description="Load the IEC using top level categories",
),
]
def _info(self):
return datasets.DatasetInfo(
description=_DESCRIPTION,
features=datasets.Features(
{
"idx": datasets.Value("string"),
"sentence": datasets.Sequence(datasets.Value("string")),
"errors": datasets.Sequence(datasets.Sequence(datasets.Value("string"))),
"has_error": datasets.Value("bool"),
"corrected_sentence": datasets.Sequence(datasets.Value("string")),
}
),
# No default supervised_keys (as we have to pass both question
# and context as input).
supervised_keys=None,
homepage="",
citation=_CITATION,
)
def _split_generators(self, dl_manager):
downloaded_files = dl_manager.download_and_extract(_URLS)
return [
datasets.SplitGenerator(name=datasets.Split.TRAIN, gen_kwargs={"filepath": downloaded_files["train"]}),
datasets.SplitGenerator(name=datasets.Split.TEST, gen_kwargs={"filepath": downloaded_files["test"]}),
]
def _generate_examples(self, filepath):
with open(filepath, encoding="utf-8") as f:
for line in f:
data = json.loads(line.strip())
if self.config.level is not None:
errors = []
for word_errors in data["errors"]:
errors.append([ERROR_INFORMATION[e][self.config.level] for e in word_errors])
data["errors"] = errors
yield data["idx"], data