Git Product home page Git Product logo

php-indefinite-article's Introduction

PHP Indefinite Articles

Latest Version on Packagist Build Status Code Quality Code Coverage Total Downloads License

Determine the indefinite article of an English term.

An indefinite article is the word that comes before nouns or noun equivalents in English, such as "a" or "an". If the word starts with a consonant sound, the article used should be "a" โ€” for example "banana" becomes "a banana". If the word starts with a vowel sound, the article used should be "an" โ€” for example "apple" becomes "an apple".

This is not as simple as checking whether the first character of the word is a vowel or consonant as that does not determine the sound pronounced when speaking the word.

This is a port of Eamon Nerbonne's original solution for the problem.

๐Ÿ’พ Installation

You can install the package with Composer using the following command:

composer require imliam/php-indefinite-article:^1.0.0

๐Ÿ“ Usage

$word = new ImLiam\IndefiniteArticle\IndefiniteArticle('apple');

echo $word->parse();
// "an apple"

echo $word->article();
// "an"

โœ… Testing

composer test

๐Ÿ”– Changelog

Please see the changelog file for more information on what has changed recently.

โฌ†๏ธ Upgrading

Please see the upgrading file for details on upgrading from previous versions.

๐ŸŽ‰ Contributing

Please see the contributing file and code of conduct for details on contributing to the project.

๐Ÿ”’ Security

If you discover any security related issues, please email [email protected] instead of using the issue tracker.

๐Ÿ‘ท Credits

โ™ป๏ธ License

The MIT License (MIT). Please see the license file for more information.

php-indefinite-article's People

Contributors

imliam avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.