- printf("Preserve: type1 = %u, id1 = %ld, type2 = %u id2 = %ld\n",
- preserve.type1, preserve.id1, preserve.type2, preserve.id2);
- printf("Command: type1 = %u, id1 = %ld, type2 = %u id2 = %ld\n",
- command.type1, command.id1, command.type2, command.id2);
+ /* Needs to stay synced with enum word_type_t */
+ const char *types[] = {"NO_WORD_TYPE", "MOTION", "OBJECT", "ACTION", "NUMERIC"};
+ /* needs to stay synced with enum speechpart */
+ const char *roles[] = {"unknown", "intransitive", "transitive"};
+ printf("Preserve: role = %s type1 = %s, id1 = %ld, type2 = %s, id2 = %ld\n",
+ roles[preserve.part],
+ types[preserve.word[0].type],
+ preserve.word[0].id,
+ types[preserve.word[1].type],
+ preserve.word[1].id);
+ printf("Command: role = %s type1 = %s, id1 = %ld, type2 = %s, id2 = %ld\n",
+ roles[command.part],
+ types[command.word[0].type],
+ command.word[0].id,
+ types[command.word[1].type],
+ command.word[1].id);