Skip to content

silentrob/simplenlg

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SimpleNLG in Javascript

  • CAUTION: This project is very much WIP*

This is functional port of SimpleNLG, most the tests, methods classes and interfaces have been ported.

Notably missing from this port.

  • Adjective ordering is still not complete. [TODO]
  • Aggergating interface is missing. [TODO]
  • Some more complex document types are not yet supported. [TODO]
  • We have a few missing or failing tests. [TODO]
  • NIHLexicon. I hard coded the XML Adapter to simplify the lexicon.
  • The Server Interface -- This seemed out of context and with Node you could easily add something directly.

Setup

Download or clone the repo.

Install the dependancies

npm install

Example

import Lexicon from '../src/lexicon/lexicon';
import Realiser from '../src/realiser/Realiser';
import NLG from '../src/framework/nlg';

const lexicon = new Lexicon('lexicon.xml');
const nlg = new NLG(lexicon);
const realiser = new Realiser(lexicon);

// Create a new canned sentense.
let s1 = nlg.createSentence("my dog is happy");

// And realize that sentence like this:
console.log(realiser.realiseSentence(s1)); // My dog is happy.

Whats next.

Jump into the tests, or take a look at the simpleNLG Wiki for more information.

What to help out. Pull requests welcome.

License

SimpleNLG is licensed under the terms and conditions of Mozilla Public License 1.1.

About

A port of SimpleNLG to JavaScript

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published