opts, args = getopt.getopt(sys.argv[1:], "hnad", ["help", "noloop", "anna", "debug"]) except getopt.GetoptError: print 'nlp.py -h -l -a' sys.exit(2) for opt, arg in opts: if opt == '-h': print 'nlp.py' sys.exit() elif opt in ("-n"): loop = False elif opt in ("-a"): brain = 'ANNA' elif opt in ("-d"): debug = True appID = 'T3H9JX-RQQ2273TJ9' # Fill in your own Wolfram AppID here useFifos = False # Only set True if integrated with CCSR robot platform s = ccsrNlpClass(useFifos, appID) print 'nplxCCSR v0.1: type a question...' while (1): line = sys.stdin.readline() print brain if brain == 'nlpxCCSR': s.nlpParse(line, debug) elif brain == 'ANNA': s.annaApi(line) if not loop: break
try: opts, args = getopt.getopt(sys.argv[1:],"hnad",["help","noloop", "anna", "debug"]) except getopt.GetoptError: print 'nlp.py -h -l -a' sys.exit(2) for opt, arg in opts: if opt == '-h': print 'nlp.py' sys.exit() elif opt in ("-n"): loop = False elif opt in ("-a"): brain = 'ANNA' elif opt in ("-d"): debug = True appID = 'T3H9JX-RQQ2273TJ9' # Fill in your own Wolfram AppID here useFifos = False # Only set True if integrated with CCSR robot platform s = ccsrNlpClass(useFifos, appID) print 'nplxCCSR v0.1: type a question...' while (1): line = sys.stdin.readline() print brain if brain == 'nlpxCCSR': s.nlpParse(line, debug) elif brain == 'ANNA': s.annaApi(line) if not loop: break
print 'nlp.py -h -l -a' sys.exit(2) for opt, arg in opts: if opt == '-h': print 'nlp.py' sys.exit() elif opt in ("-n"): loop = False elif opt in ("-a"): brain = 'ANNA' elif opt in ("-d"): debug = True appID = 'T3H9JX-RQQ2273TJ9' # Fill in your own Wolfram AppID here robotKey = '59742' useFifos = False # Only set True if integrated with CCSR robot platform s = ccsrNlpClass(useFifos, appID, robotKey, debug) print 'nplxCCSR v0.1: type a question...' while (1): if(mode=='poll'): line = '' else: line = sys.stdin.readline() print brain if brain == 'nlpxCCSR': s.nlpParse(line) elif brain == 'ANNA': s.remoteBrain(line) if not loop: break