https://github.com/connected-web/elda-ai
A natural language interface for storing and retrieving information.
https://github.com/connected-web/elda-ai
Last synced: 4 months ago
JSON representation
A natural language interface for storing and retrieving information.
- Host: GitHub
- URL: https://github.com/connected-web/elda-ai
- Owner: connected-web
- License: isc
- Created: 2015-10-01T17:48:06.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2020-07-19T09:21:04.000Z (almost 6 years ago)
- Last Synced: 2025-08-09T05:25:51.844Z (11 months ago)
- Language: JavaScript
- Size: 61.5 KB
- Stars: 0
- Watchers: 3
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# elda-ai
A natural language interface for storing and retrieving information.
## Development
To run tests:
```
npm install
npm test
```
### Command Line Interface
To interact with a local copy of Elda:
```
npm install
node cli.js
```
To exit the interface, type one of `exit`, `quit`, `stop`, or `bye`:
```
I'm listening
: quit
Ok, bye!
```
### Design

### Use as a library
To use Elda as a library, run:
```
npm install elda-ai --save
```
Then create the script `example.js` as follows:
```js
var elda = require('elda-ai');
var messages = [
'hello',
'what is this for?',
'help!',
'lets take this from the top'
];
elda().then(function(instance) {
messages.forEach(function(message) {
instance.respondTo(message).then(console.log);
});
});
```
Run the example using the command:
```
node example.js
```
## Library Structure
### `api.js`
This is the public interface to Elda.
#### `elda(config)`
This method configures and returns an API object, which can then be used to interact with Elda.
```js
var elda = require('elda-ai');
var config = {};
var api = elda(config);
```
#### `api.respondTo(message)`
This method interprets a message, and forms a response.
```js
var elda = require('elda-ai');
var message = 'Add event Kate\'s birthday party, at 5pm tomorrow';
elda().respondTo(message).then(console.log);
```