0.3.0 • Published 10 years ago

pcfg-generator v0.3.0

Weekly downloads
1
License
AGPL-3.0
Repository
-
Last release
10 years ago

pcfg-generator

pcfg-generator is a Node.js module to convert the output from treebank-parser into a Stochastic Context Free Grammar.

Install

To install pcfg-generator into your project, enter the following command in your project's root directory.

npm install pcfg-generator --save

NOTE: You might also want to consider installing treebank-parser as well.

Use

The following example shows how you can use pcfg-generator in your project.

var fs              = require('fs')
  , treebank_parser = require('treebank-parser')
  , pcfg_generator  = require('pcfg-generator')
  ;

var treebank_json = treebank_parser.parse(s_expression);
var pcfg = pcfg_generator.generate(treebank_json);

console.log(JSON.stringify(pcfg, null, 2));

Test

To run the included unit tests, enter the following command.

npm test
0.3.0

10 years ago

0.2.2

10 years ago

0.2.1

10 years ago

0.2.0

10 years ago

0.1.2

10 years ago

0.1.1

10 years ago

0.1.0

10 years ago