The logic behind a ChatBot which analyzes user inputs and queries a database
Built using:
- Spring Boot
- AWS comprehend
- AWS EC2 or on localhost
- AWS RDS (MySQL)
- By default the service is hosted on port 8080
- Acceptes Get requests
text- Required: The user input messagelimit- Optional: limits the number of input returned
http://${your ip}:8080/${input}?limit=${int value}Example
http://localhost:8080/who works in toronto?limit=20- Response is in JSON
Response- There are two parts to the responseresultList- An JSON Array which contains all the information from the queryplainText- A simplified string that combines all the information fromresultListinto a sentence
- Java 8
- Import as a Maven Project
- Create an AWS account and and create an Access/Secret Key
- Launch an MySQL RDS instance
- Launch an EC2 Ubuntu 16.04 instance
Put the apporiate values in {resources/application.properites}
spring.datasource.url=
spring.datasource.username=
spring.datasource.password=
AWS_ACCESS_KEY=
AWS_SECRET_KEY=
...- build your applicaiton as a
.warfile - Follow this guide to setup your server as a Tomcat server
- In the application manager, run your
.warfile
** NOTE **
You will need to configure your own SQL database and will need to change Dao/AWS_RDS_dao to suit your needs.
My database is setup as such:

You can write your own Junit testing in src/test/java
- Swtich to elastic search and OpenNLP