簡易檢索 / 詳目顯示

研究生: 張達元
Chang, Ta-Yuan
論文名稱: 應用類神經模型於形容詞改錯
Applying Neural Network Model to Adjective Correction
指導教授: 張俊盛
Chang, Jason S.
口試委員: 張寶玉
Vongpumivitch, V.*
顏安孜
Yen, An-Zi
高宏宇
Kao, Hung-Yu
學位類別: 碩士
Master
系所名稱: 電機資訊學院 - 資訊系統與應用研究所
Institute of Information Systems and Applications
論文出版年: 2023
畢業學年度: 111
語文別: 英文
論文頁數: 46
中文關鍵詞: 文法改錯語言模型雜訊通道模型
外文關鍵詞: Grammatical Error Correction, Language Model, Noisy Channel Model
相關次數: 點閱:4下載:0
分享至:
查詢本校圖書館目錄 查詢臺灣博碩士論文知識加值系統 勘誤回報
  • 本論文提出一個英文形容詞改善建議的方法,自動針對句子內的形容詞偵錯並
    提供一些適當的形容詞使用建議。我們採取利用語言模型(Language Model,
    LM)產生候選字,與使用語言模型和通道模型(Channel Model)所構成的混合
    評分技術來建立系統。此方法涉及利用語言模型生成形容詞候選詞,並共同利
    用語言模型與噪聲通道模型來做最終評分與排序。實驗結果顯示,我們的方法
    能有效保留適當的形容詞並與單純使用語言模型挑選形容詞比起來能獲得較佳
    的結果。


    We introduce a method for detecting adjective errors and generating appropriate adjective suggestions in a given sentence. In our approach, sentences are transformed into adjective queries aimed at maximizing the probability of detecting and correcting improper word choices. The method involves collecting candidates by masked language models, scoring, and ranking by combining the language model and channel model. We present a prototype adjective correcting service, Properly, that applies the method to correct adjective errors. The evaluation of the Longman Dictionary of Common Error(LDoCE) shows that our method outperforms the baseline which simply uses a masked language model.

    Abstract i 摘要ii 致謝iii Contents v List of Figures vii List of Tables viii 1 Introduction 1 2 Related Work 3 3 Methodology 8 3.1 Problem Statement . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 3.2 Training Channel Model . . . . . . . . . . . . . . . . . . . . . . . . 9 3.2.1 Training Word-Level Channel Model . . . . . . . . . . . . . 10 3.2.2 Using Pre-trained NLI as Sentence-Level Channel Model . . 12 3.3 Revising Incorrect Adjective and Proposing Substitutes . . . . . . . 14 v 4 Experiment 18 4.1 Datasets and Toolkits . . . . . . . . . . . . . . . . . . . . . . . . . . 19 4.2 Data Preprocessing . . . . . . . . . . . . . . . . . . . . . . . . . . . 21 4.3 Model Implementation . . . . . . . . . . . . . . . . . . . . . . . . . 24 4.3.1 Masked Language Model . . . . . . . . . . . . . . . . . . . . 24 4.3.2 Channel Model . . . . . . . . . . . . . . . . . . . . . . . . . 24 4.3.3 Parameters Settings . . . . . . . . . . . . . . . . . . . . . . 26 4.4 Models Compared . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26 4.5 Evaluation Metrics . . . . . . . . . . . . . . . . . . . . . . . . . . . 27 5 Evaluation Results 30 5.1 Results of LDoCE testing data . . . . . . . . . . . . . . . . . . . . . 31 5.2 Results of 50 Randomly Selected Sentences from LDoCE Testing Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33 6 Conclusion and Future Work 37 Reference 39 vi List of Figures 3.1 Outline of training ADJ Channel Model . . . . . . . . . . . . . . . 10 3.2 3 Variations of the Channel Model Scoring Using the NLI Model . . 13 3.3 Suggest Inappropriate Adjective Based on Language Model and Noisy Channel Model . . . . . . . . . . . . . . . . . . . . . . . . . . 14 3.4 An example of suggesting process (a) the input sentence (b) Extracting adjectives by dependency parser (c) Generating alternatives from MLM with scores (d) Scoring alternatives with channel model (e) Scoring and ranking with both MLM and channel model 17 5.1 Average precision (a), recall (b), ofMLM, MLM+WCM, MLM+ SCMF , MLM + SCMB, and MLM + SCMALL over 50 random selected sentences from Section 5.1 for varying numbers of top 10 suggestions examined. . . . . . . . . . . . . . . . . . . . . . . . . . 36 vii List of Tables 3.1 Example of extracting a confusion set of ADJ editing . . . . . . . . 11 3.2 Example of constructing negative data for word-level channel model 11 3.3 Example of extracting POS tags and mask sentence . . . . . . . . . 15 4.1 Training Data of the Word-level Channel Model . . . . . . . . . . . 22 4.2 Expert Evaluation for the Adjective ”pure” in the Sentence ”We opened the window to get some pure air.” . . . . . . . . . . . . . . . 23 4.3 Model Architecture and Hyperparameter Settings of Word-level Channel Model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25 5.1 Evaluation ofMLM, MLM+WCM, MLM+SCMF , MLM+SCMB, and MLM+SCMALL on LDoCE test set with MRR metric . . . . . 32 5.2 Evaluation of MLM, MLM+WCM, MLM+SCMF , MLM+SCMB, and MLM+SCMALL on LDoCE test set with Hit Ratio Metric in Top-N Suggestions . . . . . . . . . . . . . . . . . . . . . . . . . . . 32 5.3 Evaluation of MLM, MLM+WCM, MLM+SCMF , MLM+SCMB, and MLM+SCMALL over 50 randomly selected sentences from Section 5.1 with MRR and MAP metric in Top 10 Suggestions . . . . . 33

    Adriane Boyd. Using Wikipedia Edits in Low Resource Grammatical Error Correction.
    pages 79–84, 2018. URL https://www.linguistik.hu-berlin.
    Christopher Bryant and Ted Briscoe. Language Model Based Grammatical Error
    Correction without Annotated Training Data. pages 247–253, 2018. URL
    https://spacy.io/.
    Christopher Bryant, Mariano Felice, and Ted Briscoe. Automatic annotation and
    evaluation of error types for grammatical error correction. In Proceedings of the
    55th Annual Meeting of the Association for Computational Linguistics (Volume
    1: Long Papers), pages 793–805, Vancouver, Canada, July 2017. Association
    for Computational Linguistics. doi: 10.18653/v1/P17-1074. URL https://
    aclanthology.org/P17-1074.
    Christopher Bryant, Mariano Felice, Øistein E. Andersen, and Ted Briscoe. The
    BEA-2019 Shared Task on Grammatical Error Correction. In Proceedings
    of the Fourteenth Workshop on Innovative Use of NLP for Building Educational
    Applications, pages 52–75, Florence, Italy, August 2019. Association
    for Computational Linguistics. doi: 10.18653/v1/W19-4406. URL https:
    //aclanthology.org/W19-4406.
    39
    Yo Joong Choe, Jiyeon Ham, Kyubyong Park, and Yeoil Yoon. A neural grammatical
    error correction system built on better pre-training and sequential transfer
    learning. In Proceedings of the Fourteenth Workshop on Innovative Use of NLP
    for Building Educational Applications, pages 213–227, Florence, Italy, August
    2019. Association for Computational Linguistics. doi: 10.18653/v1/W19-4423.
    URL https://aclanthology.org/W19-4423.
    Shamil Chollampatt and Hwee Tou Ng. Neural Quality Estimation of Grammatical
    Error Correction. pages 2528–2539. URL https://github.com/nusnlp/neuqe.
    Publisher: Association for Computational Linguistics.
    Daniel Dahlmeier and Hwee Tou Ng. Correcting Semantic Collocation Errors with
    L1-induced Paraphrases. In Proceedings of the 2011 Conference on Empirical
    Methods in Natural Language Processing, pages 107–117, Edinburgh, Scotland,
    UK., July 2011. Association for Computational Linguistics. URL https://
    aclanthology.org/D11-1010.
    Rachele De Felice and Stephen Pulman. A classifier-based approach to preposition
    and determiner error correction in l2 english. In Proceedings of the 22nd international
    conference on computational linguistics (Coling 2008), pages 169–176,
    2008.
    Simon Flachs, Oph´elie Lacroix, and Anders Søgaard. Noisy Channel for Low
    Resource Grammatical Error Correction. In Proceedings of the Fourteenth
    Workshop on Innovative Use of NLP for Building Educational Applications,
    pages 191–196, Florence, Italy, August 2019. Association for Computational
    40
    Linguistics. doi: 10.18653/v1/W19-4420. URL https://aclanthology.org/
    W19-4420.
    Jeroen Geertzen, Theodora Alexopoulou, and Anna Korhonen. Automatic Linguistic
    annotation of large scale L2 databases: The EF-Cambridge Open Language
    Database (EFCAMDAT). Selected Proceedings of the 31st Second Language
    Research Forum (SLRF), 2013. URL http://corpus.mml.cam.ac.uk/
    efcamdat/,.
    Chooi Ling Goh. Applying Masked Language Models to Search for Suitable
    Verbs Used in Academic Writing. In Proceedings of the 35th Pacific Asia Conference
    on Language, Information and Computation, pages 180–188, Shanghai,
    China, November 2021. Association for Computational Lingustics. URL
    https://aclanthology.org/2021.paclic-1.19.
    Roman Grundkiewicz, Marcin Junczys-Dowmunt, and Kenneth Heafield. Neural
    grammatical error correction systems with unsupervised pre-training on synthetic
    data. In Proceedings of the Fourteenth Workshop on Innovative Use
    of NLP for Building Educational Applications, pages 252–263, Florence, Italy,
    August 2019. Association for Computational Linguistics. doi: 10.18653/v1/
    W19-4427. URL https://aclanthology.org/W19-4427.
    Aur´elie Herbelot and Ekaterina Kochmar. ‘Calling on the classical phone’: a
    distributional model of adjective-noun errors in learners’ English. In Proceedings
    of COLING 2016, the 26th International Conference on Computational
    Linguistics: Technical Papers, pages 976–986, Osaka, Japan, December 2016.
    41
    The COLING 2016 Organizing Committee. URL https://aclanthology.org/
    C16-1093.
    Matthew Honnibal, Ines Montani, Sofie Van Landeghem, and Adriane Boyd.
    spaCy: Industrial-strength Natural Language Processing in Python, 2020. URL
    https://doi.org/10.5281/zenodo.1212303.
    Marcin Junczys-Dowmunt and Roman Grundkiewicz. Phrase-based machine
    translation is state-of-the-art for automatic grammatical error correction. In
    Proceedings of the 2016 Conference on Empirical Methods in Natural Language
    Processing, pages 1546–1556, Austin, Texas, November 2016. Association
    for Computational Linguistics. doi: 10.18653/v1/D16-1161. URL https:
    //aclanthology.org/D16-1161.
    Shun Kiyono, Jun Suzuki, Masato Mita, Tomoya Mizumoto, and Kentaro Inui. An
    Empirical Study of Incorporating Pseudo Data into Grammatical Error Correction.
    pages 1236–1242, 2019. URL https://competitions.codalab.org/.
    Publisher: Association for Computational Linguistics.
    Ekaterina Kochmar and Ted Briscoe. Capturing Anomalies in the Choice of Content
    Words in Compositional Distributional Semantic Space. In Proceedings of
    the International Conference Recent Advances in Natural Language Processing
    RANLP 2013, pages 365–372, Hissar, Bulgaria, September 2013. INCOMA Ltd.
    Shoumen, BULGARIA. URL https://aclanthology.org/R13-1047.
    Ekaterina Kochmar and Ted Briscoe. Detecting Learner Errors in the Choice
    of Content Words Using Compositional Distributional Semantics. In Proceedings
    of COLING 2014, the 25th International Conference on Computational
    42
    Linguistics: Technical Papers, pages 1740–1751, Dublin, Ireland, August 2014.
    Dublin City University and Association for Computational Linguistics. URL
    https://aclanthology.org/C14-1164.
    Ekaterina Kochmar and Ted Briscoe. Using Learner Data to Improve Error Correction
    in Adjective–Noun Combinations. In Proceedings of the Tenth Workshop
    on Innovative Use of NLP for Building Educational Applications, pages 233–242,
    Denver, Colorado, June 2015. Association for Computational Linguistics. doi:
    10.3115/v1/W15-0627. URL https://aclanthology.org/W15-0627.
    Ryo Nagata, Manabu Kimura, and Kazuaki Hanawa. Exploring the Capacity
    of a Large-scale Masked Language Model to Recognize Grammatical Errors.
    In Findings of the Association for Computational Linguistics: ACL
    2022, pages 4107–4118, Dublin, Ireland, May 2022. Association for Computational
    Linguistics. doi: 10.18653/v1/2022.findings-acl.324. URL https:
    //aclanthology.org/2022.findings-acl.324.
    Hwee Tou Ng, Siew Mei Wu, Ted Briscoe, Christian Hadiwinoto, Raymond Hendy
    Susanto, and Christopher Bryant. The CoNLL-2014 Shared Task on Grammatical
    Error Correction. pages 26–27, 2014. Publisher: Association for Computational
    Linguistics.
    Kostiantyn Omelianchuk, Vitaliy Atrasevych, Artem Chernodub, and Oleksandr
    Skurzhanskyi. GECToR – Grammatical Error Correction: Tag, Not Rewrite. In
    Proceedings of the Fifteenth Workshop on Innovative Use of NLP for Building
    Educational Applications, pages 163–170, Seattle, WA, USA → Online, July
    43
    2020. Association for Computational Linguistics. doi: 10.18653/v1/2020.bea-1.
    16. URL https://aclanthology.org/2020.bea-1.16.
    Y Albert Park and Roger Levy. Automated Whole Sentence Grammar Correction
    Using a Noisy Channel Model. pages 934–944, 2011.
    Adam Paszke, Sam Gross, Francisco Massa, Adam Lerer, James Bradbury,
    Gregory Chanan, Trevor Killeen, Zeming Lin, Natalia Gimelshein,
    Luca Antiga, Alban Desmaison, Andreas Kopf, Edward Yang, Zachary
    DeVito, Martin Raison, Alykhan Tejani, Sasank Chilamkurthy, Benoit
    Steiner, Lu Fang, Junjie Bai, and Soumith Chintala. Pytorch: An
    imperative style, high-performance deep learning library. In Advances
    in Neural Information Processing Systems 32, pages 8024–8035. Curran
    Associates, Inc., 2019. URL http://papers.neurips.cc/paper/
    9015-pytorch-an-imperative-style-high-performance-deep-learning-library.
    pdf.
    Jeffrey Pennington, Richard Socher, and Christopher Manning. GloVe: Global
    vectors for word representation. In Proceedings of the 2014 Conference on Empirical
    Methods in Natural Language Processing (EMNLP), pages 1532–1543,
    Doha, Qatar, October 2014. Association for Computational Linguistics. doi:
    10.3115/v1/D14-1162. URL https://aclanthology.org/D14-1162.
    Sascha Rothe, Jonathan Mallinson, Eric Malmi, Sebastian Krause, and Aliaksei
    Severyn. A Simple Recipe for Multilingual Grammatical Error Correction.
    ACL-IJCNLP 2021 - 59th Annual Meeting of the Association for Computational
    Linguistics and the 11th International Joint Conference on Natural Lan-
    44
    guage Processing, Proceedings of the Conference, 2:702–707, June 2021. doi: 10.
    48550/arxiv.2106.03830. URL https://arxiv.org/abs/2106.03830v1. ISBN:
    9781954085527 Publisher: Association for Computational Linguistics (ACL)
    eprint: 2106.03830.
    Grigori Sidorov. Syntactic dependency based n-grams in rule based automatic
    english as second language grammar correction. Int. J. Comput. Linguistics
    Appl., 4(2):169–188, 2013.
    Felix Stahlberg, Christopher Bryant, and Bill Byrne. Neural Grammatical Error
    Correction with Finite State Transducers. In Proceedings of the 2019
    Conference of the North American Chapter of the Association for Computational
    Linguistics: Human Language Technologies, Volume 1 (Long and Short
    Papers), pages 4033–4039, Minneapolis, Minnesota, June 2019. Association
    for Computational Linguistics. doi: 10.18653/v1/N19-1406. URL https:
    //aclanthology.org/N19-1406.
    Thomas Wolf, Lysandre Debut, Victor Sanh, Julien Chaumond, Clement Delangue,
    Anthony Moi, Pierric Cistac, Tim Rault, R´emi Louf, Morgan Funtowicz,
    Joe Davison, Sam Shleifer, Patrick von Platen, Clara Ma, Yacine Jernite,
    Julien Plu, Canwen Xu, Teven Le Scao, Sylvain Gugger, Mariama Drame,
    Quentin Lhoest, and Alexander M. Rush. Transformers: State-of-the-art natural
    language processing. In Proceedings of the 2020 Conference on Empirical
    Methods in Natural Language Processing: System Demonstrations, pages 38–
    45, Online, October 2020. Association for Computational Linguistics. URL
    https://www.aclweb.org/anthology/2020.emnlp-demos.6.
    45
    Jian-Cheng Wu, Yu-Chia Chang, Teruko Mitamura, and Jason S. Chang. Automatic
    Collocation Suggestion in Academic Writing. In Proceedings of the ACL
    2010 Conference Short Papers, pages 115–119, Uppsala, Sweden, July 2010.
    Association for Computational Linguistics. URL https://aclanthology.org/
    P10-2021.
    Yu-Hsuan Wu, Jhih-Jie Chen, and Jason Chang. Verb Replacer: An English
    Verb Error Correction System. In Proceedings of the IJCNLP 2017, System
    Demonstrations, pages 49–52, Tapei, Taiwan, November 2017. Association for
    Computational Linguistics. URL https://aclanthology.org/I17-3013.
    Michihiro Yasunaga, Jure Leskovec, and Percy Liang. LM-Critic: Language
    Models for Unsupervised Grammatical Error Correction, October 2021. URL
    http://arxiv.org/abs/2109.06822. arXiv:2109.06822 [cs].
    Yi-Dong Wu and Jason S. Chang. Dealing with Improper Verbs in Writing based
    on Language Model. 2021.
    Zheng Yuan, Shiva Taslimipoor, Christopher Davis, and Christopher Bryant.
    Multi-Class Grammatical Error Detection for Correction: A Tale of Two Systems.
    In Proceedings of the 2021 Conference on Empirical Methods in Natural
    Language Processing, pages 8722–8736, Online and Punta Cana, Dominican
    Republic, November 2021. Association for Computational Linguistics. doi:
    10.18653/v1/2021.emnlp-main.687. URL https://aclanthology.org/2021.
    emnlp-main.687.

    QR CODE