Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 0c190de

Browse files
committed
docs
1 parent ffd7b5f commit 0c190de

File tree

1 file changed

+21
-5
lines changed

1 file changed

+21
-5
lines changed

‎README.md

Lines changed: 21 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# PHP NLP-Client
22

3-
This is a simple PHP library for performing Natural Language tasks using the Web64 NLP-Server https://github.com/web64/nlpserver
3+
This is a simple PHP library for performing Natural Language tasks using Web64's NLP-Server https://github.com/web64/nlpserver .
44

55
NLP Tasks Available through Web64's NLP Server:
66
* Language detection
@@ -21,16 +21,20 @@ NLP Tasks Available through Microsoft Labs API:
2121
composer require web64/php-nlp-client
2222
```
2323

24+
## NLP-Server
25+
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.
26+
Installation documentation: https://github.com/web64/nlpserver
27+
2428
## Entity Extraction - Named Entity Recognition
25-
This package provies access to three different methods for entity extraction.
29+
This package provides access to three different methods for entity extraction.
2630

2731
| First Header | Language Support | Programming Lang. | API Access |
2832
| ------------- | ------------- | ------------- | ------------- |
2933
| Polyglot | 40 languages | Python | NLP Server |
3034
| CoreNLP | 6 languages | Java | CoreNLP Standalone server |
3135
| Spacy.io | 7 languages | Python | NLP Server |
3236

33-
If you are dealing with text in English or one of the major European language you will get teh best results with CoreNLP or Spacy.io.
37+
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.io.
3438

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

@@ -39,13 +43,14 @@ Polyglot and Spacy NER is accessible thorough the NLP Server, CoreNLP requires i
3943
## Usage
4044

4145
### Language detection:
46+
4247
```php
4348
$nlp = new \Web64\Nlp\NlpClient('http://localhost:6400/');
4449
$detected_lang = $nlp->language( "The quick brown fox jumps over the lazy dog" );
4550
// 'en'
4651
```
4752

48-
### Article Extraction
53+
### Article & Metadata Extraction
4954

5055
```php
5156
// From URL
@@ -293,4 +298,15 @@ Array
293298
[feature] => 0.021840873634945
294299
)
295300
*/
296-
```
301+
```
302+
303+
304+
## Python libraries
305+
| Library | URL | NLP Task used |
306+
| ------------- | ------------- | ------------- |
307+
| langid.py | https://github.com/saffsd/langid.py | Language detection |
308+
| Newspaper | https://github.com/codelucas/newspaper | Article & metadata extraction |
309+
| Spacy | https://spacy.io/ | Entity extraction |
310+
| Polyglot | https://github.com/aboSamoor/polyglot | Multilingual NLPprocessing toolkit |
311+
| Gensim | https://radimrehurek.com/gensim/ | Summarization |
312+
| Readability | https://github.com/buriy/python-readability | Article extraction |

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /