unified

Project: retextjs/retext

Package: retext@7.0.1

  1. Dependencies: 3·Dependents: 52
  2. Natural language processor powered by plugins
  1. tree 37
  2. syntax 27
  3. parse 18
  4. stringify 15
  5. language 12
  6. natural 10
  7. cst 8
  8. process 6
  9. concrete 5

retext

Build Coverage Downloads Size Sponsors Backers Chat

retext is a natural language processor powered by plugins part of the unified collective.

Don’t need the parser? Or the compiler? That’s OK.

Sponsors



🥇 ZEIT


🥇 Gatsby


🥇 Netlify


Holloway




You?

Read more about the unified collective on Medium »

Install

npm:

npm install retext

Use

var retext = require('retext')
var profanities = require('retext-profanities')
var emoji = require('retext-emoji')
var report = require('vfile-reporter')

retext()
  .use(profanities)
  .use(emoji, {convert: 'encode'})
  .process('He’s set on beating your butt for sheriff! :cop:', function(err, file) {
    console.log(String(file))
    console.error(report(err || file))
  })

Yields:

He’s set on beating your butt for sheriff! 👮
  1:26-1:30  warning  Be careful with “butt”, it’s profane in some cases  butt  retext-profanities

⚠ 1 warning

Contribute

See contributing.md in retextjs/.github for ways to get started. See support.md for ways to get help. Ideas for new plugins and tools can be posted in retextjs/ideas.

A curated list of awesome retext resources can be found in awesome retext.

This project has a Code of Conduct. By interacting with this repository, organisation, or community you agree to abide by its terms.

License

MIT © Titus Wormer