{"about":{"site":"https://codewithpapers.app","non_affiliation":"Code with Papers and Syntology are not affiliated with, endorsed by, or sponsored by Papers with Code, Meta, or the pwc-archive mirror.","licence":"CC BY-SA 4.0","licence_url":"https://creativecommons.org/licenses/by-sa/4.0/legalcode","attribution":"https://codewithpapers.app/attribution","modified":"archive material modified by Syntology; see the attribution page"},"url":"/paper/advancements-in-arabic-grammatical-error","title":"Advancements in Arabic Grammatical Error Detection and Correction: An Empirical Investigation","arxiv_id":"2305.14734","date":"2023-05-24","proceeding":null,"authors":["Bashar Alhafni","Go Inoue","Christian Khairallah","Nizar Habash"],"abstract":"Grammatical error correction (GEC) is a well-explored problem in English with many existing models and datasets. However, research on GEC in morphologically rich languages has been limited due to challenges such as data scarcity and language complexity. In this paper, we present the first results on Arabic GEC using two newly developed Transformer-based pretrained sequence-to-sequence models. We also define the task of multi-class Arabic grammatical error detection (GED) and present the first results on multi-class Arabic GED. We show that using GED information as an auxiliary input in GEC models improves GEC performance across three datasets spanning different genres. Moreover, we also investigate the use of contextual morphological preprocessing in aiding GEC systems. Our models achieve SOTA results on two Arabic GEC shared task datasets and establish a strong benchmark on a recently created dataset. We make our code, data, and pretrained models publicly available.","url_abs":"https://arxiv.org/abs/2305.14734v2","url_pdf":"https://arxiv.org/pdf/2305.14734v2.pdf","source":{"archive":"pwc-archive (Hugging Face), CC BY-SA 4.0","snapshot":"2025-07-28","licence_url":"https://creativecommons.org/licenses/by-sa/4.0/legalcode","row_kind":"abstracts"},"code_links":[{"paper_slug":"advancements-in-arabic-grammatical-error","repo_url":"https://github.com/camel-lab/arabic-gec","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"jax","reach":{"status":"ok","spdx":"MIT"}}],"tasks":[{"task_slug":"grammatical-error-correction","task_name":"Grammatical Error Correction"},{"task_slug":"grammatical-error-detection","task_name":"Grammatical Error Detection"}],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2305.14734","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2305.14734"}},"developers":"https://syntology.ai/developers","read_at":"2026-09-24T18:15:14+00:00","read_at_is":"when the build read Syntology's graph, not when any sample ran","claim":"Per-sample execution status on synthesized fixtures; not a correctness claim about the paper. Samples come from repositories linked to the paper, official or community; repo_kind says which.","repos":[{"provenance":"deterministic:regex_extraction","url":"https://github.com/CAMeL-Lab/arabic-gec","reach":{"status":"ok","spdx":"MIT"}}],"summary":{"unverified":14},"by_repo_kind":{"official":{"samples":14,"ran":0,"repositories":1}},"repo_kind_vocabulary":{"official":"The archive marks this repository official for the paper","named_in_paper":"The archive records that the paper mentions this repository; it is not marked official","listed":"In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper","found_in_text":"Syntology found this repository in the paper's own text; whether it is the authors' implementation is not asserted","community":"Not in the archive's code links for this paper; a community repository Syntology harvested"},"n_pointer_only_for_licence":0,"samples":[{"code_sha256_prefix":"d92e76fd142eaf2f","entry":"aggregate_score","repo":"CAMeL-Lab/arabic-gec","repo_kind":"official","path":"gec/stat_significance/significance.py","file_url":"https://github.com/CAMeL-Lab/arabic-gec/blob/HEAD/gec/stat_significance/significance.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"d92e76fd142eaf2f"}},{"code_sha256_prefix":"fb735fc390a17b4f","entry":"build_ngrams","repo":"CAMeL-Lab/arabic-gec","repo_kind":"official","path":"gec/mle/mle.py","file_url":"https://github.com/CAMeL-Lab/arabic-gec/blob/HEAD/gec/mle/mle.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"fb735fc390a17b4f"}},{"code_sha256_prefix":"7dd4861d3c021f66","entry":"check_en","repo":"CAMeL-Lab/arabic-gec","repo_kind":"official","path":"gec/utils/chatgpt_clean.py","file_url":"https://github.com/CAMeL-Lab/arabic-gec/blob/HEAD/gec/utils/chatgpt_clean.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"7dd4861d3c021f66"}},{"code_sha256_prefix":"ce2c1d18637e5547","entry":"featurize_ged","repo":"CAMeL-Lab/arabic-gec","repo_kind":"official","path":"gec/generate.py","file_url":"https://github.com/CAMeL-Lab/arabic-gec/blob/HEAD/gec/generate.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"ce2c1d18637e5547"}},{"code_sha256_prefix":"b5db330985ffff36","entry":"get_best_checkpoint_gec","repo":"CAMeL-Lab/arabic-gec","repo_kind":"official","path":"gec/utils/get_best_checkpoint.py","file_url":"https://github.com/CAMeL-Lab/arabic-gec/blob/HEAD/gec/utils/get_best_checkpoint.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"b5db330985ffff36"}},{"code_sha256_prefix":"4d20815eb1620a67","entry":"get_labels","repo":"CAMeL-Lab/arabic-gec","repo_kind":"official","path":"gec/run_gec.py","file_url":"https://github.com/CAMeL-Lab/arabic-gec/blob/HEAD/gec/run_gec.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"4d20815eb1620a67"}},{"code_sha256_prefix":"7660d57e1bcceb88","entry":"is_model_tag","repo":"CAMeL-Lab/arabic-gec","repo_kind":"official","path":"gec/mle/mle.py","file_url":"https://github.com/CAMeL-Lab/arabic-gec/blob/HEAD/gec/mle/mle.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"7660d57e1bcceb88"}},{"code_sha256_prefix":"b7aecf3e97533ea9","entry":"load_scores","repo":"CAMeL-Lab/arabic-gec","repo_kind":"official","path":"gec/stat_significance/significance.py","file_url":"https://github.com/CAMeL-Lab/arabic-gec/blob/HEAD/gec/stat_significance/significance.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"b7aecf3e97533ea9"}},{"code_sha256_prefix":"a5bd2eb7522c6cc9","entry":"paired_ar_test","repo":"CAMeL-Lab/arabic-gec","repo_kind":"official","path":"gec/stat_significance/significance.py","file_url":"https://github.com/CAMeL-Lab/arabic-gec/blob/HEAD/gec/stat_significance/significance.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"a5bd2eb7522c6cc9"}},{"code_sha256_prefix":"a8cec3d76376377c","entry":"postprocess_src_ged","repo":"CAMeL-Lab/arabic-gec","repo_kind":"official","path":"gec/mle/data_utils.py","file_url":"https://github.com/CAMeL-Lab/arabic-gec/blob/HEAD/gec/mle/data_utils.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"a8cec3d76376377c"}},{"code_sha256_prefix":"f082616f91f7e832","entry":"preprocess","repo":"CAMeL-Lab/arabic-gec","repo_kind":"official","path":"gec/generate.py","file_url":"https://github.com/CAMeL-Lab/arabic-gec/blob/HEAD/gec/generate.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"f082616f91f7e832"}},{"code_sha256_prefix":"6a8b5c4ecd1a9ab0","entry":"project_span","repo":"CAMeL-Lab/arabic-gec","repo_kind":"official","path":"gec/mle/data_utils.py","file_url":"https://github.com/CAMeL-Lab/arabic-gec/blob/HEAD/gec/mle/data_utils.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"6a8b5c4ecd1a9ab0"}},{"code_sha256_prefix":"ad6102db588adf49","entry":"prompt_template_n_shot","repo":"CAMeL-Lab/arabic-gec","repo_kind":"official","path":"gec/chatgpt_gec.py","file_url":"https://github.com/CAMeL-Lab/arabic-gec/blob/HEAD/gec/chatgpt_gec.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"ad6102db588adf49"}},{"code_sha256_prefix":"23b93b84aae60065","entry":"read_data","repo":"CAMeL-Lab/arabic-gec","repo_kind":"official","path":"gec/utils/chatgpt_clean.py","file_url":"https://github.com/CAMeL-Lab/arabic-gec/blob/HEAD/gec/utils/chatgpt_clean.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"23b93b84aae60065"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}