1. The document introduces an English word similarity calculation method based on WordNet. It extracts synonyms from WordNet and uses a vector-based approach to calculate word similarity.
2. The vector includes three types of information from WordNet: synonyms, word classes, and sense explanations.
3. Experiments show this is a feasible way to quantitatively study the semantic relationships between English words and provide methods and insights for information processing and machine translation.
2024: Domino Containers - The Next Step. News from the Domino Container commu...
基于WordNet的英语词语相似度计算
1. 基于 WordNet 的英语词语相似度计算
颜伟 荀恩东
北京语言大学 语言信息处理研究所 北京 100083
E-mail: {yanwei,edxun}@blcu.edu.cn
摘要:本文主要介绍一种基于 WordNet 的英语词语相似度的实现方法,我们从 WordNet
中提取同义词并采取向量空间方法计算英语词语的相似度,我们的向量包括三方面:
。
(1)WordNet 的同义词词集(Synset)(2) 类属信息(Class) (3)意义解释(Sense explanation)
实验结果表明这是计算英语词语相似度的一种可行的方法。
关键词:WordNet,词语相似度
English Word Similarity Calculation Based
on WordNet
Yan Wei Xun Endong
Language Information Processing Center
Beijing Language and Culture University Beijing 100083
E-main: {yanwei,edxun}@blcu.edu.cn
Abstract: In our approach, English WordNet is used as the general synonym resource. The algorithm
extracts synonym and use vector based method to calculate the English word similarity. The vector
includes three kinds of information.(1)WordNet synonym. (2) Class. (3)Sense explanation. It is a
feasible way to calculate the similarity of the English words in the experiments.
Keywords: WordNet, word similarity
1 引言
随着自然语言处理技术的发展,语义研究,特别是词汇语义研究,成为目前自然语言
处理领域的热点和前沿课题。本文介绍一种基于 WordNet 英语词语相似度计算的实现方
法,希望能对英语词语间语义关系进行一些数量化研究。同时也希望能对中文信息处理及
双语翻译提供一些方法和借鉴。
词语距离的计算方法大体上可以分成两类:一类是根据某种世界知识(ontology)来
计算,主要是基于按照概念间结构层次关系组织的语义词典的方法,根据在这类语言学资
源中概念之间的上下位关系和同位关系来计算词语的相似度。在这方面,许多学者已经基
于 WordNet 做了大量的工作。另一类方法利用大规模的语料进行统计,这种基于统计的方
法,主要将上下文信息的概率分布作为词汇语义相似度的参照。第一类方法建立在两个词
汇具有一定的语义相关性当且仅当它们在概念间的结构层次网络图中存在一条通路这样
4. 3.2.1:特征提取
我们利用 WordNet 提供的接口函数,从 WordNet 的同义词词集(Synset)
、属类词(Class
word)和意义解释(Sense explanation)这三个集合中抽取出候选同义词,然后进行特征提取,
计算出 feature (SW ) :
feature ( SW ) = {{Ws}, {Wc}, {We}}
{Ws} : WordNet 中 Sense W 所有的同义词;
{Wc} : Sense W 所有的相关的属类;
{We} : Sense W 的解释中所有的实词。
3.2.2:意义相似度和词语相似度的计算
根据上面对词汇语义特征的描述,两个意义(Sense)之间的相似度可以通过计算其在三
个不同的意义特征空间中的距离来得到。距离越小,相似度越大。依据意义相似度我们就可
以容易地计算出 WordNet 中两个词语之间的相似度。
• 意义相似度
∑ {Wsj} ×IDF (wi ) 2 + w ∈{Wci}∩{Kc}× IDF (wi ) 2 + w ∈{Wei}∩{Ke}× IDF (wi ) 2
∑ Wcj ∑ Wej
Ks
1 wi ∈{Wsi}∩
Similarity( SWi , SW j ) = × i i
∑ K × IDF ( wi ) 2 × ∑ K × IDF ( w j ) 2
No( SWi) × No( SWj )
i∈QU , K ∈{ Ks , Kc , Ke ) j∈Qv , K ∈{ Ks , Kc , Ke )
其中:
No(SW): W 意义的顺序。例如,the first sense =1, the second sense =2……
IDF( wi ): 从 WordNet 中训练得到的构建 WordNet 时出现某个 wi 的文档的倒数
Ks=1.5: 同义词特征的权重,
Kc=1: 类属特征的权重,
Ke=0.5:意义解释的权重,
:出现 wi 的指标集,
QU
:出现 w j 的指标集
Qv
• 词语相似度
∑ ∑
max ( Similarity ( SW 1i , SW 2 j ) + max ( Similarity ( SW 2i , SW 1 j )
j∈{1,..,| SW 2|} j∈{1,..,| SW 1|}
i∈{1,..,| SW 1|} i∈{1,..,| SW 2|}
Similarity (W1 , W2 ) =
| SW 1 | + | SW 2 |
其中:
|SW1|:W1 的 sense 的个数,
|SW2|:W2 的 sense 的个数。
5. 4 实验结果及分析
我们对实验结果进行了人工的评价,评价方法主要是对计算得到的语义相似度的序列和
人工的排列结果进行比较,结果表明前述方法的计算结果和人工按照语义相似度的排序结果
基本一致。在后续的工作中我们打算把相似度检索结果作为信息检索系统的一个部分,具体
考察词语相似度计算对我们工作的贡献。
语义相似度计算,其单个词与中心词语义相似度的具体取值并不重要,那只是统计意义
上的一个数值,重要的是这些词汇相对于中心词可以依照语义相似度的取值相互比较,并形
成语义相似度由高到低的序列。我们的工作目标是研制一个实用的信息检索系统,语义相似
度对于提高信息检索的精确度和召回率都有重要的实用价值。
比如,用户想检索含有“sanctity”的相关文章,但我们的文档中没有这个词,我们就
可以依据相似度计算(见表 1)结果,在相似词序列中按相似度从高到低的顺序检索出相关文
档返回给用户。
表 1:sanctity 相似词语序列(部分)
中心词 相似词 相似度 sanctity simpleness 0.149
sanctity holiness 1.000 sanctity wholesomeness 0.148
sanctity sacredness 0.230 sanctity unlawfulness 0.148
sanctity expressiveness 0.199 sanctity incredibility 0.148
sanctity insolubility 0.199 sanctity incredibleness 0.148
sanctity counter factuality 0.194 sanctity worldliness 0.146
sanctity constructiveness 0.189 sanctity factuality 0.141
sanctity unpopularity 0.185 sanctity factualness 0.141
sanctity unholiness 0.169 sanctity popularity 0.140
sanctity humanness 0.161 sanctity lawfulness 0.139
sanctity parental quality 0.161 sanctity unsatisfactoriness 0.139
sanctity particularity 0.161 sanctity finitude 0.136
sanctity inaccuracy 0.158 sanctity boundedness 0.136
sanctity ethnicity 0.155 sanctity finiteness 0.136
sanctity measurability 0.154 sanctity satisfactoriness 0.135
sanctity quantifiability 0.154 sanctity ordinariness 0.126
sanctity destructiveness 0.151 sanctity negativism 0.121
…… ………… ……
sanctity nativeness 0.150
我们的方法提供了一个针对某一个中心词的按照相似度从高到低排列的词语的序列, ,
同时我们可以区分出同一个词不同的词性的相似词语的序列。 这一点在英语信息检索中很有
价值。用户的 query 如果是一句话,那么我们就可以根据词语的不同词性进行检索或进行问
题扩展。比如,在 WordNet 中“doctor”有名词和动词两种词性,我们就可以依据不同的词
性来选择合适的相似词语序列进行检索或问题扩展。
名词“doctor” :
1. doctor, doc, physician, MD, Dr., medico -- (a licensed medical practitioner; quot;I felt so bad I
went to see my doctorquot;)
2. Doctor of the Church, Doctor -- ((Roman Catholic Church) a title conferred on 33 saints
who distinguished themselves through the othodoxy of their theological teaching; quot;the Doctors of
6. the Church greatly influenced Christian thought down to the late Middle Agesquot;)
3. doctor -- (children take the roles of doctor or patient or nurse and pretend they are at the
doctor's office; quot;the children explored each other's bodies by playing the game of doctorquot;)
4. doctor, Dr. -- (a person who holds Ph.D. degree from an academic institution; quot;she is a
doctor of philosophy in physicsquot;)
表 2:doctor(名词)相似词语序列(部分)
中心词 相似词 相似度 模式
doctor doc 0.400 <N N>
doctor physician 0.400 <N N>
doctor medical practitioner 0.270 <N N>
doctor medical man 0.270 <N N>
doctor Doctor 0.250 <N N>
doctor health professional 0.223 <N N>
doctor health care provider 0.223 <N N>
doctor medical specialist 0.209 <N N>
doctor caregiver 0.186 <N N>
doctor professional person 0.150 <N N>
doctor professional 0.107 <N N>
doctor grownup 0.099 <N N>
doctor adult 0.083 <N N>
doctor sawbones 0.081 <N N>
doctor operating surgeon 0.081 <N N>
doctor surgeon 0.081 <N N>
doctor psychoanalyst 0.077 <N N>
doctor alienist 0.077 <N N>
doctor horse doctor 0.076 <N N>
doctor pathologist 0.075 <N N>
doctor diagnostician 0.075 <N N>
doctor brain doctor 0.074 <N N>
doctor neurologist 0.074 <N N>
…… ………… …… ……
(其中“模式”表示的是中心词和相似词的词性)
动词“doctor” :
1:sophisticate, doctor, doctor up -- (alter and make impure, as with the intention to deceive;
quot;Sophisticate rose water with geraniolquot;) => adulterate, stretch, dilute, debase -- (corrupt, debase,
or make impure by adding a foreign or inferior substance; often by replacing valuable ingredients
with inferior ones; quot;adulterate liquorquot;)
2:doctor -- (give medical treatment to)=> treat, care for -- (provide treatment for; quot;The
doctor treated my broken legquot;; quot;The nurses cared for the bomb victimsquot;; quot;The patient must be
treated right away or she will diequot;; quot;Treat the infection with antibioticsquot;)
3: repair, mend, fix, bushel, doctor, furbish up, restore, touch on -- (restore by replacing a part
or putting together what is torn or broken; quot;She repaired her TV setquot;; quot;Repair my shoes pleasequot;)=>
better, improve, amend, ameliorate, meliorate -- (to make better; quot;The editor improved the
7. manuscript with his changesquot;
表 3:doctor(动词)相似词语序列(部分)
中心词 相似词 相似度 模式
doctor doctor up 0.500 <V V>
doctor adulterate 0.400 <V V>
doctor Doctor 0.333 <V V>
doctor adulterate 0.065 <V A>
doctor sophisticate 0.047 <V V>
doctor furbish up 0.040 <V V>
doctor bushel 0.040 <V V>
doctor repair 0.040 <V V>
doctor sophisticate 0.040 <V N>
doctor mend 0.032 <V V>
doctor Dr. 0.032 <V N>
doctor darn 0.031 <V V>
doctor trouble-shoot 0.031 <V V>
doctor sole 0.028 <V V>
doctor reheel 0.028 <V V>
doctor repoint 0.028 <V V>
doctor resole 0.028 <V V>
doctor revamp 0.027 <V V>
doctor patch up 0.023 <V V>
doctor restore 0.017 <V V>
doctor fix 0.012 <V V>
…… ………… …… ……
(其中“模式”表示的是中心词和相似词的词性)
5 结论
对于自然语言处理,语义分析面临的首要任务就是词汇间语义关系的数量化,即选择合
适的方法和模型来描述语义关系。作为一个初步的研究,将词汇间的种种关系,映射为一个
表示词语相似程度的数值,并以这一数值来产生词语相似性的排列序列,以简化词汇语义间
复杂的难以把握的语义关系,是研究语义关系的一个切入点。作为汉语信息处理研究,我们
可以从英语自然语言处理中借鉴许多有益的方法和手段。汉语语义分析,归根结底依赖于一
个大型词汇概念网络的建立,依赖于语言知识的注入。在目前汉语语义分析领域,我们还没
有这样一个词汇概念网络。同时,我们在进行这样一个词汇概念网络的设计时应该考虑到应
用领域、处理的颗粒度等许多实际的问题,这样我们的设计结果和人力物力的投入才会是有
意义的。
参 考 文 献
[1] George A. Miller, Richard Beckwith, Christiane Fellbaum, Derek Gross, and Katherine Miller. Introduction to
WordNet: An On-line Lexical Database[EB], Cognitive Science Laboratory Princeton University, 1993, 8.
[2] Rada R. etc Development and application of a metric on semantic nets. IEEE Transactions on System, Man and
8. Cybernetics, 1989
[3] Lee J.H. etc Information Retrieval based on conceptual distance in ISA hierarchies’, Journal of
Documentation,1993(49)
[4] Agirre E. and Rigau G. (1995), A proposal for word sense disambiguation using conceptual distance, in
International Conference quot;Recent Advances in Natural Language Processingquot; RANLP'95, Tzigov Chark,
Bulgaria,.
[5] P.Brown etc Word sense disambiguation using tactical methods. In Proceedings of 29th Meeting of the
Association for Computational Linguistics (ACL-91) ,1991
[6] Lillian Lee Similarity-Based Approaches to Natural Language Processing Ph.D. thesis. Harvard University
Technical Report TR-11-97.
[7] 于江生,俞士汶 中文概念词典的结构 中文信息学报 2002(4).
[8] 胡俊峰,俞士汶 唐宋诗中词汇语义相似度的统计分析及应用 中文信息学报 2002(4).
[9] 关毅,王晓龙 基于统计的汉语词汇间语义相似度计算 语言计算与基于内容的文本处理 清华大学出版
社 2003.8
[10] 刘群,李素建 基于《知网》的词汇语义相似度计算,第三届汉语词汇语义学研讨会,2002.5.