This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#get the dependency parse of the first sentence | |
print('---') | |
print('dependency parse of first sentence') | |
dependency_parse = sentence.basicDependencies | |
print(dependency_parse) | |
# get the first token of the first sentence | |
print('---') | |
print('first token of first sentence') | |
token = sentence.token[0] | |
print(token) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="UTF-8"> | |
<meta http-equiv="X-UA-Compatible" content="IE=edge"> | |
<meta name="viewport" content="width=device-width, initial-scale=1"> | |
<!-- title of the page --> | |
<title>image_classification</title> | |
<!-- load processing library--> | |
<script src="https://cdnjs.cloudflare.com/ajax/libs/p5.js/0.8.0/p5.min.js"></script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## intent:current_matches | |
- which cricket match is happening right now | |
- which ipl match is next | |
- which teams are playing next in ipl | |
- tell me some ipl news | |
- i want ipl updates | |
- what are the latest match updates | |
- who won the last ipl match | |
- how is ipl going | |
- what was the result of the last match |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
'intent': { | |
'name': 'current_matches', | |
'confidence': 0.6657130383645372 | |
}, | |
'entities': [], | |
'intent_ranking': [{ | |
'name': 'current_matches', | |
'confidence': 0.6657130383645372 | |
}, { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Me: Hi | |
Iplbot: Hey! How may I help you? | |
Me: What was the result of the last match? | |
Iplbot: Here are some IPL quick info: | |
1.The match between Rajasthan Royals and Delhi Capitals was recently held and Delhi Capitals won. | |
2.The next match is Warriors vs Titans on 22 April 2019 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## news path 1 | |
* greet | |
- utter_greet | |
* current_matches | |
- action_match_news | |
- utter_did_that_help | |
* affirm or thanks | |
- utter_gratitude | |
* goodbye | |
- utter_goodbye |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## news path 1 | |
* greet | |
- utter_greet | |
* current_matches | |
- action_match_news | |
- utter_did_that_help | |
* affirm or thanks | |
- utter_gratitude | |
* goodbye | |
- utter_goodbye |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
policies: | |
- name: KerasPolicy | |
epochs: 100 | |
max_history: 5 | |
- name: FallbackPolicy | |
fallback_action_name: 'action_default_fallback' | |
- name: MemoizationPolicy | |
max_history: 5 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
API_URL = "https://cricapi.com/api/" | |
API_KEY = "" | |
class ApiAction(Action): | |
def name(self): | |
return "action_match_news" | |
def run(self, dispatcher, tracker, domain): | |
res = requests.get(API_URL + "matches" + "?apikey=" + API_KEY) | |
if res.status_code == 200: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
actions: | |
- utter_greet | |
- utter_did_that_help | |
- utter_goodbye | |
- action_match_news | |
- utter_default | |
- utter_gratitude | |
- utter_ask_again | |
intents: |
OlderNewer