Galaxy Communicator Documentation:

MIT Galaxy Library: libGalaxyEnhancements

License / Documentation home / Help and feedback


This documentation briefly describes functions in the MIT dialogue control library.


Dialogue Functions

void Gal_InitializeDialogueDefaults(GAL_DIALOGUE_FUNCTION_MAP *function_map);
Initializes the default dialogue function map to function_map.

Gal_IntFnPtr Gal_GetDialogueFunction(char *fn_name)
Retrieves the dialogue function fn_name from the dialogue function map.

GAL_DIALOG_CONTROL *Gal_InstantiateSystem(char *dialogscriptfilename);
Instantiates the dialogue control and calls Gal_LoadDialogueControl.  If dialog_script_filename is not specified, it is assumed that the dialogue control script is ../System/server_name.dctl.  If unsuccessful, NULL is returned.

void Gal_FreeSystem(GAL_DIALOG_CONTROL *dc)
Frees dc.

Gal_Frame Gal_FillDialogueState(GAL_DIALOG_CONTROL *dc, int clear);
This function is called by turn_management.

int Gal_DialogueLoop(GAL_DIALOG_CONTROL *dc, Gal_Data data);
Executes the loaded dialogue control commands.  This function is called by turn_management.

void Gal_VarSetValue(Gal_Frame dialogue_state, char *key, char *value, int int_value);
If value is not NULL, this function sets the value of key to value, otherwise it sets it to int_value.

int Gal_VarUnsetValue(Gal_Frame dialogue_state, char *key);
Removes the object specified by key.

intGal_VarIsSet(Gal_Frame dialogue_state, char *key);
Returns 1 if key exists in the dialogue_state, 0 otherwise.

char *Gal_VarGetValue(Gal_Frame dialogue_state, char *key);
Returns the value of the object specified by key.

int Gal_VarMatchValue(Gal_Frame dialogue_state, char *key, char *match_value);
Returns 1 if the value of the object, specified by key, matches match_value.  Otherwise, returns 0.

void Gal_VarAugmentValue(Gal_Frame dialogue_state, char *key, char *value);
Appends value to the value of the object specified by key.  This applies only to string objects.

void Gal_Para2Fact(Gal_Frame dc, char *paraphrase);
This converts the key value paraphrase, paraphrase, into an eform frame structure.

Gal_Frame GalSS_DispatchQueryToIServer(GalSS_Environment *server_data, char *par_lang, Gal_Frame query_frame, Gal_Frame intermediate_reply)

Gal_Frame GalSS_RefillDialogueState(GAL_DOMAIN_SVR *dc, Gal_Frame request_frame, char *para_lang, int clear)

Gal_Object Gal_CreateConditionObject(Gal_TestClause *tests)

Gal_Object Gal_LookupConditionsKey(Gal_Frame conditions, char *key_name)

Domain Functions

Gal_Frame Gal_DeclareFilterList(char *Ftype, char *Fcategory, char *Fkey, Gal_Object *tarray, int n);
Converts the values of tarray into an filter list, where n is the number of objects in the list.  The clause frame that is returned contains the filter list, the filter type, Ftype, and the filter key, Fkey.  If Fcategory is "ignore", this function does nothing and returns NULL.

Gal_Frame Gal_FetchFilterList(Gal_Frame prev_state);
This function returns any prior filter list for n-best selection filtering on categories.

Gal_Frame Gal_FillParaphraseKeys(char *clause_name, Gal_Frame frame, char *domain, char *language);
This function fills the paraphrase keys of the frame, fr, with values specified by clause, domain, and language.

Gal_Frame Gal_GrovelForPredLike(Gal_Frame ref_frame, char *match_string, char *reject_string, int exact);
Looks in ref_frame and finds a match to match_string, rejecting if it contains reject_string, and requiring an exact match if exact is set.  Returns the matching predicate or NULL if no match is found.

Gal_Frame Gal_GrovelForPred(Gal_Frame ref_frame, char *pred_name);
Looks in ref_frame and finds an exact match to pred_name.  Returns the matching predicate or NULL if no match is found.

Gal_Frame Gal_GrovelForTopic(Gal_Frame ref_frame, char *topic_name);
Looks in ref_frame and finds an exact match to topic_name.  Returns the frame containing the matching topic or NULL if no match is found.

Gal_Frame Gal_IsNew(Gal_Frame frame, Gal_Frame thin_frame);
Looks in thin_frame for an existing topic or predicate whose name matches that of frame.  If a match is found, that topic or predicate frame is returned.  Otherwise, NULL is returned.

void Gal_AddComment(GAL_DOMAIN_SVR *dc, Gal_Frame clause);
Adds parenthetical user comments in the frame, clause, to the domain server.

void Gal_AddSystemInitiative(GAL_DOMAIN_SVR *dc, char *pred_name, Gal_Frame frame);
If frame is provided, this function copies frame to the system initiative under the name, pred_name.  If no frame exists, a predicate frame is created and added under the name, pred_name.

void Gal_FillResponse(GAL_DOMAIN_SVR *dc, Gal_Frame res);
Fills the domain server with values in the result frame, res.

void Gal_InitDService(Gal_Frame big_frame, GAL_DOMAIN_SVR *domain_svr);
Initializes the domain server with values in the big_frame: domain information, the operation name, the key_value paraphrasing, the parse_frame, and the request_frame.

void Gal_InitializeContents(Gal_Object *array, int nmax);
Initializes the contents of the object, array, where nmax is the size of the array.

Gal_Frame Gal_RepeatResponse(Gal_Frame prev_state)
Repeats the previous response, if the prev_state has one.


Control file tools

Gal_ConditionStruct **Gal_LoadDialogueControl(char *filename, int *num_conditions_ptr)
Loads dialogue control and validates the requested functions.  This function is called by Gal_InstantiateSystem.

void Gal_PrintDialogueControl(FILE *fp, Gal_ConditionStruct **conditions, int num_conditions)

License / Documentation home / Help and feedback
Last updated July 5, 2002