You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
from eywa.nlu import EntityExtractor
ex = EntityExtractor()
# entities : intent , source , destination, nop(number of passengers), time, date
x_taxi = [
'get me a cab from Aluva to kakkanad for 2 at 2am today',
'find me a txi from manglore to mumbai for 5 at 6pm tommorow',
'book a cab to newyork for 5',
'find a taxi from akihabara to yokohama'
]
y_taxi = [
{'intent': 'cab_booking', 'source': 'Aluva', 'destination': 'kakkanad', 'nop': '2', 'time': '2am', 'date': 'today'},
{'intent': 'cab_booking', 'source': 'manglore', 'destination': 'mumbai', 'nop': '5', 'time': '6pm', 'date': 'tommorow'},
{'intent': 'cab_booking', 'source': None, 'destination': 'newyork', 'nop': '5', 'time': None, 'date': None},
{'intent': 'cab_booking', 'source': 'akihabara', 'destination': 'yokohama', 'nop': None, 'time': None, 'date': None}
]
ex.fit(x_taxi, y_taxi)
x_test = 'get me a taxi from chennai to banglore for 2 at 2am today'
res = ex.predict(x_test)
print(res)
The text was updated successfully, but these errors were encountered:
The text was updated successfully, but these errors were encountered: