ParsePF
Input

This section documents the format of the words supplied as input to ParsePF.


Input Words

The input to ParsePF is a list of words. Each word can have one of the two forms:

Form Examples Description
W john, 'John' W is a simple atom.
W$[..C..] katta$[eng(buy)], john$[add(index(I))] W is a simple atom. C is a constraint.

Words in general are not restricted to ASCII or printable ISO-8859-1 characters, provided they are quoted appropriately. For example:

lex('\304\342',neg,[polarity(-)]).
Constraints on input words of the latter form are described below.


Input Word Constraints

Here, "Input Form" refers to the form of the input as typed to an appropriate PAPPI window. The unrestricted forms are, of course, directly available from the Prolog interface.

Constraint Input Form Description
cat(C) Input word1-word2 => [word1,word2$[cat(mrkr)]] C a category label.
Note: this is currently inactive, see input_window.c:
  Word lookup will be restricted to category C only for W.
void
  BuildWord( head, mrkr, word )
QP_term_ref 	 head;
int		 mrkr;
char		*word;
{

  /*
  QP_term_ref 	 subhead;

  if( mrkr ) {
    subhead = QP_new_term_ref();
    QP_put_atom( subhead, QP_atom_from_string( word ));

    QP_cons_functor( head,
		     QP_atom_from_string( "$" ),
		     2,
		     subhead,
		     BuildCat( "mrkr" ));
  } else
  */

    QP_put_atom( head, QP_atom_from_string( word ));
}
word(X) None. (Currently inactive.) X is the 3rd argument of lexicon/4.
  Word lookup is performed against lexicon(W,C,X,Fs) instead of lexicon(W,C,Fs) for word W. Only the Kanda Japanese implementation currently makes use of lexicon/4 (for verb base forms only).
eng(W') Input word1$word2 => [word1$[eng(word2)]] W' is the English translation of W.
See F below on how it is checked.
add(index(I)) Input word[i] => [word$[add(index(I))]] Name of index i is converted to a Prolog variable I.
A special case of add(F) below.
add(noCoindex) Input word[] => [word$[add(noCoindex)]] The noCoindex feature is used during free indexation.
A special case of add(F) below.
  From the principles file:
generateIndex(NP,List,Cs) :-
	index(NP,_),
	(NP has_feature noCoindex  % non-participant in indexing
	-> List = []
	;  List = [NP] ),
	(NP has_feature neq(I,J)
	-> Cs = [(I,J)]
	;  Cs = []).
add(F) None. (Active only for add(index(_)/noCoindex).) Feature F is added to the lexical features retrieved for W.
F None. (Active only for eng(_).) Feature F is checked against the lexical entry for W.
Note that there is no general input form.
not(F) None. (Currently unused.) Feature F must not exist in the lexical entry for W.