2017 © Pedro Peláez
 

library php-text-analysis

PHP Text Analysis is a library for performing Information Retrieval (IR) and Natural Language Processing (NLP) tasks using the PHP language

image

molbi/php-text-analysis

PHP Text Analysis is a library for performing Information Retrieval (IR) and Natural Language Processing (NLP) tasks using the PHP language

  • Monday, February 6, 2017
  • by molbi
  • Repository
  • 1 Watchers
  • 0 Stars
  • 4 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 46 Forks
  • 0 Open issues
  • 5 Versions
  • 0 % Grown

The README.md

php-text-analysis

alt text, (*1)

Total Downloads, (*2)

PHP Text Analysis is a library for performing Information Retrieval (IR) and Natural Language Processing (NLP) tasks using the PHP language. All the documentation for this project can be found in the wiki., (*3)

Installation Instructions

Add PHP Text Analysis to your project, (*4)

composer require yooper/php-text-analysis

Documentation for the library resides in the wiki. https://github.com/yooper/php-text-analysis/wiki, (*5)

Dictionary Installation

Not required unless you use the dictionary stemmers, (*6)

For Ubuntu < 16, (*7)

sudo apt-get install libpspell-dev 
sudo apt-get install php5-pspell
sudo apt-get install aspell-en
sudo apt-get install php5-enchant

For Ubuntu >= 16, (*8)

sudo apt-get install libpspell-dev php7.0-pspell aspell-en php7.0-enchant

For Centos, (*9)

sudo yum install php5-pspell
sudo yum install aspell-en
sudo yum install php5-enchant

PHP Pecl Stem is not currently available in php 7.0., (*10)

Tokenize

There are several tokenizers available, (*11)

  • FixedLengthTokenizer
  • GeneralTokenizer
  • LambdaTokenizer
  • PennTreeBankTokenizer
  • RegexTokenizer
  • SentenceTokenizer
  • WhitespaceTokenizer

Tokenizer Usage, (*12)

$tokenizer = new GeneralTokenizer()
$tokens = $tokenizer->tokenize("Enter your text here");

Frequency Distribution

$tokenizer = new \TextAnalysis\Tokenizers\GeneralTokenizer();
$tokens = $tokenizer->tokenize("time flies like an arrow and an arrow flies like time");
$freqDist = new \TextAnalysis\Analysis\FreqDist($tokens);
$freqDist->getHapaxes(); //Get the Hapaxes
$freqDist->getTotalTokens();
$freqDist->getTotalUniqueTokens();

Check out the API for full documentation https://github.com/yooper/php-text-analysis/blob/master/src/Analysis/FreqDist.php, (*13)

The Versions

06/02 2017

dev-master

9999999-dev

PHP Text Analysis is a library for performing Information Retrieval (IR) and Natural Language Processing (NLP) tasks using the PHP language

  Sources   Download

Apache 2

The Requires

 

The Development Requires

by Avatar yooper

nlp natural language processing ir text analysis

16/01 2017

v1.1.0

1.1.0.0

PHP Text Analysis is a library for performing Information Retrieval (IR) and Natural Language Processing (NLP) tasks using the PHP language

  Sources   Download

Apache 2

The Requires

 

The Development Requires

by Avatar yooper

nlp natural language processing ir text analysis

05/12 2016

v1.0.1

1.0.1.0

PHP Text Analysis is a library for performing Information Retrieval (IR) and Natural Language Processing (NLP) tasks using the PHP language

  Sources   Download

Apache 2

The Requires

 

The Development Requires

by Avatar yooper

nlp natural language processing ir text analysis

14/10 2016

dev-wordnet

dev-wordnet

PHP Text Analysis is a library for performing Information Retrival (IR) and Natural Language Processing (NLP) tasks using the PHP language

  Sources   Download

Apache 2

The Requires

 

The Development Requires

by Avatar yooper

nlp natural language processing ir text analysis

26/09 2016

v1.0

1.0.0.0

PHP Text Analysis is a library for performing Information Retrival (IR) and Natural Language Processing (NLP) tasks using the PHP language

  Sources   Download

Apache 2

The Requires

 

The Development Requires

by Avatar yooper

nlp natural language processing ir text analysis