Natural Language Processing Techniques in Prolog

Natural Language Processing Techniques in Prolog

Post by a » Mon, 07 Jul 2008 03:56:58


This might be of interest to folks here:-
http://www.yqcomputer.com/ ~kris/nlp-with-prolog/html/

It describes Finite State Automata and parsers from first principles, and
includes implementations of them in prolog.
This is a problem domain ideally suited to experimenting in prolog.

The link contains good examples of prolog in use (implementing parsers)
(for minimally experienced prologgers like myself - and others might
find them useful too).

Col
 
 
 

1. A Compiler for Natural Language (transator that translates from natural language to C++)

2. DCG parsing - Natural Language in Prolog

Hi,

I am learning grammar and parsing. Here I can parse a very simple sentence
"John eats the cat". BUT HOW CAN I EXTEND IT TO PARSE A MORE COMPLICATED
SENTENCE LIKE " The wombat on Jane give him". The parts of speech to be
covered are: art noun prep pro proper v
("pro" signifies pronoun, "proper" signifies proper noun, "prep" signifies
preposition).
The grammar rules to be covered are:

a.. s -> np vp
b.. vp -> v np
c.. np -> proper
d.. np -> art cnp2
e.. cnp2 -> cnp
f.. cnp -> noun
(s=sentence,np=noun phrase,vp=verb phrase,proper=proper
noun,art=article,cnp=common noun phrase,v=verb)
Current simple parsing in prolog
% grammar rules: (the first four only yet)

s(P1,P3,s(NP,VP)) :- np(P1,P2,NP), vp(P2,P3,VP).
vp(P1,P3,vp(v(Verb),NP)) :- v(P1,P2,Verb), np(P2,P3,NP).
np(P1,P2,np(name(Name))) :- proper(P1,P2,Name).
np(P1,P3,np(art(Art),noun(Noun))) :- art(P1,P2,Art), noun(P2,P3,Noun).

% lexicon entries:

isname(john).
isverb(ate).
isart(the).
isnoun(cat).

% rules to do lexical analysis - that is to classify words according
% to their part of speech:

art(From, To, Word) :- word(Word, From, To), isart(Word).
noun(From, To, Word) :- word(Word, From, To), isnoun(Word).
v(From, To, Word) :- word(Word, From, To), isverb(Word).
proper(From, To, Word) :- word(Word, From, To), isname(Word).

% An example sentence to parse:

word(john, 1, 2).
word(ate, 2, 3).
word(the, 3, 4).
word(cat, 4, 5).

____________
Lexical entries for more complicated sentence
isart(the, the1).
isname(jane, "Jane").
isnoun(wombat, wombat1).
isprep(on, on_loc1).
ispro(him, he1).
isverb(give, give1).
Regards,Neil

3. ANN: Proxem Antelope, a Natural Language Processing framework for .NET

4. SNLP 2005: 6th Symposium on Natural Language Processing

5. Natural Language Date Processing.

6. (simple?) question about Natural Language Processing

7. Logic Problems, Thesis Reseach on Natural Language Processing of

8. Natural language processing in CLIME, a multilingual legal advisory system

9. Themed Track on Natural Language Processing and Understanding (NLP&U'08)

10. beginning a natural language processing

11. Any recommendation about open source project on Natural Language Processing or Information Extraction

12. procmail recipe for Natural Language Processing

13. SNLP 2005: 6th Synposium on Natural Language Processing

14. NLTK: Natural language processing in Python

15. Natural Language Processing .. an introduction