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: README.md
+2
Original file line number
Diff line number
Diff line change
@@ -100,6 +100,7 @@ The following parameters are configurable for the API Client:
100
100
|`backoff_factor`|`float`| A backoff factor to apply between attempts after the second try. <br> **Default: 2**|
101
101
|`retry_statuses`|`Array of int`| The http statuses on which retry is to be done. <br> **Default: [408, 413, 429, 500, 502, 503, 504, 521, 522, 524]**|
102
102
|`retry_methods`|`Array of string`| The http methods on which retry is to be done. <br> **Default: ['GET', 'PUT']**|
103
+
|`apikey`|`string`||
103
104
104
105
The API client can be initialized as follows:
105
106
@@ -108,6 +109,7 @@ from firstlanguage_python.firstlanguage_python_client import FirstlanguageapiCli
108
109
from firstlanguage_python.configuration import Environment
Copy file name to clipboardExpand all lines: doc/client.md
+5-5
Original file line number
Diff line number
Diff line change
@@ -5,23 +5,23 @@ The following parameters are configurable for the API Client:
5
5
6
6
| Parameter | Type | Description |
7
7
| --- | --- | --- |
8
-
|`apikey`|`string`| API Key can be copied from your dashboard |
9
8
|`http_client_instance`|`HttpClient`| The Http Client passed from the sdk user for making requests |
10
9
|`override_http_client_configuration`|`bool`| The value which determines to override properties of the passed Http Client from the sdk user |
11
10
|`timeout`|`float`| The value to use for connection timeout. <br> **Default: 60**|
12
11
|`max_retries`|`int`| The number of times to retry an endpoint call if it fails. <br> **Default: 0**|
13
12
|`backoff_factor`|`float`| A backoff factor to apply between attempts after the second try. <br> **Default: 2**|
14
13
|`retry_statuses`|`Array of int`| The http statuses on which retry is to be done. <br> **Default: [408, 413, 429, 500, 502, 503, 504, 521, 522, 524]**|
15
14
|`retry_methods`|`Array of string`| The http methods on which retry is to be done. <br> **Default: ['GET', 'PUT']**|
15
+
|`apikey`|`string`||
16
16
17
17
The API client can be initialized as follows:
18
18
19
19
```python
20
20
from firstlanguageapi.firstlanguageapi_client import FirstlanguageapiClient
21
21
from firstlanguageapi.configuration import Environment
22
22
23
-
client = FirstlanguageapiClient(
24
-
apikey='apikey',
23
+
client = FirstlanguageapiClient(
24
+
apikey='apikey',
25
25
environment=Environment.PRODUCTION,)
26
26
```
27
27
@@ -33,7 +33,7 @@ The gateway for the SDK. This class acts as a factory for the Controllers and al
A text classifier identifies the categories of the text given as input. Classifying the texts is one of the powerful preprocessing technique in topic identification and sentiment classification (product reviews, movie reviews etc)and indexing the texts while building a search system.
27
25
28
26
# Languages covered:
@@ -54,11 +52,11 @@ def get_classification(self,
54
52
55
53
| Parameter | Type | Tags | Description |
56
54
| --- | --- | --- | --- |
57
-
|`body`|[`object`]($m/)| Body, Required | Add a JSON Input as per the schema defined below |
55
+
|`body`|[`object`](../../$m/)| Body, Required | Add a JSON Input as per the schema defined below<br><br>**Size limit:**<br><br>1MB for both text and URL input<br><br>**URL Input:**<br><br>For URL, we now accept 4 contentTypes.<br><br>* html<br>* plaintext<br>* pdf<br>* docx<br><br>If you are providing Google drive or Google Spreadsheet url, ensure that you provide a link which can download the file directly and not the share link.<br><br>Example for Google Drive link:<br><br>https://drive.google.com/uc?id=idofthefile|
| 426 | Please use HTTPS protocol |[`ApiClassify426ErrorException`](../../doc/models/api-classify-426-error-exception.md)|
92
90
| 429 | Too Many Requests |`APIException`|
93
91
94
92
95
93
# Get QA
96
94
97
-
# QA : Defintion and it's usage
98
-
99
95
A Question Answering System retrieves the answer relevant to the question given by the user. A question answering system can be used for building a text based chatbots, search engines etc. Our question answering system is mutilingual and supports 100 + languages. Please use ISO 639-2 2 digit language code to get results. For example, use 'en' for English, 'ta' for Tamil, 'hi' for Hindi, 'fr' for French etc.
100
96
101
97
For ISO code reference, please check the link https://www.loc.gov/standards/iso639-2/php/code_list.php
@@ -109,11 +105,11 @@ def get_qa(self,
109
105
110
106
| Parameter | Type | Tags | Description |
111
107
| --- | --- | --- | --- |
112
-
|`body`|[`object`]($m/)| Body, Optional | Add a JSON Input as per the schema defined below |
108
+
|`body`|[`object`](../../$m/)| Body, Optional | Add a JSON Input as per the schema defined below<br><br>**Size limit:**<br><br>1MB for both text and URL input<br><br>**URL Input:**<br><br>For URL, we now accept 4 contentTypes.<br><br>* html<br>* plaintext<br>* pdf<br>* docx<br><br>If you are providing Google drive or Google Spreadsheet url, ensure that you provide a link which can download the file directly and not the share link.<br><br>Example for Google Drive link:<br><br>https://drive.google.com/uc?id=idofthefile|
@@ -138,8 +134,8 @@ result = advanced_ap_is_controller.get_qa(body)
138
134
139
135
| HTTP Status Code | Error Description | Exception Class |
140
136
| --- | --- | --- |
141
-
| 400 | Bad Request |[`ErrorsException`](/doc/models/errors-exception.md)|
142
-
| 426 | Please use HTTPS protocol |[`M426ErrorException`](/doc/models/m426-error-exception.md)|
137
+
| 400 | Bad Request |[`ErrorsException`](../../doc/models/errors-exception.md)|
138
+
| 426 | Please use HTTPS protocol |[`M426ErrorException`](../../doc/models/m426-error-exception.md)|
143
139
| 429 | Too Many Requests |`APIException`|
144
140
145
141
@@ -165,11 +161,11 @@ def get_table_qa(self,
165
161
166
162
| Parameter | Type | Tags | Description |
167
163
| --- | --- | --- | --- |
168
-
|`body`|[`object`]($m/)| Body, Optional | Add a JSON Input as per the schema defined below. For URL input, if you are providing Google drive or Google Spreadsheet url ensure that you provide a link which can download the file directly and not the share link.<br><br>Example: For Google Spreadsheet, the url format will be like below:<br>https://docs.google.com/spreadsheets/d/1TtzPAHqpaTB7Ltdq0zwZ8FamF7O9aC4KH4EpmwI/export?format=csv&gid=151344200<br><br>Or for Google Drive, it will be like below:<br>https://drive.google.com/uc?id=idofthefile<br><br>For Flat table input check the example out. |
164
+
|`body`|[`object`](../../$m/)| Body, Optional | Add a JSON Input as per the schema defined below. For URL input, if you are providing Google drive or Google Spreadsheet url ensure that you provide a link which can download the file directly and not the share link.<br><br>Example for Google Spreadsheet link:<br><br>https://docs.google.com/spreadsheets/d/1TtzPAHqpaTB7Ltdq0zwZ8FamF7O9aC4KH4EpmwI/export?format=csv&gid=151344200<br><br>Example for Google Drive link:<br><br>https://drive.google.com/uc?id=idofthefile<br><br>For Flat table input check the example. |
169
165
170
166
## Response Type
171
167
172
-
[`List of ApiTableqaResponse`](/doc/models/api-tableqa-response.md)
168
+
[`List of ApiTableqaResponse`](../../doc/models/api-tableqa-response.md)
173
169
174
170
## Example Usage
175
171
@@ -209,8 +205,8 @@ result = advanced_ap_is_controller.get_table_qa(body)
209
205
210
206
| HTTP Status Code | Error Description | Exception Class |
211
207
| --- | --- | --- |
212
-
| 400 | Bad Request |[`ErrorsException`](/doc/models/errors-exception.md)|
213
-
| 426 | Please use HTTPS protocol |[`M426ErrorException`](/doc/models/m426-error-exception.md)|
208
+
| 400 | Bad Request |[`ErrorsException`](../../doc/models/errors-exception.md)|
209
+
| 426 | Please use HTTPS protocol |[`M426ErrorException`](../../doc/models/m426-error-exception.md)|
214
210
| 429 | Too Many Requests |`APIException`|
215
211
216
212
@@ -233,11 +229,11 @@ def get_image_caption(self,
233
229
234
230
| Parameter | Type | Tags | Description |
235
231
| --- | --- | --- | --- |
236
-
|`body`|[`ApiImagecaptionRequest`](/doc/models/api-imagecaption-request.md)| Body, Optional | Add a JSON Input as per the schema defined below.<br><br>For URL, if you are providing Google drive or Google Spreadsheet url ensure that you provide a link which can download the file directly and not the share link.<br><br>Example: For Google Spreadsheet, the url format will be like below:<br>https://docs.google.com/spreadsheets/d/1TtzPAHqpaTB7Ltdq0zwZ8FamF7OwI/export?format=csv&gid=151344200<br><br>Or for Google Drive, it will be like below:<br>https://drive.google.com/uc?id=idofthefile|
232
+
|`body`|[`ApiImagecaptionRequest`](../../doc/models/api-imagecaption-request.md)| Body, Optional | Add a JSON Input as per the schema defined below.<br><br>For URL, if you are providing Google drive or Google Spreadsheet url ensure that you provide a link which can download the file directly and not the share link.<br><br>Example for Google Drive:<br><br>https://drive.google.com/uc?id=idofthefile|
@@ -261,15 +257,13 @@ result = advanced_ap_is_controller.get_image_caption(body)
261
257
262
258
| HTTP Status Code | Error Description | Exception Class |
263
259
| --- | --- | --- |
264
-
| 400 | Bad Request |[`ErrorsException`](/doc/models/errors-exception.md)|
265
-
| 426 | Please use HTTPS protocol |[`M426ErrorException`](/doc/models/m426-error-exception.md)|
260
+
| 400 | Bad Request |[`ErrorsException`](../../doc/models/errors-exception.md)|
261
+
| 426 | Please use HTTPS protocol |[`M426ErrorException`](../../doc/models/m426-error-exception.md)|
266
262
| 429 | Too Many Requests |`APIException`|
267
263
268
264
269
265
# Get NER
270
266
271
-
# Named Entity Recognition : Defintion and it's usage
272
-
273
267
Named Entity Recognitiion (NER) is extracting the specific Nouns such as, Person Names, Location names, Organization Names, Currency , Dates. It is a classification task. NER can be used as a sub-task in applications such as Search Systems, Chatbots, Question Answering systems, Text Summarization etc.
274
268
275
269
# Languages covered:
@@ -299,11 +293,11 @@ def get_ner(self,
299
293
300
294
| Parameter | Type | Tags | Description |
301
295
| --- | --- | --- | --- |
302
-
|`body`|[`object`]($m/)| Body, Optional | Add a JSON Input as per the schema defined below |
296
+
|`body`|[`object`](../../$m/)| Body, Optional | Add a JSON Input as per the schema defined below<br><br>**Size limit:**<br><br>1MB for both text and URL input<br><br>**URL Input:**<br><br>For URL, we now accept 4 contentTypes.<br><br>* html<br>* plaintext<br>* pdf<br>* docx<br><br>If you are providing Google drive or Google Spreadsheet url, ensure that you provide a link which can download the file directly and not the share link.<br><br>Example for Google Drive link:<br><br>https://drive.google.com/uc?id=idofthefile|
303
297
304
298
## Response Type
305
299
306
-
[`List of ApiNerResponse`](/doc/models/api-ner-response.md)
300
+
[`List of ApiNerResponse`](../../doc/models/api-ner-response.md)
307
301
308
302
## Example Usage
309
303
@@ -336,15 +330,13 @@ result = advanced_ap_is_controller.get_ner(body)
336
330
337
331
| HTTP Status Code | Error Description | Exception Class |
338
332
| --- | --- | --- |
339
-
| 400 | Bad Request |[`ErrorsException`](/doc/models/errors-exception.md)|
340
-
| 426 | Please use HTTPS protocol |[`M426ErrorException`](/doc/models/m426-error-exception.md)|
333
+
| 400 | Bad Request |[`ErrorsException`](../../doc/models/errors-exception.md)|
334
+
| 426 | Please use HTTPS protocol |[`M426ErrorException`](../../doc/models/m426-error-exception.md)|
341
335
| 429 | Too Many Requests |`APIException`|
342
336
343
337
344
338
# Get Summary
345
339
346
-
# Summarization : Defintion and it's usage
347
-
348
340
Summarization generates a crisp content of the large input text which is highly coherent.
349
341
350
342
| Languages | ISO Code |
@@ -401,11 +393,11 @@ def get_summary(self,
401
393
402
394
| Parameter | Type | Tags | Description |
403
395
| --- | --- | --- | --- |
404
-
|`body`|[`object`]($m/)| Body, Optional | Add a JSON Input as per the schema defined below |
396
+
|`body`|[`object`](../../$m/)| Body, Optional | Add a JSON Input as per the schema defined below<br><br>**Size limit:**<br><br>1MB for both text and URL input<br><br>**URL Input:**<br><br>For URL, we now accept 4 contentTypes.<br><br>* html<br>* plaintext<br>* pdf<br>* docx<br><br>If you are providing Google drive or Google Spreadsheet url, ensure that you provide a link which can download the file directly and not the share link.<br><br>Example for Google Drive link:<br><br>https://drive.google.com/uc?id=idofthefile|
@@ -427,15 +419,13 @@ result = advanced_ap_is_controller.get_summary(body)
427
419
428
420
| HTTP Status Code | Error Description | Exception Class |
429
421
| --- | --- | --- |
430
-
| 400 | Bad Request |[`ErrorsException`](/doc/models/errors-exception.md)|
431
-
| 426 | Please use HTTPS protocol |[`M426ErrorException`](/doc/models/m426-error-exception.md)|
422
+
| 400 | Bad Request |[`ErrorsException`](../../doc/models/errors-exception.md)|
423
+
| 426 | Please use HTTPS protocol |[`M426ErrorException`](../../doc/models/m426-error-exception.md)|
432
424
| 429 | Too Many Requests |`APIException`|
433
425
434
426
435
427
# Get Translate
436
428
437
-
# Translation : Defintion and it's usage
438
-
439
429
Machine Translation is translating the text automatically from one language to another langauge.
440
430
441
431
# Languages covered:
@@ -508,11 +498,11 @@ def get_translate(self,
508
498
509
499
| Parameter | Type | Tags | Description |
510
500
| --- | --- | --- | --- |
511
-
|`body`|[`object`]($m/)| Body, Optional | Add a JSON Input as per the schema defined below |
501
+
| `body` | [`object`](../../$m/) | Body, Optional | Add a JSON Input as per the schema defined below<br><br>**Size limit:**<br><br>1MB for both text and URL input<br><br>**URL Input:**<br><br>For URL, we now accept 4 contentTypes.<br><br>* html<br>* plaintext<br>* pdf<br>* docx<br><br>If you are providing Google drive or Google Spreadsheet url, ensure that you provide a link which can download the file directly and not the share link.<br><br>Example for Google Drive link:<br><br>https://drive.google.com/uc?id=idofthefile<br><br>**preserveFormat Flag:**<br><br>When true:<br><br>This applies only for PDF and DOCX content types. The API will try to maintain the source file formatting. DOCX files will mostly work without any issues. But for PDF files, the API will try to maintain the format but it is not guaranteed. Scanned documents will also not work. For PDF files, if the target language font is not renderred properly, please report the issue at [email protected]<br><br>When false:<br><br>If the flag is false, then the API will simply read all text in the PDF and docx files and translate and send the response back as plaintext. |
0 commit comments