自然語言處理
跳去導覽
跳去搵嘢
自然語言處理(粵拼:zi6 jin4 jyu5 jin4 cyu2 lei5;英文:natural language processing,簡稱「NLP」)係人工智能同語言學嘅一個綜合領域,包含咗一大類用嚟教電腦處理同運算語言同文字嘅技術,並且用呢啲技術嚟發展出有用嘅電腦系統[1]。
自然語言處理嘅過程大致如下:人類平時講嘢用嘅語言係所謂嘅自然語言(natural language)-英文、廣東話、同上海話等都係自然語言;NLP 嘅數據來源可以分做聲同字兩大類-前者指事先錄低嘅人講嘢嘅聲,而後者就係以文字形式呈現嘅語言,來源可以係網頁同各種嘅文件同數據庫,例如好多 NLP 程式開始嗰陣都會有陳述式教部電腦由邊個邊個網頁嘅 HTML 碼嗰度攞要處理嗰段字;攞到要處理嘅數據做輸入(input)之後,個 NLP 程式要有啲特定嘅演算法處理段字,最後得出某啲輸出(output),輸出視用途而定-有啲程式目的係要翻譯段字(輸入:一段字;輸出:一段以目標語言寫、意思等同輸入嗰段字嘅字),又有啲程式目的係要用嚟分析段字帶有乜嘢情緒(個輸出可以係「表達恐懼嘅字出現得幾密」同「表達憤怒嘅字出現得幾密」啊噉)... 等等[1][2]。
自然語言處理用途好廣泛,包括咗[3]:
... 等等。
例子碼[編輯]
- MATLAB
以下嘅 MATLAB 碼會攞一段字做輸入:
filename = "sonnets.txt"; % 講明要讀嗰段字嘅檔案名。
str = extractFileText(filename); % 由個檔案嗰度攞 input 嗰段字。
start = " I" + newline;
fin = " II";
sonnet1 = extractBetween(str,start,fin)
% 攞 start 同 fin 之間嗰段字,即係第一首詩。
睇埋[編輯]
攷[編輯]
- ↑ 1.0 1.1 Collobert, R., Weston, J., Bottou, L., Karlen, M., Kavukcuoglu, K., & Kuksa, P. (2011). Natural language processing (almost) from scratch. Journal of machine learning research, 12(Aug), 2493-2537.
- ↑ Berger, A. L., Pietra, V. J. D., & Pietra, S. A. D. (1996). A maximum entropy approach to natural language processing. Computational linguistics, 22(1), 39-71.
- ↑ Data analytics with human language data 互聯網檔案館嘅歸檔,歸檔日期2019年12月9號,..
參考[編輯]
- Bates, M (1995). "Models of natural language understanding". Proceedings of the National Academy of Sciences of the United States of America. 92 (22): 9977–9982. doi:10.1073/pnas.92.22.9977. PMC 40721. PMID 7479812.
- Steven Bird, Ewan Klein, and Edward Loper (2009). Natural Language Processing with Python. O'Reilly Media. ISBN 978-0-596-51649-9.
- Daniel Jurafsky and James H. Martin (2008). Speech and Language Processing, 2nd edition. Pearson Prentice Hall. ISBN 978-0-13-187321-6.
- Mohamed Zakaria Kurdi (2016). Natural Language Processing and Computational Linguistics: speech, morphology, and syntax, Volume 1. ISTE-Wiley. ISBN 978-1848218482.
- Mohamed Zakaria Kurdi (2017). Natural Language Processing and Computational Linguistics: semantics, discourse, and applications, Volume 2. ISTE-Wiley. ISBN 978-1848219212.
- Christopher D. Manning, Prabhakar Raghavan, and Hinrich Schütze (2008). Introduction to Information Retrieval. Cambridge University Press. ISBN 978-0-521-86571-5. Official html and pdf versions available without charge.
- Christopher D. Manning and Hinrich Schütze (1999). Foundations of Statistical Natural Language Processing. The MIT Press. ISBN 978-0-262-13360-9.
- David M. W. Powers and Christopher C. R. Turk (1989). Machine Learning of Natural Language. Springer-Verlag. ISBN 978-0-387-19557-5.