Volume 5, 2001
Elements of Predicate Logic in the Georgian Language
G.Chankvetadze*
I.Vekua Institute of Applied Mathematics
Received May, 30, 2001 Revised November, 26, 2001
Abstract. The system provides the capacity to creaty a certain database, the structural elements of which are presented as the Prolog type list stucture, and introduce this structure as a natural sentence. It is also possible to ask and get an answer to particular questions from the system, as well as to answer the question put by the system itself. |
One of the goals of Artificial Intelligence is to construct a model of natural spoken language which creates possibilities for knowledge representation and knowledge use. The use of mathematical logic in theoretical programming is also of high importance. The Present article deals with the further extension of the previously discussed simple [1] sentence model by the elements of predicate logic [2, 3].
Let us have a look at the important definition of term is as follows:
Definition 1
Definition 2
If P is an n-placed predicate symbol and t1,t2,…,tn are terms, then P(t1,t2,…,tn) is an atom.
Then follows a definition of regularly built formula:
Definition 3
In our article "On one approach to knowledge Base representation" Georgian simple sentence is given by the list of objects: my_obj(Gr_Num,Mem_Num,Qu_Ref,Word_Ref). Her3e, this object perfectly fits the definition of term given in Definition 1. Thus, my_obj(Gr_Num,Mem_Num,Qu_Ref,Word_Ref) is a term. Let us consider a definition of a word group. Let us link all secondary parts of a sentence to each principal part of a sentence (also those linked to secondary parts) a word group. According to Definition 1 a word group is a term as well.
Therefore, we obtain a list of objects where each term receives its number according to the word groups and their order in those groups. Terms are given exactly by such lists in the base. The predicate trans(Obj_List,String) turns a list into a sentence. Here, Obj_List is a list of objects and String is a natural language sentence, which is turned by a predicate. Here we stay into the definition 2 of a term.
According to Definition 3 in point II we get
Those parts of sentences the index of which is indicated by Word_Ref are ordered separately according to their membership. For instance, noun, verb, etc – are ordered separately. At the some time each of them can be divided into different classes according to different classificators. For instance, it is possible to have a class of animals based on some features. Here, we could turn to point III of Definition 3 and accept the universal (
" ) and existential ($ ) quantifiers.The system poses a question to any part of the sentence. It can also answer the question of the user. It can confirm or negate the fact. But to the question, the answer of which is not in the base, the system gives the answer that there is no information on this fact.
The system has a list sorting predicate which is given as follows:
sort([],SRT,SRT):-!.
sort([H|T],CH,SRT):-chas(H,CH,CH1),
sort(T,CH1,SRT).
chas(H,[],[H]):-!.
chas(H[HH|T],[H,HH|T]):-H<=HH,!.
chas(H,[HH|T],[HH,T1]):-chas(H,T,T1).
Predicate call is done by sort(List_in,[],List_out), where List_in is an input list, while List_out is an output one – the sorted list. It calls the predicate chas(H,List_in,List_out), which adds the given object H to the list List_in in the appropriate place and turns the list List_out.
For answering questions there is the predicate other_list(List1,List2,List3) in the system. It checks whether List1 is a sub list of List2 and also it turns List3 which is a list of element of List2 different from those of List1. It is represented in the following way:
other_list([],L,L):-!.
other_list([H|T],List,L):-
member(H,List,[],List1),other_list(T,List1,L).
member(H,[H|T],TT,TTT):-conc(TT,T,TTT),!.
member(H,[H1|T],T1,List):-member(H,T,[H1|T1],List
conc([],L,L):-!.
conc([H|T],L,[H1|L1]):-conc(T,L,L1).
The predicate other_list(List1,List2,List3) calls the predicate member(H,List,[],List1). It checks whether H is a member of the list List and turns List1 without H. The predicate member(H,List,[],List1) in its turn calls conc(L1,L2,L3),with adds the list L1 to L2 and obtains the list L3.
References:
* The paper was presented at the minisimposium of Advance Courses in Informatics (see Bulletin TICMI, Vol. 4, 2000, p. 5)