<commit_before>'use strict'

/* Dependencies. */
var assert = require('assert')
var zwitch = require('zwitch')
var mapz = require('mapz')
var unist = require('unist-util-assert')

/* Construct. */
var nlcst = zwitch('type')

/* Expose. */
exports = unist.wrap(nlcst)
module.exports = exports

exports.parent = unist.wrap(parent)
exports.text = unist.text
exports.void = unist.void
exports.wrap = unist.wrap
exports.all = mapz(exports, {key: 'children', indices: false})

/* Core interface. */
nlcst.unknown = unknown
nlcst.invalid = unknown

/* Per-type handling. */
nlcst.handlers = {
  RootNode: unist.wrap(RootNode),
  ParagraphNode: exports.parent,
  SentenceNode: exports.parent,
  WordNode: exports.parent,
  TextNode: exports.text,
  SymbolNode: exports.text,
  PunctuationNode: exports.text,
  WhiteSpaceNode: exports.text,
  SourceNode: exports.text<commit_msg>Refactor comment-style<commit_after>'use strict'

var assert = require('assert')
var zwitch = require('zwitch')
var mapz = require('mapz')
var unist = require('unist-util-assert')

var nlcst = zwitch('type')

exports = unist.wrap(nlcst)
module.exports = exports

exports.parent = unist.wrap(parent)
exports.text = unist.text
exports.void = unist.void
exports.wrap = unist.wrap
exports.all = mapz(exports, {key: 'children', indices: false})

// Core interface.
nlcst.unknown = unknown
nlcst.invalid = unknown

// Per-type handling.
nlcst.handlers = {
  RootNode: unist.wrap(RootNode),
  ParagraphNode: exports.parent,
  SentenceNode: exports.parent,
  WordNode: exports.parent,
  TextNode: exports.text,
  SymbolNode: exports.text,
  PunctuationNode: exports.text,
  WhiteSpaceNode: exports.text,
  SourceNode: exports.text
{'fraction_non_alphanumeric': 0.13711583924349882, 'fraction_numerical': 0.0, 'mean_word_length': 4.778156996587031, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5943690', 'n_tokens_mistral': 573, 'n_tokens_neox': 569, 'n_words': 127}