Skip to content

Commit

Permalink
Initial commit of ExpertiseBoilerPlate.
Browse files Browse the repository at this point in the history
  • Loading branch information
erezbi committed Oct 24, 2017
1 parent e9798c9 commit 8310d37
Show file tree
Hide file tree
Showing 53 changed files with 2,032 additions and 202 deletions.
5 changes: 5 additions & 0 deletions .cfignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
node_modules/
.DS_Store
db
*.md
*.log
2 changes: 2 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
**/.env
node_modules
11 changes: 11 additions & 0 deletions .env.sample
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=
15 changes: 15 additions & 0 deletions CONTRIBUTING.md
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
20 changes: 20 additions & 0 deletions Dockerfile
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"]

87 changes: 87 additions & 0 deletions INTENTS.md
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"
}
}
```
201 changes: 0 additions & 201 deletions LICENSE

This file was deleted.

13 changes: 13 additions & 0 deletions LICENSE.txt
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.
Loading

0 comments on commit 8310d37

Please sign in to comment.