2017 © Pedro Peláez
 

library n-gram

PHP Helpers to get n-grams

image

text-utils/n-gram

PHP Helpers to get n-grams

  • Tuesday, June 5, 2018
  • by DevinBeeuwkes
  • Repository
  • 1 Watchers
  • 0 Stars
  • 0 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 4 Versions
  • 0 % Grown

The README.md

PHP NGram

Generate n-grams for your string., (*1)

Build Status Scrutinizer Code Quality Latest Version Total Downloads, (*2)

N-grams?

Why does this project exist? Come on, don't delete this part. Fill it. Yes it's hard, but it's perhaps the most important part of the README., (*3)

As to why this project exist, it's to serve as a template for future open source PHP projects. Of course, feel free to fork it and make your own recipe., (*4)

Installation

composer install text-utils/n-gram

Usage

You can start using the n-gram generator by instantiating a new NGram class:, (*5)

$n = 1;
$generator = new TextUtils\NGram($n, 'Foo');
$nGram = $generator->get(); // array ('F', 'o', 'o')

We also provide a static wrapper (the for method) and two helper functions (bigram and trigram) for quick usage, (*6)

$nGram = TextUtils\NGram::for('string', 3); // array ('str', 'tri', 'rin', 'ing')
...
$biGram = bigram('foo'); // array ('fo', 'oo')
$triGram = trigram('foobar'); // array ('foo', 'oob', 'oba', 'bar')

Contributing

See the CONTRIBUTING file., (*7)

License

MIT. Please refer to the LICENSE file in this repository., (*8)

The Versions

05/06 2018

dev-master

9999999-dev https://github.com/devinbeeuwkes/ngram

PHP Helpers to get n-grams

  Sources   Download

MIT

The Requires

  • php ^7.0

 

The Development Requires

05/06 2018

dev-develop

dev-develop https://github.com/devinbeeuwkes/ngram

PHP Helpers to get n-grams

  Sources   Download

MIT

The Requires

  • php ^7.0

 

The Development Requires

05/06 2018

dev-release/1.0.0

dev-release/1.0.0 https://github.com/devinbeeuwkes/ngram

PHP Helpers to get n-grams

  Sources   Download

MIT

The Requires

  • php ^7.0

 

The Development Requires

05/06 2018

1.0.0

1.0.0.0 https://github.com/devinbeeuwkes/ngram

PHP Helpers to get n-grams

  Sources   Download

MIT

The Requires

  • php ^7.0

 

The Development Requires