#!/usr/bin/env python """ NLUlite is a high-level Natural Language Understanding framework. This file is an example of the framework. This file is released with BSD license. """ __author__ = "NLUlite" __version__ = "0.1.4" __license__ = "BSD" from NLUlite import ServerProxy, Wisdom server = ServerProxy() wisdom = Wisdom(server) wisdom.load("fetched.wisdom") answer = wisdom.ask("what happens where") print answer.comment() for item in answer.elements(): print item.comment()
#!/usr/bin/env python """ NLUlite is a high-level Natural Language Understanding framework. This file is an example of the framework. This file is released with BSD license. """ __author__ = 'NLUlite' __version__ = '0.1.4' __license__ = 'BSD' from NLUlite import ServerProxy, Wisdom server = ServerProxy() wisdom = Wisdom(server) wisdom.load('fetched.wisdom') answer = wisdom.ask('what do the snakes need') print answer.comment() for item in answer.elements(): print item.comment()
#!/usr/bin/env python """ NLUlite is a high-level Natural Language Understanding framework. This file is an example of the framework. This file is released with BSD license. """ __author__ = 'NLUlite' __version__ = '0.1.4' __license__ = 'BSD' from NLUlite import ServerProxy, Wisdom server = ServerProxy('localhost', 4001) wisdom = Wisdom(server) wisdom.load('test.wisdom') answer = wisdom.ask('Who goes to germany') print answer.comment() for item in answer.elements(): print item.comment()
from NLUlite import ServerProxy, Wisdom server = ServerProxy('localhost', 4001) wisdom = Wisdom(server) wisdom.load('~/NLUlite/wisdoms/common.wisdom') wisdom.add('David sells a car to Maria') answer = wisdom.ask('Who buys what from whom?') print answer.comment() for item in answer.elements(): print item.comment()