Read a file, remove the words, see all the punctuations.
npm install punc
'use strict'
const Punc = require('./index')
Punc('alice.txt', 'utf8')
.then(dataFromPunc => console.log(dataFromPunc))
.catch(error => handleError(error))
Output found: here
Please see the wiki.
- Read a file, remove words and numbers, do something with the
data
:data.count
: keeps count of every punctuation seendata.body
: complete text with letters and numbers replaced with a space-characterdata.wordCount
: calculates the words per sentence average
- Generate a PDF file. See how it would look like on e-paper
-
Punctuations to keep when removing words:
; : ' " , ! ? . ( ) -
-
Punctuations to use when counting occurances:
; : ' " , ! ? .
this article on medium which was in-turn inspired by this person's work.