TRANSFER ENGINE COMMANDS: (command followed by equivalent C++ code) Each of these commands can also be used as parameters on the command-line. Prepend two dashes "--" to the command and then follow it with any necessary arguments ** Translation trans sentence : Translate sentence // translations.clear(); // if (translate(tmparg, translations) > 0) { // for (trans_index = 0; trans_index < translations.size(); trans_index++) { // cout << trans_index << ": " << translations[trans_index] << endl; // } // } else { // cout << " * No complete translation found" << endl; // cout << bestpartial() << endl; // } parse sentence : Parse sentence and show results // if (parse(sentence) > 0) { // cout << "Displaying parses: " << endl; // showParses(); // } else { // cout << "No complete parses found" << endl; // } transfile filename : Translate sentences in filename // translatefile(filename, translations); transfilesgm filename sysid : Translate sentences in filename // sgmloutput = true; // sgmlsysid = sysid; // translatefile(filename, outfile, translations); // sgmloutput = false; includesource [on|off] : Include source sentence/debugging info in output // includesource = true|false; allowedpartials ... : Specify constituent types allowed in partial translations // allowedpartials.clear(); // // For each allowed partial // allowedpartials.insert(constituenttype); findall [on|off] : Show all possible translations // findalltrans = true|false; timer [on|off] : Display how long a translation took" < lexfss; // lexfss = wordToFS(args[argindex]); // if (lexfss.size() == 0) { // cout << "Nothing returned" << endl; // } // for (unsigned int lexfsindex = 0; lexfsindex < lexfss.size(); lexfsindex++) { // lexfss[lexfsindex].setName(Symbol("X0")); // cout << lexfss[lexfsindex] << endl; // } // } // } else if (byfs == true || morphtype == WHOLESENT) { // vector lexfss; // string wholesent; // for (unsigned wordindex = 1; wordindex < args.size(); wordindex++) { // wholesent += args[wordindex] + " "; // } // cout << "Doing morphological analysis on " << wholesent << endl; // // lexfss = sentToFS(wholesent); // if (lexfss.size() == 0) { // cout << "Nothing returned" << endl; // } // for (unsigned int lexfsindex = 0; lexfsindex < lexfss.size(); lexfsindex++) { // char fsname[10]; // sprintf(fsname, "Y%d", lexfsindex); // lexfss[lexfsindex].setName(Symbol(fsname)); // cout << lexfss[lexfsindex] << endl; // } // } // } alwaysmorph [on|off] : Always run morphology first if on // alwaysdomorph = true|false; parsebyfs [on|off] : Do parsing by feature structure of whole sentence // byfs = true|false; // morphtype = WHOLESENT; ** Rule Management rule ID : Print rule with ID // printRule(ruleid); loadgra filename : Load grammar rules in filename // loadRuleFile(filename); // return number of rules added reloadgra filename : Load grammar rules in filename, overwrite duplicates // overwritedups = true; // loadRuleFile(filename); // return number of rules added loadlex filename : Load lexicon in filename // loadLexiconFile(filename); // returns number of lexical rules added savegra filename : Save all transfer rules to filename // saveGrammar(filename); savelex filename : Save all lexical rules to filename // saveLexicon(filename); deln N : Delete last N previously added rules // deleteLastNRules(n); del ID : Delete rule ID // deleteRule(ruleid) // returns true if able to delete, false otherwise allrules : Print out all currently loaded (grammar) rules // cout << getAllRules(); alllexicon : Print out all currently loaded lexical rules // cout << getAllLexicalRules(); listruleids type : Print ids of rules of src type // printRuleFinder(ruletype); clearall : Delete all rules, clear engine // clearall() ** Debugging parsedebug [on|off] : Turn on/off parsing debug // parsedebug = true|false; traversedebug [on|off] : Turn on/off debug showing parse // traversedebug = true|false; transferdebug [on|off] : Turn on/off transfer stage debug // transferdebug = true|false; fsdebug [on|off] : Turn on/off display of feature structures // fsdebug = true|false; filldebug [on|off] : Turn on/off fill/constraint pass debug // filldebug = true|false; stepdebug [on|off] : Turn on/off stepping through debug // stepdebug = true|false; grammardebug [on|off] : Turn on/off grammar load debugging // debug = true|false; minimaldebug [on|off] : Print highlights of debugging info // minimaldebug = true|false; enginedebug [on|off] : Turn on/off extra debugging info (experts only) // enginedebug = true|false; alldebug : Turn on all debug states // debug = true; // parsedebug = true; // traversedebug = true; // transferdebug = true; // fsdebug = true; // filldebug = true; // stepdebug = true; // minimaldebug = true; alloff : Turn off all debug states quiet : Turn off all debug states // debug = false; // parsedebug = false; // traversedebug = false; // transferdebug = false; // fsdebug = false; // filldebug = false; // stepdebug = false; // minimaldebug = false; debugstatus : Show status of all debug states // cout << "Minimal debug : " << (minimaldebug ? "ON" : "OFF") << endl; // cout << "Grammar debug : " << (debug ? "ON" : "OFF") << endl; // cout << "Parse debug : " << (parsedebug ? "ON" : "OFF") << endl; // cout << "Traverse debug: " << (traversedebug ? "ON" : "OFF") << endl; // cout << "Transfer debug: " << (transferdebug ? "ON" : "OFF") << endl; // cout << "FS debug : " << (fsdebug ? "ON" : "OFF") << endl; // cout << "Step debug : " << (stepdebug ? "ON" : "OFF") << endl; // cout << "Fill debug : " << (filldebug ? "ON" : "OFF") << endl; // cout << "Find all : " << (findalltrans ? "ON" : "OFF") << endl; showtrace [off|top|all|src|toprule] : Show trace info when includesource is on // showtrace = 0|1|2|3|4; addwatch ID : Stop before executing transfer rule ID // addWatch(ruleid); rmwatch ID : Remove rule ID from watch list // deleteWatch(ruleid); listwatches : List all rules on watch list // printWatches(); addfail ID : Always fail when running rule ID // addRuleFail(ruleid); rmfail ID : Remove ID from fail list // removeRuleFail(ruleid); listfails : List all rules on fail list // cout << listRuleFails(); ** Rule Learning addfilter ID : Add one time rule filter for rule ID // addOneTimeRuleFilter(ruleid); rmfilter ID : Remove one time rule filter for rule ID // removeOneTimeRuleFilter(ruleid); listfilters : List all current filters // listOneTimeRuleFilters(); ** General utf8 : Assume all text is in UTF-8 // setUnicode(true); // default is false so no need to set to false latin1 : Assume all text is in Latin-1 (ISO-8859-1) normalizecase [off|upper|lower] : Normalize case as specified // normalizecase = 0|1|2; skipsort [on|off] : When using skips (#) in rules, sort translations by least amount skipped // skipsort = true|false; help|h : Show this message // quit, exit : Exit the program // exit(0);