-
Notifications
You must be signed in to change notification settings - Fork 0
A. Common Exceptions
Niu, Jingcheng edited this page Nov 19, 2022
·
3 revisions
! undef_type(xxx)
This is a sign that the type xxx is not defined in your grammar.
Check the spelling of your type feature structure.
{ALE: ERROR: lex: unsatisfiable lexical entry for i
This is an error caused by a lexical entry that is impossible to
satisfy. For example, the following definition of i will yield this
error as subjective cannot be a type of sem.
i ---> (np, sem:subjective, agr:(person:first, case:subjective)).
bot sub [cat, list].
cat sub [a,b,c] intro [list:list].
list sub [e_list, ne_list].
ne_list intro [hd:bot, tl:list].
a ---> a.
b ---> b.
append([],Xs,Xs) if true.
append([H|T1],L2,[H|T2]) if append(T1,L2,T2).
this_will_hang rule
(c, list:Result) ===>
cat> (a, list:List),
cat> (b, B),
goal> append(List, [B], Result).Appending to an uninitialized list will cause an infinite loop.
| ?- rec[a,b].
STRING:
0 a 1 b 2
^CProlog interruption (h for help)? a
You can interrupt the program by ctrl + c, then enter a to abort.
To solve the problem, you need to initialize the list somewhere, either in the lexical entry:
a ---> (a, list:[]).or in the rules.
cat> (a, list:(List, [])),a sub [b, c, f].
b intro [f:f].
c intro [f:f].TRALE does not allow duplicated feature names for types that do not inherent each other.
To solve this problem, either rename the features, or group the types into a supertype.
a sub [b_c, f].
b_c sub [b, c] intro [f: f].