whether Visual Prolog can do natural language processing?
If it is able to do such things,can you recommend some books,articles,tutorial,whatever,etc.Thank you very much.
I am a rookee coming here to learn from friends.
-
- Active Member
- Posts: 40
- Joined: 23 Sep 2002 23:01
Hi,
Natural language processing is a world of its own. There is a priori no reason to think that a computer language is better than another to do such a thing. But a main feature of that world is that it requires many original modelling tools. The advantadge of VIP is that it's very well adapted to that function. With practice, you can build a collection of tools whithout ever loosing sight of your goal because you need to focus on the language computer logic : with VIP, this one becomes almost transparent.
So I think it's good to bring in the idea natural language processing with VIP.
I also think that the best recommendation is to start practising directly VIP with simple language treatments.
Natural language processing is a world of its own. There is a priori no reason to think that a computer language is better than another to do such a thing. But a main feature of that world is that it requires many original modelling tools. The advantadge of VIP is that it's very well adapted to that function. With practice, you can build a collection of tools whithout ever loosing sight of your goal because you need to focus on the language computer logic : with VIP, this one becomes almost transparent.
So I think it's good to bring in the idea natural language processing with VIP.
I also think that the best recommendation is to start practising directly VIP with simple language treatments.
Regards
Dominique Pannier
Dominique Pannier
Re:
dominique f pannier wrote:Hi,
Natural language processing is a world of its own. There is a priori no reason to think that a computer language is better than another to do such a thing. But a main feature of that world is that it requires many original modelling tools. The advantadge of VIP is that it's very well adapted to that function. With practice, you can build a collection of tools whithout ever loosing sight of your goal because you need to focus on the language computer logic : with VIP, this one becomes almost transparent.
So I think it's good to bring in the idea natural language processing with VIP.
I also think that the best recommendation is to start practising directly VIP with simple language treatments.
Thank you very much.But maybe I have not express myself clearly.Let me show an example.In swi-prolog,There is such a function:
?- L=[write,'Hello World'],G=..L,call(G).
Hello World
L = [write, 'Hello World'],
G = write('Hello World').
whether visual prolog has similar built-in predicates with "=.." and "call".
Thank you.
I am a rookee coming here to learn from friends.
- Thomas Linder Puls
- VIP Member
- Posts: 1424
- Joined: 28 Feb 2000 0:01
Visual Prolog does not have facilities for making calls in that way, you will have to create an interpreting predicate yourself:
Code: Select all
class predicates
interpret : (string List).
clauses
interpret(["forward", LenStr, Unit]) :-
Len = tryToTerm(integer, LenStr),
!,
forward(Len Unit).
...
interpret([F|Args]) :-
stdio::writef("Could not interpret %(%)\n", F, string::concatWithDelimiter(Args, ", ")).
interpret([]) :-
stdio::write("Nothing to interpret\n").
Regards Thomas Linder Puls
PDC
PDC
-
- Active Member
- Posts: 40
- Joined: 23 Sep 2002 23:01
Well, I see that what you mean by "natural language processing" is at a starting level.
I think then you should deal with the problem with some method :
1) you can get answers to such questions in the book Visual Prolog for Tyros which will gradualy show you how VIP works.
1) you should later run and analyse Visual Prolog Examples which provides you different tools that you can test with your own data.
The code you have to write to answer at your first question is the following one :
that you put at the suggested place in the main.pro class of a console project like below :I let you study how to answer at the second one.
I think then you should deal with the problem with some method :
1) you can get answers to such questions in the book Visual Prolog for Tyros which will gradualy show you how VIP works.
1) you should later run and analyse Visual Prolog Examples which provides you different tools that you can test with your own data.
The code you have to write to answer at your first question is the following one :
Code: Select all
stdio::write("Hello World", "\n").
Code: Select all
implement main
open core
clauses
run() :-
stdio::write("Hello World", "\n"). % place your own code here
end implement main
goal
console::runUtf8(main::run).
Regards
Dominique Pannier
Dominique Pannier
Re:
Thomas Linder Puls wrote:Visual Prolog does not have facilities for making calls in that way, you will have to create an interpreting predicate yourself:
Code: Select all
class predicates interpret : (string List). clauses interpret(["forward", LenStr, Unit]) :- Len = tryToTerm(integer, LenStr), !, forward(Len Unit). ... interpret([F|Args]) :- stdio::writef("Could not interpret %(%)\n", F, string::concatWithDelimiter(Args, ", ")). interpret([]) :- stdio::write("Nothing to interpret\n").
Wow:lol: .Thank you Thomas.It's so great an idea.You are so talent.
I am a rookee coming here to learn from friends.
Re:
dominique f pannier wrote:Well, I see that what you mean by "natural language processing" is at a starting level.
I think then you should deal with the problem with some method :
1) you can get answers to such questions in the book Visual Prolog for Tyros which will gradualy show you how VIP works.
1) you should later run and analyse Visual Prolog Examples which provides you different tools that you can test with your own data.
The code you have to write to answer at your first question is the following one :that you put at the suggested place in the main.pro class of a console project like below :Code: Select all
stdio::write("Hello World", "\n").I let you study how to answer at the second one.Code: Select all
implement main open core clauses run() :- stdio::write("Hello World", "\n"). % place your own code here end implement main goal console::runUtf8(main::run).
Thank you dear.Thanks for your instruction.I will do that.
I am a rookee coming here to learn from friends.
Re:
Thomas Linder Puls wrote:Visual Prolog does not have facilities for making calls in that way, you will have to create an interpreting predicate yourself:
Code: Select all
class predicates interpret : (string List). clauses interpret(["forward", LenStr, Unit]) :- Len = tryToTerm(integer, LenStr), !, forward(Len Unit). ... interpret([F|Args]) :- stdio::writef("Could not interpret %(%)\n", F, string::concatWithDelimiter(Args, ", ")). interpret([]) :- stdio::write("Nothing to interpret\n").
Dear Thomas Merry Cristmas.
Now I'm faced with another problem. need for your help again.
I want to define a new domain.
Here,for "integer" I can define a new domain like "lightWeight = integer[0..50]"
But for "real",if I imitate to define "lightWeight = real[0..50]" ,it will be an error.How should I do it
And for "string",if I want to define a new domain,which only has three elements such as"a,b,c",how should I do it
I am a rookee coming here to learn from friends.
- Thomas Linder Puls
- VIP Member
- Posts: 1424
- Joined: 28 Feb 2000 0:01
For a real domain you will have to include "digits" in the definition like this:
(16 is actually the only sensible choice).
You cannot define a sub-set of string like you propose, but you can define a functor domain with a fixed set of functors/enumerators:
That domain only have the three possible values a, b and c, but they are not like strings enclosed in quotes.
Code: Select all
domains
limited = [0..50] digits 16.
You cannot define a sub-set of string like you propose, but you can define a functor domain with a fixed set of functors/enumerators:
Code: Select all
domains
fixed = a; b; c.
Regards Thomas Linder Puls
PDC
PDC
Re:
Thank you verry much.You have given me so much help.Someday you come to China,I invite you for dinnerThomas Linder Puls wrote:For a real domain you will have to include "digits" in the definition like this:
(16 is actually the only sensible choice).Code: Select all
domains limited = [0..50] digits 16.
You cannot define a sub-set of string like you propose, but you can define a functor domain with a fixed set of functors/enumerators:
That domain only have the three possible values a, b and c, but they are not like strings enclosed in quotes.Code: Select all
domains fixed = a; b; c.
I am a rookee coming here to learn from friends.