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 16cbd2e

Browse files
committed
docs
1 parent ad0716f commit 16cbd2e

File tree

1 file changed

+19
-18
lines changed

1 file changed

+19
-18
lines changed

‎README.md

Lines changed: 19 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@ This is a simple PHP library for performing Natural Language tasks using Web64's
44

55
NLP Tasks Available through Web64's NLP Server:
66
* [Language detection](#language-detection)
7-
* Entity Extraction (NER) - Multilingual
8-
* Sentiment Analysis - Multilingual
9-
* Embeddings / Neighbouring words - Multilingual
107
* [Article Extraction from HTML or URL](#article--metadata-extraction)
8+
* [Entity Extraction](#entitiy-extraction--sentiment-analysis-polyglot) (NER) - Multilingual
9+
* [Sentiment Analysis](#sentiment-analysis) - Multilingual
10+
* Embeddings / Neighbouring words - Multilingual
1111
* Summarization
1212

1313
NLP Tasks Available through Stanford's CoreNLP Server:
@@ -125,7 +125,7 @@ Array
125125

126126

127127

128-
### Spacy Entities
128+
### Entity Extraction with Spacy
129129
```php
130130
$text = "Harvesters is a 1905 oil painting on canvas by the Danish artist Anna Ancher, a member of the artists' community known as the Skagen Painters.";
131131

@@ -162,6 +162,19 @@ English is used by default. To use another language, ensure the Spacy language
162162
$entities = $nlp->spacy_entities( $spanish_text, 'es' );
163163
```
164164

165+
### Sentiment Analysis
166+
167+
```php
168+
$sentiment = $nlp->sentiment( "This is the worst product ever" );
169+
// -1
170+
171+
$sentiment = $nlp->sentiment( "This is great! " );
172+
// 1
173+
174+
// specify language in second parameter for non-english
175+
$sentiment = $nlp->sentiment( $french_text, 'fr' );
176+
```
177+
165178
### Neighbouring words (Embeddings)
166179
```php
167180
$nlp = new \Web64\Nlp\NlpClient('http://localhost:6400/');
@@ -214,20 +227,6 @@ Array
214227
*/
215228
```
216229

217-
218-
### Sentiment Analysis
219-
220-
```php
221-
$sentiment = $nlp->sentiment( "This is the worst product ever" );
222-
// -1
223-
224-
$sentiment = $nlp->sentiment( "This is great! " );
225-
// 1
226-
227-
// specify language in second parameter for non-english
228-
$sentiment = $nlp->sentiment( $french_text, 'fr' );
229-
```
230-
231230
## CoreNLP - Entity Extraction (NER)
232231
CoreNLP har much better quality for NER that Polyglot, but only supports a few languages including English, French, German and Spanish.
233232

@@ -313,6 +312,8 @@ Array
313312

314313

315314
## Python libraries
315+
These are the python libraries used by the NLP Server for the NLP and data extraction tasks.
316+
316317
| Library | URL | NLP Task used |
317318
| ------------- | ------------- | ------------- |
318319
| langid.py | https://github.com/saffsd/langid.py | Language detection |

0 commit comments

Comments
(0)

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