Download the PHP package web64/php-nlp-client without Composer

On this page you can find all versions of the php package web64/php-nlp-client. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package php-nlp-client

PHP NLP-Client

This is a simple PHP library for performing multilingual Natural Language tasks using Web64's NLP-Server https://github.com/web64/nlpserver and other providers.

NLP tasks available through Web64's NLP Server:

NLP Tasks Available through Stanford's CoreNLP Server:

NLP Tasks Available through Microsoft Labs API:

Laravel Package

There is also a Laravel wrapper for this library available here: https://github.com/web64/laravel-nlp

Installation

NLP Server

Most NLP features in this package requires a running instance of the NLP Server, which is a simple python flask app providing web service api access to common python NLP libraries.

Installation instrcuctions: https://github.com/web64/nlpserver

Entity Extraction - Named Entity Recognition (NER)

This library provides access to three different methods for entity extraction.

Provider Language Support Programming Lang. API Access
Polyglot 40 languages Python NLP Server
Spacy 7 languages Python NLP Server
CoreNLP 6 languages Java CoreNLP Standalone server

If you are dealing with text in English or one of the major European language you will get the best results with CoreNLP or Spacy.

The quality of extracted entities with Polyglot is not great, but for many languages it is the only available option at the moment.

Polyglot and Spacy NER is accessible thorough the NLP Server, CoreNLP requires its own standalone java server.

Usage

Language detection:

Article & Metadata Extraction

Entitiy Extraction & Sentiment Analysis (Polyglot)

This uses the Polyglot multilingual NLP library to return entities and a sentiment score for given text.Ensure the models for the required languages are downloaded for Polyglot.

Entity Extraction with Spacy

English is used by default. To use another language, ensure the Spacy language model is downloaded and add the language as the second parameter

Sentiment Analysis

Neighbouring words (Embeddings)

Summarization

Extract short summary from a long text

Readability

Article Extraction using python port of Readability.js

CoreNLP - Entity Extraction (NER)

CoreNLP has much better quality for NER that Polyglot, but only supports a few languages including English, French, German and Spanish.

Download CoreNLP server (Java) here: https://stanfordnlp.github.io/CoreNLP/index.html#download

Install CoreNLP

Running the CoreNLP server

When the CoreNLP server is running you can access it on port 9000: http://localhost:9000/

More info about running the CoreNLP Server: https://stanfordnlp.github.io/CoreNLP/corenlp-server.html

Concept Graph

Microsoft Concept Graph For Short Text Understanding: https://concept.research.microsoft.com/

Find related concepts to provided keyword

Python libraries

These are the python libraries used by the NLP Server for the NLP and data extraction tasks.

Library URL NLP Task used
langid.py https://github.com/saffsd/langid.py Language detection
Newspaper https://github.com/codelucas/newspaper Article & metadata extraction
Spacy https://spacy.io/ Entity extraction
Polyglot https://github.com/aboSamoor/polyglot Multilingual NLPprocessing toolkit
Gensim https://radimrehurek.com/gensim/ Summarization
Readability https://github.com/buriy/python-readability Article extraction

Other PHP NLP projects

Contribute

Get in touch if you have any feedback or ideas on how to improve this package or the documentation.


All versions of php-nlp-client with dependencies

PHP Build Version
Package Version
Requires php Version >=5.6.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package web64/php-nlp-client contains the following files

Loading the files please wait ....