語義網絡
語義網絡(粵拼:jyu5 ji6 mong5 lok6;英文:Semantic network)係知識庫嘅一種做法,用一幅有向圖或者無向圖表示一拃概念之間嘅關係。一個基本嘅語義網絡會有若干個[1]
舉例說明,想像附圖入面嗰個語義網絡,圖入面有哺乳類動物、貓同埋毛皮等嘅節點,每個節點都代表咗個概念,幅圖仲有一條條嘅連繫(啲箭咀)喺節點之間,每條連繫表示咗一段關係-由貓指去哺乳類條箭咀表示「貓係一種哺乳類」,而由貓指去毛皮條箭咀表示「貓有毛皮」... 等等;成個網絡「表示」緊有關「呢拃概念之間係咩關係」嘅知識。進階嘅語義網絡模型會有更加複雜嘅結構[2][3]。
語義網絡源自 1950 年代[4],喺打後幾十年內就廣泛噉俾認知科學採用:認知心理學發覺將人腦想像成語義網絡嘅話,能夠解釋到唔少有關「人腦點處理文字資訊」相關嘅現象,例如促發效應噉[5];而喺人工智能上,語義網絡仲可以攞嚟教電腦處理日常語言[6]。
定義
編輯响嚴格定義上,語義網絡係一種抽象化嘅圖,有向(啲連繫有特定方向)又得無向(啲連繫冇特定方向)又得,最基本組成部份包括咗兩樣嘢[7][8]:
- 節點[e 1],當中每個節點代表一個概念;概念係指對一拃嘢嘅抽象化,例如一個人睇咗 100 樖樹之後,發覺嗰 100 嚿物件都有「有葉」同「有樹幹」等嘅特徵-於是佢個腦裏面就組成咗「樹」嘅概念,「動物」同「貓」等嘅概念道理一樣[9];
- 節點之間會有一啲連繫[e 2];精確啲講,每條連繫表達嘅係語義關係-即係話條連繫在意嘅係啲字背後嘅意思;最基本嘅連繫有
好似下圖噉嘅語義網絡表示咗一啲有關動物嘅知識:啲節點係哺乳類、貓、毛皮、動物、魚、鯨魚同水等好多個同動物有關嘅概念,而啲連繫表示咗概念之間嘅關係-
- 由貓指去哺乳類條箭咀表示「貓係一種哺乳類」;
- 由貓指去毛皮條箭咀表示「貓有毛皮」;
- 由魚指去水條箭咀表示「魚住喺水入邊」... 等等[11]。
喺認知心理學上,語義網絡俾人指可以攞嚟解釋促發效應[e 3]等嘅多種認知現象[12]:認知心理學家作出噉嘅想像;想像喺是但一個時間點,人腦嘅語義網絡每個節點都有個值代表佢嘅啟動程度,一個節點啟動就會引起擴散啟動[e 4]-
- 引致佢掕住嗰啲節點跟住啟動;
- 同佢連繫愈強嘅節點就會掕住啟動得愈勁;
-用日常用語講,人一講起一樣嘢嗰陣,就傾向會諗起啲同嗰樣嘢相關嘅嘢。實驗仲試過噉做:實驗者叫人類受試者喺聽到個狼字嗰陣有咁快得咁快撳一個掣,而喺聽狼打前聽到例如個狗字嘅受試者對狼嘅反應會變快,彷彿好似人腦入面狗嘅節點一啟動,狼(一個同狗關係緊密嘅概念)嘅節點就會跟住一齊啟動,令到個腦能夠更快噉作出對狼節點要有嘅反應,促發效應就係泛指好似上述嘅過程噉「見到一款刺激會令個人對另一款刺激嘅反應有所變化」嘅現象[13][14]。基於呢樣發現,有唔少 AI 研究者都主張用語義網絡教電腦做推理,覺得呢種做法能夠達致更加似人嘅人造智能[15]。
製作
編輯編寫網絡
編輯要建立語義網絡,最簡單直接嘅方法係用邏輯編程語言寫:邏輯編程語言係程式語言嘅一種,建基於形式邏輯[16];例如 Prolog 就係一隻廿一世紀初常用嘅邏輯編程語言,成日俾人攞嚟整語義網絡;呢隻語言做法係喺個程式開頭講低拃事實,包含一拃概念同啲概念之間嘅關係;呢啲事實會組成個系統嘅知識庫,而知識庫整好咗,用家就有得向佢提問,每吓提問有句嘢做 input
,部電腦曉按照拃碼嚟判斷嗰句嘢係咪「合符知識庫入面其中一句嘢」 OR
「可以由知識庫度推理出嚟」,如果係嘅話就俾正確做 output
,否則就俾錯誤做 output
[17][18]。
Prolog 碼表達起事實上嚟嘅基本格式係 relation(entity1, entity2, ....k'th entity).
(當中 relation
係關係,entityn
係第 n
嚿物件)。例如好似以下噉嘅簡單 Prolog 碼噉(每行 %
後面嘅係注釋,解釋嗰行碼係做乜嘅)[18]:
friends(simon, alan). % simon 同 alan 呢兩嚿物件之間係 friend(朋友)嘅關係。
singer(helena). % helena 係 singer(歌手)。
odd_number(5). % 5 係 odd_number(單數)。
用 Prolog 寫咗上面段碼之後,部電腦就知咗「simon
同 alan
係朋友」等嘅三件事實(組成咗知識庫);有咗個知識庫,用家就可以作出提問(Query
= 提問):
Query 1 : ?- singer(helena). % 呢句嘢喺 Prolog 入面意思係「helena 係咪 singer?」噉解。
Output : Yes.
-因為段碼組成嘅知識庫入面有句嘢同 Query
吻合,所以部電腦就俾出正確做 output
。又睇吓:
Query 2 : ?- odd_number(7). % 呢句嘢喺 Prolog 入面意思係「7 係咪 odd_number?」噉解。
Output : No.
-喺現實,7 的確係個單數,但因為知識庫入面冇講明 odd_number(7).
(Prolog 碼 7 係 odd_number 噉解);部電腦搵唔到任何同 odd_number(7).
吻合嘅事實,於是就俾咗錯誤做 output
。除咗 Prolog 之外,Lisp 亦都成日俾人攞嚟整語義網絡,例如以下呢段 Lisp 碼,表明咗金絲雀(canary
)同企鵝(penguin
)係一種(is-a
)雀鳥(bird
):
(setq *database*
'((canary (is-a bird)
(color yellow)
(size small))
(penguin (is-a bird)
(movement swim))
(bird (is-a vertebrate)
(has-part wings)
(reproduction egg-laying))))
有咗好似 Prolog 同 Lisp 噉嘅程式語言,就可以教電腦表達一拃概念同埋啲概念之間嘅關係,設計者可以攞住呢啲語言人手噉整語義網絡[18][19]。
WordNet
編輯喺廿一世紀初,唔少認知科學同資訊科技領域嘅工作者都有興趣整語義網絡,當中最出名嘅要數 WordNet:WordNet 係一個建基於英文嘅數據庫,收錄嗮英文入面有嘅字,並且按啲字嘅意思將啲字分做一組組(每組係一組同義環[e 5]),仲會講明每對同義環之間係咩語義關係,例如[20]-
- 部位詞[e 6]同群體詞[e 7]:如果話 A 係 B 嘅部位詞,係指 A 係 B 嘅一部份,而 B 就係 A 嘅群體詞,例如手指係手掌嘅部位詞,同時手掌係手指嘅群體詞;又或者指甲係手指嘅部位詞,同時手指係指甲嘅群體詞;
- 上位詞[e 8]同下位詞[e 9]:如果話 A 係 B 嘅上位詞,係指 B 係 A 嘅一種,而 B 就係 A 嘅下位詞,例如顏色係紅色嘅上位詞,同時紅色係顏色嘅下位詞;又或者昆蟲係蝴蝶同蜜蜂嘅上位詞,同時蝴蝶同蜜蜂係昆蟲嘅下位詞[21];
- 同義詞[e 10]:如果話 A 同 B 係同義詞,即係指兩隻字意思一樣;喺廿一世紀初嘅語言學上,同義詞呢個概念有些少爭議性-因為語言演變等嘅現象,好難話兩隻字意思會完全一樣,所以好似 Wordnet 噉嘅語義網絡好多時淨係會話「A 同 B 意思上好相似,大致上係同義詞」,而唔會真係話兩隻字係同義詞;
- 反義詞[22]:
- 方式詞[e 13]:淨係適用於動詞,如果話 A 係 B 嘅方式詞,意思係話 A 表示做 B 嘅其中一種方式,例如狼吞虎咽係食嘢嘅一個方式詞[23];
... 呀噉。Wordnet 基本上就係個語義網絡-Wordnet 啲資料可以人手摷嚟睇,但特登整到可以由電腦自動化噉查閱嘅[註 2]-一個設計者可以輕易寫個曉自己開網頁嚟睇嘅程式(可以睇吓網頁刮料等嘅技術),個程式一喺 Wordnet 攞隻字睇,即刻可以知邊隻字同呢隻字有關同埋「成咩關係」,跟手再自動噉畫幅語義網絡圖出嚟[24]。
應用
編輯語義網絡有唔少用途,尤其係喺自然語言處理(NLP;教 AI 處理自然語言嘅技術)等嘅 AI 工作上零舍有用[25]:
- 知識表示(KR):KR 涉及教電腦做出好似「有知識」噉嘅行為,係 AI 嘅重要一環[26];語義網絡可以攞嚟教 AI 做判斷,而且個 AI 淨係需要簡單噉摷個語義網絡搵想要嘅資訊;舉個簡單例子,想像而家有人問條問題「貓有冇脊椎?」(一條知識性質嘅問題),部電腦內部有個語義網絡,攞貓個節點,然後摷 → 所有嘅貓都係哺乳類 → 哺乳類冚唪唥都係脊椎動物 → 脊椎動物冚唪唥都有脊椎 → 貓有脊椎,最後俾出有做答案-部電腦展現出好似有知識噉嘅行為[27]。
- 詞義消歧[e 14]:自然語言啲字入面有陣時會有歧義嘅問題,即係一隻字有多個可能意思,而 WSD 就係指教電腦撞到歧義情況嗰陣,同每隻有歧義嘅字搵出佢嘅意思;例如係以下嘅思路噉[28]-
- 想像語義距離嘅概念,最基本上係指兩隻字之間喺表示嘅意思上爭幾遠;例如用簡化嘅例子講,狼同狗呢兩隻字嘅語義距離就好接近(兩隻字都係分別表示緊一種動物,而且兩隻字表示嘅動物好相似),而狼同雲呢兩隻字嘅語義距離就相對遠(兩隻字表示嘅事物冇乜啦掕);語義距離有好多方法計,最簡單嘅方法係計吓「兩隻字喺個語義網絡[註 3]入面最短要通過幾多條邊,先可以將佢哋連埋一齊」-要過嘅邊數量愈少,兩隻字嘅語義距離就算愈短[29],進階啲嘅做法仲會將啲字按上位詞同下位詞嘅關係畫做分幾層嘅網絡,並且將「個意思喺個網絡邊層」等嘅因素納入埋考慮範圍之內[30];
- 攞有歧義嗰隻字嚟睇,同每個可能意思,計吓嗰個可能意思同周圍啲字(睇埋語境)之間嘅語義距離有幾遠;
- 揀同周圍啲字語義距離最短嗰個意思。
- 抄襲檢測[e 15]:抄襲檢測係攞一份文件做 input,output 俾出「呢份文件有冇抄襲嘅成份」;最基本上,抄襲檢測做嘅嘢係攞住份文件,同每份嗰份文件有可能抄嘅文件,計吓份文件同 input 嗰份有幾相似,而如果相似度(
similarity score
)有返咁上下高,就有可能係抄襲,相似度可以用好多方法計[31]-
... 呀噉。
睇埋
編輯文獻
編輯英文文獻:
- Allen, J. and A. Frisch (1982). "What's in a Semantic Network". In: Proceedings of the 20th. annual meeting of ACL, Toronto, pp. 19-27.
- Berger, H., Dittenbach, M., & Merkl, D. (2003, September). Activation on the move: Querying tourism information via spreading activation. In International Conference on Database and Expert Systems Applications (pp. 474-483). Springer, Berlin, Heidelberg.
- Rajangam, E., & Annamalai, C. (2016). Graph models for knowledge representation and reasoning for contemporary and emerging needs - a survey (PDF). International Journal of Information Technology and Computer Science (IJITCS), 8(2), 14-22.
- John F. Sowa, Alexander Borgida (1991). Principles of Semantic Networks: Explorations in the Representation of Knowledge.
- Vales, C., & Fisher, A. V. (2019). When Stronger Knowledge Slows You Down: Semantic Relatedness Predicts Children's Co‐Activation of Related Items in a Visual Search Paradigm (PDF). Cognitive Science, 43(6), e12746.
引咗
編輯註釋:
- ↑ John F. Sowa (1987). "Semantic Networks". In Stuart C Shapiro (ed.). Encyclopedia of Artificial Intelligence. Retrieved 29 April 2008.
- ↑ Friedenberg, J., & Silverman, G. (2011). Cognitive science: An introduction to the study of mind. Sage. Ch. 8.
- ↑ Quillian, M. R. (1968). Semantic memory. Semantic information processing, 227-270.
- ↑ Lehmann, Fritz; Rodin, Ervin Y., eds. (1992). Semantic networks in artificial intelligence. International series in modern applied mathematics and computer science. Vol. 24. Oxford; New York: Pergamon Press. p. 6. "The first semantic network for computers was Nude, created by R. H. Richens of the Cambridge Language Research Unit in 1956 as an interlingua for machine translation of natural languages."
- ↑ Allan M. Collins; Elizabeth F. Loftus (1975). "A spreading-activation theory of semantic processing". Psychological Review. 82 (6): 407-428.
- ↑ Sussna, Michael. "Word sense disambiguation for free-text indexing using a massive semantic network 互聯網檔案館嘅歸檔,歸檔日期2021年9月21號,. (PDF)." Proceedings of the second international conference on Information and knowledge management. ACM, (1993).
- ↑ Berger, H., Dittenbach, M., & Merkl, D. (2003, September). Activation on the move: Querying tourism information via spreading activation. In International Conference on Database and Expert Systems Applications (pp. 474-483). Springer, Berlin, Heidelberg.
- ↑ Rajangam, E., & Annamalai, C. (2016). Graph models for knowledge representation and reasoning for contemporary and emerging needs - a survey (PDF). International Journal of Information Technology and Computer Science (IJITCS), 8(2), 14-22.
- ↑ COMPUTATIONAL LEARNING THEORY.
- ↑ Segev, Elad (2021). Semantic Network Analysis in Social Sciences. London: Routledge.
- ↑ Quillian, M. R. (1969). "The teachable language comprehender: a simulation program and theory of language". Communications of the ACM. 12 (8): 459-476.
- ↑ Allan M. Collins; M. R. Quillian (1969). "Retrieval time from semantic memory". Journal of Verbal Learning and Verbal Behavior. 8 (2): 240-247.
- ↑ Arbib, M. A. (Ed.). (2002). Semantic networks. In The Handbook of Brain Theory and Neural Networks (2nd ed.). Cambridge, MA: MIT Press.
- ↑ Schacter, D. L., Dobbins, I. G., & Schnyer, D. M. (2004). Specificity of priming: A cognitive neuroscience perspective (PDF). Nature Reviews Neuroscience, 5(11), 853-862.
- ↑ Notes on Semantic Nets and Frames (PDF). Artificial Intelligence I.
- ↑ Baral, C.; Gelfond, M. (1994). "Logic programming and knowledge representation". The Journal of Logic Programming. 19-20: 73-148.
- ↑ Bratko, I. (2001). Prolog programming for artificial intelligence. Pearson education.
- ↑ 18.0 18.1 18.2 Prolog | An Introduction. GeeksForGeeks.
- ↑ Lloyd, J. W. (1984). Foundations of logic programming. Berlin: Springer-Verlag.
- ↑ Steyvers, M.; Tenenbaum, J.B. (2005). "The Large-Scale Structure of Semantic Networks: Statistical Analyses and a Model of Semantic Growth". Cognitive Science. 29 (1): 41-78.
- ↑ Brinton, Laurel J. (2000). The Structure of Modern English: A Linguistic Introduction (Illustrated ed.). John Benjamins Publishing Company. p. 112.
- ↑ Cruse, D. Alan. (1992). Antonymy revisited: Some thoughts on the relationship between words and concepts. In A. J. Lehrer & E. F. Kittay (Eds.), Frames, fields, and contrasts: New essays in semantic and lexical organization (pp. 289-306). Hillsdale, NJ: Lawrence Erlbaum Associates.
- ↑ Fellbaum, C; Miller, G (1990). "Folk psychology or semantic entailment? A reply to Rips and Conrad (1989)". Psychological Review. 97: 565-570.
- ↑ G. A. Miller, R. Beckwith, C. D. Fellbaum, D. Gross, K. Miller. (1990). WordNet: An online lexical database. Int. J. Lexicograph. 3, 4, pp. 235-244.
- ↑ Hulpuş, I., Prangnawarat, N., & Hayes, C. (2015, October). Path-based semantic relatedness on linked data and its use to word and entity disambiguation. In International Semantic Web Conference (pp. 442-457). Springer, Cham.
- ↑ Roger Schank; Robert Abelson (1977). Scripts, Plans, Goals, and Understanding: An Inquiry Into Human Knowledge Structures. Lawrence Erlbaum Associates, Inc.
- ↑ Semantic network (Frame network) in Knowledge Representation of Artificial Intelligence. Medium.
- ↑ Diamantini, C.; Mircoli, A.; Potena, D.; Storti, E. (2015-06-01). "Semantic disambiguation in a social information discovery system". 2015 International Conference on Collaboration Technologies and Systems (CTS): 326-333.
- ↑ Agirre, E., & Rigau, G. (1997). A proposal for word sense disambiguation using conceptual distance. AMSTERDAM STUDIES IN THE THEORY AND HISTORY OF LINGUISTIC SCIENCE SERIES 4, 161-172.
- ↑ Budanitsky, A., & Hirst, G. (2006). Evaluating wordnet-based measures of lexical semantic relatedness. Computational linguistics, 32(1), 13-47.
- ↑ Foltýnek, T., Meuschke, N., & Gipp, B. (2019). Academic plagiarism detection: a systematic literature review. ACM Computing Surveys (CSUR), 52(6), 1-42.
- ↑ Ceska, Z. (2008, August). Plagiarism detection based on singular value decomposition. In International Conference on Natural Language Processing (pp. 108-119). Springer, Berlin, Heidelberg.
- ↑ Deerwester, S., Dumais, S. T., Furnas, G. W., Landauer, T. K., & Harshman, R. (1990). Indexing by latent semantic analysis. Journal of the American society for information science, 41(6), 391-407.