/*********************************************************************************** * File: proproform.h * Created: 19 NO 2000 * Author: R. DeArmond based in input from Jeff Jenkins. * Modified xx yy 2000. * This file contains the proform struct and array declaration for the lexicon, and * the prototypes for all of the functions specific to adjectives, to be used with the * grammars one through eight. The functions are used to manipulate the dets in * an array of dets, which represents the det portion of a lexicon. * * The current implementation, using an array to store the lexical entries for each * type of word is adequate for now, but if the lexicon is to be allowed to grow to * any size, this will have to change. In that case, the lexicon will have to be * used in the file, and file access performed whenever the lexicon is to be used. * Currently, a maximum number of dets (MAX_PRONOUNS = 16) is imposed so that the * array can be declared. ***********************************************************************************/ #ifndef PRO_H #define PRO_H /*********************************************************************************** * internal defines ***********************************************************************************/ #define STRING_SIZE 16 #define MAXLINE 64 #define MAX_PRONOUNS 16 /*********************************************************************************** * internal data structures ***********************************************************************************/ /*********************************************************************************** * the pronoun suffix ***********************************************************************************/ struct psuffix_struct { int psuffix_cat; int psextra1; int psextra2; int psextra3; char psuffix_form[STRING_SIZE]; char psuffix_feat[STRING_SIZE]; char aextra_feat1[STRING_SIZE]; char aextra_feat2[STRING_SIZE]; char aextra_feat3[STRING_SIZE]; }; /*********************************************************************************** * the proform (pronoun) ***********************************************************************************/ /*********************************************************************************** * The prnoun struct must be defined so that file access can be performed when reading * and writing to the actual lexicon file. If the size of this struct were to change * after students have already started to create their lexicons (ie in later * versions of the grammars), their lexicons would be useless, since the new version * would be reading the wrong length struct. As a result, a few extra spaces are left * for additional features if they need to be added at a later date. If a new feature * is needed, the 'extra's in the struct only need to be renamed to that new * feature's name. lexicons created with older versions will still work, with the * new feature being blank. ***********************************************************************************/ struct pro_struct { int pro_cat; int proplural; int propersonal; int profirst; int proanimate; int profem; int prohuman; int prowh; int proloc; int protemp; int prowhy; int prohow; int prorel; int procase; int anaphor; int reflex; int proposs; int proposs_s; int prodef; int proextra1; int proextra2; int proextra3; int proextra4; int proextra5; int proextra6; int proextra7; int proextra8; char pro_cat_form[STRING_SIZE]; char proform[STRING_SIZE]; char proextra1a; char proextra2a; char proextra3a; char proextra4a; char proextra5a; char proextra6a; }; /*********************************************************************************** * an array of pro_struct. * at start-up, the proforms (pronouns et al) in the lexicon file are read into this array. All * manipulation of the lexicon is done through the arrays. At program close (and at * various times during execution) the arrays are written to the file. ***********************************************************************************/ extern struct pro_struct list_pros[MAX_PRONOUNS]; extern int pronouns; /*********************************************************************************** * external function prototypes ***********************************************************************************/ int find_pro_index(char *s); /*********************************************************************************** * input: a string, containing the proform itself to be searched for. * output: the index in pro_list of the proform passed in. If the proform is not found, * the output is -1 ***********************************************************************************/ void enter_pro(char *s); void sort_pros(void); void list_pros(); int delete_pro(void); void display_pro(); void new_pro(); void edit_pro(); void get_pro(struct pro_struct *p); void print_pro_features(struct pro_struct* p); #endif