articles

0.2.2 • Public • Published

The Article class determines whether "a" or "an" should precede a word in English using the method described in this stackoverflow response. The wikipedia-article-text dump provided by Eamon Nerbonne was used as the basis for the dataset.

To use:

npm install articles

Example:

Articles = require('articles')
Articles.articlize(
  'unanticipated result'
  'unanimous vote'
  'honest decision'
  'honeysuckle shrub'
  '0800 number'
  '∞ of oregano'
  'NASA scientist'
  'NSA analyst'
  'FIAT car'
  'FAA policy'
)

Output:

[ 'an unanticipated result',
  'a unanimous vote',
  'an honest decision',
  'a honeysuckle shrub',
  'an 0800 number',
  'an ∞ of oregano',
  'a NASA scientist',
  'an NSA analyst',
  'a FIAT car',
  'an FAA policy' ]

/articles/

    Package Sidebar

    Install

    npm i articles

    Weekly Downloads

    11,390

    Version

    0.2.2

    License

    BSD

    Unpacked Size

    46.4 kB

    Total Files

    4

    Last publish

    Collaborators

    • ckirby