Skip to content

v0.0.2

Latest
Compare
Choose a tag to compare
@defstream defstream released this 27 Dec 23:29

[email protected]

This is the first non pre-released version of nl3, a natural language triple library, used for parsing triples from plain english.

Features

parse

Takes a text phrase containing a subject predicate and object, and extracts the subject predicate and object from the phrase.

nl3.parse('user jack msg user jill');
nl3.parse('user jack msgs user jill');
nl3.parse('user jack messaged user jill');
nl3.parse('user jack contacted user jill');
nl3.parse('user jack contacts user jill');

All will have the same output of...

{
  subject: {
    type: 'user',
    value: 'jack'
  },
  predicate: {
    value: 'message'
  },
  object: {
    type: 'user',
    value: 'jill'
  }
}