Skip to content

syntax-tree/nlcst-to-string

nlcst-to-string Build Status Coverage Status

Transform an NLCST node into a string.

Installation

npm:

$ npm install nlcst-to-string

Component.js:

$ component install wooorm/nlcst-to-string

Bower:

$ bower install nlcst-to-string

Usage

var nlcstToString = require('nlcst-to-string');

console.log(nlcstToString({
    "type": "WordNode",
    "data": {
        "partOfSpeech": [
            "NNP",
            "NN"
        ]
    },
    "children": [
        {
            "type": "TextNode",
            "value": "AT"
        },
        {
            "type": "PunctuationNode",
            "value": "&"
        },
        {
            "type": "TextNode",
            "value": "T"
        }
    ]
}));
/*
 * "AT&T"
 */

Related

License

MIT © Titus Wormer

About

utility to transform an nlcst tree to a string

Topics

Resources

License

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Contributors 7