Socket
Socket
Sign inDemoInstall

articles

Package Overview
Dependencies
0
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    articles

Utility to determine the indirect article (in English) for a given word, using the method described at http://stackoverflow.com/questions/1288291/how-can-i-correctly-prefix-a-word-with-a-and-an/1288473#1288473 and the data provided at http://home.nerbonne


Version published
Weekly downloads
12K
decreased by-11.64%
Maintainers
1
Install size
46.3 kB
Created
Weekly downloads
 

Readme

Source

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' ]

Keywords

FAQs

Last updated on 14 Feb 2018

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc