Różnice

Różnice między wybraną wersją a wersją aktualną.

Odnośnik do tego porównania

pl:prolog:pllib:sentence [2019/06/27 15:50] (aktualna)
Linia 1: Linia 1:
 +====== Sentence ======
 +{{tag>​language}}
 +===== Description =====
 +Finding parts of speech in a sentence
 +
 +**Source**: ​ The Art of Prolog
 +===== Download =====
 +Program source code: {{sentence.pl}}
 +===== Listing =====
 +<code prolog>
 +/*
 + verb(Sentence,​Verb) :-
 + Verb is a verb in the list of words Sentence.
 +*/
 +
 + verb(Sentence,​Word) :- member(Word,​Sentence),​ verb(Word).
 + noun(Sentence,​Word) :- member(Word,​Sentence),​ noun(Word).
 + article(Sentence,​Word) :- member(Word,​Sentence),​ article(Word).
 +
 + /* Vocabulary */
 +
 + noun(man). noun(woman).
 + article(a). verb(loves).
 +
 +% Program 14.1: Finding parts of speech in a sentence
 +</​code>​
 +===== Comments =====
  
pl/prolog/pllib/sentence.txt · ostatnio zmienione: 2019/06/27 15:50 (edycja zewnętrzna)
www.chimeric.de Valid CSS Driven by DokuWiki do yourself a favour and use a real browser - get firefox!! Recent changes RSS feed Valid XHTML 1.0