Multifaceted Assessments of Traditional Chinese Word Segmentation Tool on Large Corpora
1012Authors
nan
Abstract
AbstractThis study aims to evaluate three most popular word segmentation tool for a large Traditional Chinese corpus in terms of their efficiency, resource consumption, and cost. Specifically, we compare the performances of Jieba, CKIP, and MONPA on word segmentation, part-of-speech tagging and named entity recognition through extensive experiments. Experimental results show that MONPA using GPU for batch segmentation can greatly reduce the processing time of massive datasets. In addition, its features such as word segmentation, part-of-speech tagging, and named entity recognition are beneficial to downstream applications.
Keywords
Full Content
摘要 本研究之目的在於運用多種數值指標 及 實 驗 資 料 來 評 估 CKIP、Jieba、 MONPA 等三種廣泛應用於臺灣自然語 言處理產學界的正體中文斷詞器。我 們特別針對運算效能、資源需求等等 面向,檢驗其應用於大型語言文字資 料集時,處理斷詞、詞性標註及命名 實體辨識等工作之成效。實驗結果顯 示 ,MONPA 利 用 圖 形 運 算 加 速 器 ( GPU )進行批次處理斷詞時,可以 大幅度縮減巨量中文資料的運算時 間,且其斷詞、詞性標註、命名實體 辨識等多功能標籤均達到令人滿意的 品質,且其產出之標註結果可有效輔 助提升中文自然語言處理的後續相關 任務成效。 Abstract This study aims to evaluate three most popular word segmentation tool for a large Traditional Chinese corpus in terms of their 1 Corresponding author efficiency, resource consumption, and cost. Specifically, we compare the performances of Jieba, CKIP, and MONPA on word segmentation, part-of-speech tagging and named entity recognition through extensive experiments. Experimental results show that MONPA using GPU for batch segmentation can greatly reduce the processing time of massive datasets. In addition, its features such as word segmentation, part-of-speech tagging, and named entity recognition are beneficial to downstream applications. 關鍵字:自然語言處理,中文斷詞,詞性標 註,命名實體辨識 Keywords: NLP, Chinese Word Segmentation, POS, NER 1 緒論 近幾年來人工智慧應用發展可說是突飛猛 進,但據我們觀察,可以處理正體中文的人 工智慧模型仍存在進步空間,主要肇因於中 文自然語言處理(NLP)的基礎設施仍未到 正體中文斷詞系統應用於大型語料庫之多方評估研究 Multifaceted Assessments of Traditional Chinese Word Segmentation Tool on Large Corpora Wen-Chao Yeh Institute of Information Systems and Applications National Tsing Hua University Taiwan wyeh@m109.nthu.edu.tw Yu-Lun Hsieh Graduate Institute of Data Science Taipei Medical University Taiwan morpheus.h@gmail.com 1 Yung-Chun Chang Graduate Institute of Data Science Taipei Medical University Taiwan changyc@tmu.edu.tw Wen-Lian Hsu Department of Computer Science and Information Engineering Asia University Taiwan Pervasive AI Research Labs Ministry of Science and Technology Taiwan hsu@iis.sinica.edu.tw The 34th Conference on Computational Linguistics and Speech Processing (ROCLING 2022) Taipei, Taiwan, November 21-22, 2022. The Association for Computational Linguistics and Chinese Language Processing 193 位。其中,特別是斷詞(Word Segmentation) 這個自然語言處理流程中一個重要步驟,因 有別於英文書寫上可用空白(white space)為 線索來找到詞彙的邊界,中文書寫系統中的 空白並不帶有任何詞語邊界的意義。正因為 中文可以將單字或多字視為一個詞彙,要使 用計算機來分析、擷取中文的資訊,就需要 先以特殊工具完成斷詞處理。綜觀現今國內 外產學界在中文自然語言處理,我們歸納出 最 常 用 來 處 理 正 體 中 文 斷 詞 的 工 具 為 MONPA2、CKIP3、Jieba4 等三種。 一般認為 Jieba 斷詞系統速度較快,但正 確率較低;CKIP 最新版本增加開發了 python 套件,保持其長久以來優良的成效,且更方 便使用。 MONPA 對正體中文的支援度與 CKIP 處於伯仲之間。然而,至今尚未有嚴謹 的學術研究針對這三種工具作完整的評測實 驗。故本文將以上述三種斷詞工具對正體中 文的斷詞、詞性標註、命名實體辨識等功能 做多樣化的性能分析研究。更詳細來說,我 們將實驗並紀錄三種工具的套件載入及斷詞 運行時間,再分別以 SIGHAN 歷年來多筆 Share Task 的公開資料集,與專業人工標註的 新聞語料等資料進行正確率驗證。最後,從 網際網路以爬蟲技術搜集大量資料集供做文 本分類任務使用,以驗證不同斷詞工具的斷 詞結果是否影響機器學習的分類表現。 綜合實驗結果顯示,MONPA 利用 GPU 施行批次斷詞處理,可以大幅度縮減巨量中 文資料的斷詞時間,且其斷詞、詞性標註、 命名實體辨識等成果亦具有相當可靠的品 質,有益於後續應用機器學習作中文自然語 言處理的相關任務。 2 研究方法 Jieba 是基於簡體中文語料,透過 HMM 模型 (Baum et al., 1970) 所訓練出來的工具。就原始 版本而言,對正體中文的支援度不佳,但可 透過手動載入正體字詞字典檔來改善斷詞效 果。CKIP 為歷史悠久的斷詞工具,經中研院 CKIP Lab 以較新穎的 BiLSTM 架構訓練模型 (Li et al., 2020), 並 以 Python 套 件 釋 出 。 MONPA (Hsieh et al., 2017) 最初為基於遞歸神 2 https://github.com/monpa-team/monpa/ 3 https://github.com/ckiplab/ckiptagger 4 https://github.com/fxsjy/jieba 經網路 (Recurrent Neural Network, RNN) 所建 立的模型,並包含雙向 (bidirectional) 結構以 便學習更廣泛的語境知識,同時也引入注意 力 (attention) 機制,達到更佳的斷詞、標註等 效果。 除了所採用的模型及理論基礎不同以外, 這三種斷詞工具在工程層面亦有所差異,因 此運行的環境也不盡相同。除 Jieba 採用自行 開發的程式框架,CKIP 利用了 Tensorflow 這 個深度學習工具庫為基礎架構,MONPA 則是 採用 Pytorch 架構開發。為了盡可能的降低環 境變因,所以,本研究的實驗環境將基於同 一硬體設備,以 conda 建構 python 運行環境。 我們的硬體設置如下: • CPU: 4 * AMD EPYC 7252 8-Core Processor • GPU: 7 * NVIDIA GeForce RTX 3090 (24GB memory) • Memory: 8 * 32 GB (DDR4 3200 MT/s) • OS: Ubuntu 20.4 LTS 2.1 斷詞工具版本 • Jieba:安裝 0.42.1 版本5,並另外下載約 4 MB 大小的正體中文詞典。實驗時將分別 測試:(1) 預設版本,後稱 Jieba; (2) 匯入 正體中文字典檔版本,後稱 JiebaD。 • CKIP:安裝 0.2.1 版本6,並另外下載約 1.8 GB 大 小 的 模 型 檔 , 運 行 於 Tensorflow 2.6.0 架構。後稱 CKIP。 • MONPA:安裝 0.3.3 版本7(內含 8.9 MB 大小的模型檔),運行於 Pytorch 1.11.0 架 構。實驗時將分別測試:(1) MONPA 預設 的單句斷詞方法,後稱 MONPA;(2) 應用 GPU 效能的批次斷詞方法,後稱 MONPA Batch。 2.2 評測項目 本研究將實驗上述三種斷詞工具對正體中文 的斷詞、詞性標註、命名實體辨識等功能的 成果及效率。首先,我們紀錄三種工具的套 件載入及斷詞運行時間,再分別以 SIGHAN (AFNLP, 2003; AFNLP, 2005; Ng & Kwong, 2006; AFNLP, 2008) 歷年來多筆 Share Task 的 公開資料集,及經過專業人工標註的新聞語 料等資料集驗證。另外,我們也從網際網路 5 https://pypi.org/project/jieba/ …
Content truncated to 500 words
Labeled Text
AbstractThis study aims to evaluate three most popular word segmentation tool for a large Traditional Chinese corpus in terms of their efficiency, resource consumption, and cost. Specifically, we compare the performances of Jieba, CKIP, and MONPA on word segmentation, part-of-speech tagging and named entity recognition through extensive experiments. Experimental results show that MONPA using GPU for batch segmentation can greatly reduce the processing time of massive datasets. In addition, its features such as word segmentation, part-of-speech tagging, and named entity recognition are beneficial to downstream applications.
Publication Details
- Paper ID:
- 1012
- Year:
- 2022
- Publication:
- TIPSTER
- Publication Type:
- conf
- DOI:
- nan