⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 rule.pro

📁 经典的基于Context-Free_Grammer 的语法分析器。
💻 PRO
字号:
% Author: Ying Tao, Department of Biomedical Informatics, Columbia University
% Date: 12/7/2005

:-module(rule,['=>'/2]).
:-op(1000,xfy,'=>').  % define rewrite function '=>'

%grammar

%NP grammar
[proN(ProN)]=>[np([proN(ProN)])]. %proper noun
[noun(N)]=>[np([noun(N)])].
[adj(Adj),noun(Noun)]=>[np([[],head(noun(Noun)),modifier(adj(Adj))])].
[det(Det),adj(Adj),noun(Noun)]=>[np([det,head(noun(Noun)),modifier(adj(Adj))])].
[det(Det),noun(Noun)]=>[np([det,head(noun(Noun)),modifier([])])].
[det(Det),np(NP),noun(Noun)]=>[np([det,head(noun(Noun)),modifier(np(NP))])].
[np(NP),noun(Noun)]=>[np([[],head(noun(Noun)),modifier(np(NP))])].

%assertion
[np(Np1),verb(V),np(Np2)]=>[a([np(Np1),verb(V),np(Np2)])]. %basic assertion struction

[np(Np1),dc(_),verb(Verb),np(Np2)]=>[a([np(Np1),verb(Verb),np(Np2)])]. %modifying clause

%lexicon


[a]=>[det(a)].
[the]=>[det(the)].

[that]=>[dc(that)].
[which]=>[dc(which)].

['ASF/SF2']=>[noun('ASF/SF2')].
['protein']=>[noun('protein')].
[premRNA]=>[noun(premRNA)].
[splicing]=>[noun(splicing)].
['is']=>[verb('is')].
['well-studied']=>[adj('well-studyied')].
[plays, important, roles, in]=>[verb(participate)].
['SR']=>[noun('SR')].
[lung]=>[noun(lung)].
[cancer]=>[noun(cancer)].
[cell]=>[noun(cell)].
[small]=>[adj(small)].







⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -