You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: examples/README.md
+26-21Lines changed: 26 additions & 21 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,36 +3,41 @@ PHP Examples
3
3
4
4
These examples are scripts that can be run independently to demonstrate the Rosette API functionality.
5
5
6
-
You can now run your desired _endpoint_.php file to see it in action. Before running the examples
6
+
You can now run your desired _endpoint_.php file to see it in action. Before running the examples
7
7
for the first time:
8
-
1. cd examples
9
-
2. composer update
8
+
9
+
1.```cd examples```
10
+
2.```composer update```
11
+
3. The examples are dual purpose in that they're used to test both source and packagist. In order to meet that requirement, the examples expect the vendor directory to be at the same level as examples/.
12
+
```cp -r ./vendor/. ../vendor``` or you can edit the example to reference the vendor directory that is in the examples directory.
10
13
11
14
For example, run `php categories.php` if you want to see the categories functionality demonstrated.
12
15
13
16
All files require you to input your Rosette API User Key after `--key` to run.
14
-
For example: `php ping.php --key 1234567890`
15
-
All also allow you to input your own service URL if applicable.
17
+
For example: `php ping.php --key 1234567890`
18
+
All also allow you to input your own service URL if applicable.
16
19
For example: `php ping.php --key 1234567890 --url http://www.myurl.com`
17
20
18
21
19
22
Each example, when run, prints its output to the console.
20
23
21
-
| File Name | What it does |
22
-
| ------------- |------------- |
23
-
| categories.php | Gets the category of a document at a URL |
24
-
| entities.php | Gets the entities from a piece of text |
25
-
| info.php | Gets information about Rosette API |
26
-
| language.php | Gets the language of a piece of text |
27
-
| matched-name.php | Gets the similarity score of two names |
28
-
| morphology_complete.php | Gets the complete morphological analysis of a piece of text|
29
-
| morphology_compound-components.php | Gets the de-compounded words from a piece of text |
30
-
| morphology_han-readings.php | Gets the Chinese words from a piece of text |
31
-
| morphology_lemmas.php | Gets the lemmas of words from a piece of text |
32
-
| morphology_parts-of-speech.php | Gets the part-of-speech tags for words in a piece of text |
33
-
| ping.php | Pings the Rosette API to check for reachability |
24
+
| File Name | What it does |
25
+
| ------------- |------------- |
26
+
| categories.php | Gets the category of a document at a URL |
27
+
| entities.php | Gets the entities from a piece of text |
28
+
| info.php | Gets information about Rosette API |
29
+
| language.php | Gets the language of a piece of text |
30
+
| morphology_complete.php | Gets the complete morphological analysis of a piece of text|
31
+
| morphology_compound-components.php | Gets the de-compounded words from a piece of text |
32
+
| morphology_han-readings.php | Gets the Chinese words from a piece of text |
33
+
| morphology_lemmas.php | Gets the lemmas of words from a piece of text |
34
+
| morphology_parts-of-speech.php | Gets the part-of-speech tags for words in a piece of text |
35
+
| name_deduplication.php | Fuzzy deduplication of a list of names |
36
+
| name_translation.php | Translates a name from one language to another |
37
+
| name_similarity.php | Gets the similarity score of two names |
38
+
| ping.php | Pings the Rosette API to check for reachability |
34
39
| sentences.php | Gets the sentences from a piece of text |
35
-
| sentiment.php | Gets the sentiment of a local file |
36
-
| tokens.php | Gets the tokens (words) from a piece of text |
37
-
|translated-name.php |Translates a name from one language to another |
40
+
| sentiment.php | Gets the sentiment of a local file |
41
+
| tokens.php | Gets the tokens (words) from a piece of text |
0 commit comments