コード例 #1
0
ファイル: ask_from_fetched.py プロジェクト: NLUlite/examples
#!/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()
コード例 #2
0
ファイル: ask_from_fetched.py プロジェクト: NLUlite/examples
#!/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()
        
コード例 #3
0
ファイル: test_load.py プロジェクト: NLUlite/examples
#!/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()

コード例 #4
0
ファイル: code3.py プロジェクト: NLUlite/examples
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()