| 本帖最后由 老包 于 2010-6-10 21:34 编辑 
 7.3.4
 自然语言处理程序开发:谓词标界解析陈述句
 
 
 
 CKEFToRDF系列由我的学生高成勉开发,其功能为读入按一行一个陈述句排列的自然文本MKTEFs example.txt文件,阅读和发现谓词,最终以谓词为标界把陈述句解析为可操作性更强的“主体-谓词(或关系)-客体”知识三元体,最后以RDF(Resource Description Framework)的形式输出到MKTEFs example.rdf。 
    该程序系列包括如下类: 
 1.主类CKEFToRDF类调用下列辅类,最终生成输出文件。 
 2.CreateBPSRLib类:其stringArray()方法建立一个谓词数组,如"causes", "increases", "hardens", "affects","include","is-","is defined as","is greater than","is equal to or less than","is equal to or greater than",……. 
 3. ReadFileToStringArray类:其fileSplitByLine(fileName)方法阅读一行一个陈述句排列的自然文本MKTEFs example.txt文件,读入到字符串性对象数组strarr,并返回strarr。 
 4.ParseCKEF类:调用Search_CKEF_with_BPSR类对每句陈述进行解析。 
 5.Search_CKEF_with_BPSR类利用谓词数组把每个陈述分为头部,谓词和尾部三部分(如该陈述含有定义域,则分为四部分)。 
 处理对象文件MKTEFs example.txt的片段为: 
 the hardening of the arteries causes widening of the pulse pressure 
 Blood pressure of Pre-hypertension is- between 120/80 and 139/89 mmHg 
 The systolic blood pressure is defined as the maximum of blood pressure in the arteries. 
 ………… 
    输出结果文件MKTEFs example.rdf的片段为(与处理对象内容对应):  
 <rdf escription rdf:about="http://www.bmki.com#the hardening of the arteries"> 
 <bmki:causes rdf:resource="http://www.bmki.com#widening of the pulse pressure"/>
 
 </rdf
  escription>
 <rdf escription rdf:about="http://www.bmki.com#Blood pressure of Pre-hypertension"> 
 <bmki:is- rdf:resource="http://www.bmki.com#between 120/80 and 139/89 mmHg"/>
 
 </rdf:Description>
 
 <rdf:Description rdf:about="http://www.bmki.com#The systolic blood pressure"> 
 <bmki:is-defined-as rdf:resource="http://www.bmki.com#the maximum of blood pressure in the arteries."/>
 
 </rdf:Description>
 
 ………… 7.3.5
 谓词运算框架语境分析
 
 
 在上述信息三元体生成以后,接下来的需要探索的工作还很多。本节初步介绍关于所谓谓词运算框架(Computing Framework,CF)的思考。CF将进一步细化陈述句的语境,它的建立和开发无疑有助于机器对陈述句的语义理解,有助于格式化的数据处理和自然文本数据处理。以下对一些陈述句例子作一分析:
 
 谓词实例: The hardening of the arteries causes widening of the pulse pressure.
 命题格式: Subject (variable) causes object (variable)。
 运算框架: If A exists, then B exists。通俗地说,如果A存在,则B存在。
 
 谓词实例: (increase of the systolic ∧/∨ diastolic blood pressure) increases risk of (heart disease∨kidney disease∨hardening of the arteries∨eye disease∨stroke).
 命题格式: Subject (variable) increases object (variable)。
 运算框架:If A exists, then {(B is divided into BbeforeA and BafterA) and (BbeforeA > BafterA )}。通俗地说,如果A存在,则“A存在以前的B存在”大于“A存在以后的B存在”。
 |