Professional Documents
Culture Documents
1
at NLP
Phrase Structure Grammars
s
Phrase structure:
np
vp
String Y
String Z
Moldova
n1
has
rich
culture.
art
adj
n2
np1
np2
vp
/* Syntactic Rules: */
s--> np1,vp.
np1-->n1.
vp-->v,np2.
np2-->art,adj,n2.
/* Lexical Rules */
n1-->[moldova].
v-->[has].
art-->[a].
adj-->[rich].
n2-->[culture];[history].
GOAL:
?-phrase(s,[moldova,has,a,rich,culture]).
YES
?-phrase(vp,[has,a,rich,culture]).
YES.
?-phrase(s,[moldova,has,a,rich,X]).
X=culture;
X=history;
NO.
?-phrase(s,[moldova,has,a,culture]).
NO.
/* question1 */
/* answer1 */
/* question2 */
/* answer2 */
/* question3 */
/* answer3 */
/* question4 */
/* answer4 */
TASK FOR LABORATORY WORK NR.1: Do the analysis of 3 English sentences applying Definite
Clause Grammar rules in SWI-PROLOG.
Presentation: 1. at the lesson you get the task; 2. electronically in MSWord; 3. use SWI-Prolog to show
the results; 4. answer the teachers questions (e.g. Whats NLP?)
Variante:
Variantele se aleg conform numrului n catalog