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 = treebank_parser = pcfg_generator = ; var treebank_json = treebank_parser;var pcfg = pcfg_generator; console;
Test
To run the included unit tests, enter the following command.
npm test