-
Notifications
You must be signed in to change notification settings - Fork 63
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Initial commit of ExpertiseBoilerPlate.
- Loading branch information
Showing
53 changed files
with
2,032 additions
and
202 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
node_modules/ | ||
.DS_Store | ||
db | ||
*.md | ||
*.log |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
**/.env | ||
node_modules |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
# | ||
PORT=10010 | ||
|
||
# Application (expertise) name | ||
APP_NAME= | ||
|
||
# | ||
CLOUDANT_URL= | ||
|
||
# | ||
LOGGER_LEVEL= |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
# Issues | ||
|
||
If you encounter an issue with this sample app, you are welcome to submit a bug report. Before that, please search for similar issues. It's possible somebody has encountered this issue already. | ||
|
||
|
||
# Pull Requests | ||
|
||
If you want to contribute to the repository, here's a quick guide: | ||
|
||
1. Fork the repo | ||
1. Develop your code changes | ||
1. Ensure `eslint` is happy: `npm run lint` | ||
1. Ensure the tests pass: `npm test` | ||
1. Commit your changes | ||
1. Push to your fork and submit a pull request |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
|
||
FROM node:alpine | ||
|
||
WORKDIR /src | ||
|
||
# set non secret configuration as ENV params | ||
ENV LOGGER_LEVEL=debug | ||
ENV PORT=3000 | ||
ENV APP_NAME=boilerplate-expertise | ||
|
||
# Add package.json and npm install before app code to | ||
ADD package.json . | ||
RUN npm install | ||
|
||
# Add the application code last | ||
ADD . . | ||
|
||
EXPOSE 3000 | ||
ENTRYPOINT ["npm","run", "start"] | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,87 @@ | ||
# Intents | ||
|
||
This file defines all expertise domain intents. | ||
|
||
## Table of Contents | ||
|
||
* [Intent Parts](#intent-parts) | ||
* [Weather Current](#weather-current) | ||
|
||
## Intent Parts | ||
|
||
#### Intent Name | ||
|
||
The expertise name should be all in lower case, each word should be separated by dash ('-'). For expertise specific intents it is recommended to use the expertise name or its abbreviation as the first word. | ||
|
||
#### Intent Description | ||
|
||
Short description of intent. | ||
|
||
#### Utterances | ||
|
||
Should include examples for intent utterances. Entities should be in curly brackets. | ||
At least one utterance form each sentence type should be added (there is no need to include permutation of the utterance with different entities values). | ||
Full intent utterances can be found in the expertise NLP data files. | ||
|
||
#### Entity | ||
|
||
Defines entities of the intent which should be extracted by the NLP engine. Entities should be defined as optional or required. | ||
|
||
#### Entity Name | ||
|
||
Entity name should be all in lower case, each word should be separated by dash('-'). | ||
|
||
#### Card | ||
|
||
Card is an optional metadata response. It can include information that might be used by application to enhance responses, e.g. add link to image etc. | ||
|
||
# Weather Current | ||
|
||
### Name | ||
|
||
weather-current | ||
|
||
### Description | ||
|
||
The intent returns the current weather for the specified location (or context location). The response includes the current temperature and humidity. | ||
|
||
### Utterances | ||
|
||
``` | ||
What is the weather | ||
What is the current weather | ||
What is the weather in {london} | ||
``` | ||
|
||
### Entities | ||
|
||
* Optional - Entity is not mandatory and will not be used during expertise assignment by the core. | ||
|
||
* Required - Entity must exists in user input. | ||
|
||
#### Optional | ||
|
||
* Location - Name of the city / country | ||
* Values: any text | ||
|
||
#### Required | ||
|
||
None. | ||
|
||
### Response | ||
|
||
#### Text | ||
|
||
``` | ||
The current weather in london is 25 degrees celsius | ||
``` | ||
|
||
#### Card | ||
|
||
``` json | ||
{ | ||
"url": { | ||
"current": "http://www.freeiconspng.com/uploads/sun-icon-16.jpg" | ||
} | ||
} | ||
``` |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
Copyright IBM Corp. Year 2017 | ||
|
||
Licensed under the Apache License, Version 2.0 (the "License"); | ||
you may not use this file except in compliance with the License. | ||
You may obtain a copy of the License at | ||
|
||
http://www.apache.org/licenses/LICENSE-2.0 | ||
|
||
Unless required by applicable law or agreed to in writing, software | ||
distributed under the License is distributed on an "AS IS" BASIS, | ||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
See the License for the specific language governing permissions and | ||
limitations under the License. |
Oops, something went wrong.