parse-japanese-basic
A Japanese language parser producing NLCST nodes.
This module is a basic module for retext-japanese.
- For semantics of nodes, see NLCST;
Installation
npm:
npm install parse-japanese-basic
Usage
var inspect = require('unist-util-inspect')
var ParseJapaneseBasic = require('parse-japanese-basic')
var japanese = new ParseJapaneseBasic()
var text = 'タイトル\n' +
'\n' +
'1 これは前段です。これは中段(2文の場合は後段。)です。これは後段です。\n'
var cst = japanese.parse(text)
console.log(inspect(cst))
API
ParseJapaneseBasic(options?)
Exposes the functionality needed to tokenize natural Japanese languages into a syntax tree.
Parameters:
ParseJapaneseBasic#parse(value)
Tokenize natural Japanese languages into an NLCST
syntax tree.
Parameters:
value
(VFile
or string
)
— Text document;
Related
License
MIT