Jibber AI with Docker Settings
The following settings can be applied to the request body:
General
Setting | features |
Required | Yes |
Default | None (Must be set) |
Choose which features you would like to run. Features include "entities", "pii", "keyword", "sentiment" and "summary".
At least one feature must be included and set to True otherwise the request will be rejected.
NOTE: sentiment is currently only supported on english.
body = {
"features": {
"entities": True,
"pii": True,
"sentiment": True,
"keyword": False,
"summary": False
},
"text": "the text"
}
response = requests.post(url, headers=headers, json=body)
Setting | text.max.length |
Required | No |
Default | 100000 |
By default, requests will process text up to 100000 characters in length. If you send data where the text is over this length, then the request will be rejected.
It's possible to increase this value up to a maximum of 1000000 character, but this will require more memory for the Docker container.
If you do not provide enough memory for the Docker container, then requests can fail due to the container running out of memory (See Memory)
body = {
"features": {
"entities": True
},
"settings": {
"text.max.length": 50000
},
"text": "the text"
}
response = requests.post(url, headers=headers, json=body)
Entity
Setting | entity.types |
Required | No |
Default | All Entities |
Choose which entities you would like to return. All entity types are returned by default.
If you supply an entity type that does not exist, it will be ignored.
The list of entities that can be extracted differs by language. For a full list of entity types by languages, see Entities.
NOTE: If you configured custom entity, then those entity type names can also be included in this setting.
body = {
"features": {
"entities": True,
},
"settings": {
"entity.types": ["PERSON", "ORG"]
},
"text": "the text"
}
response = requests.post(url, headers=headers, json=body)
PII
Setting | pii.types |
Required | No |
Default | All PII Types |
Choose which PII types you would like to return.
If you supply a PII type that does not exist, it will be ignored.
For a full list of PII type names, see PII
NOTE: If you configured custom PII analysis, then those PII type names can also be included in this setting.
body = {
"features": {
"pii": True,
},
"settings": {
"pii.proximity": ["GENERAL_EMAIL", "GENERAL_PERSON"],
},
"text": "the text"
}
response = requests.post(url, headers=headers, json=body)
Setting | pii.proximity |
Required | No |
Default | 100 |
If performing PII analysis, PII patterns that contain proximity rules (i.e. pattern near a keyword) default to a proximity of 100 characters.
You can change this default using the pii.proximity setting.
body = {
"features": {
"pii": True
},
"settings": {
"pii.proximity": 200
}
"text": "the text"
}
response = requests.post(url, headers=headers, json=body)
Setting | pii.TYPE_NAME.proximity |
Required | No |
Default | 100 |
If performing PII analysis, PII patterns that contain proximity rules (i.e. pattern near a keyword) default to a proximity of 100 characters.
You can change this default for a specific PII type using the pii.TYPE_NAME.proximity setting.
For a full list of PII type names, see PII
NOTE: If you configured custom PII analysis, then those PII type names can also be included in this setting.
body = {
"features": {
"pii": True
},
"settings": {
"pii.GENERAL_PAYMENT_CARD.proximity": 200,
"pii.GENERAL_SWIFT_CODE.proximity": 200
},
"text": "the text"
}
response = requests.post(url, headers=headers, json=body)
Keyword
Setting | keyword.max.results |
Required | No |
Default | 5 |
If using they keyword analyzer, the default number of keywords returned is 5.
It's possible to change this value using the keyword.max.results setting.
body = {
"features": {
"keyword": True
},
"settings": {
"keyword.max.results": 10
},
"text": "the text"
}
response = requests.post(url, headers=headers, json=body)
Setting | keyword.max.words |
Required | No |
Default | 4 |
If using they keyword analyzer, keywords are only returned if the number of words in the keyword is 4 or less.
It's possible to change this value using the keyword.max.words setting.
body = {
"features": {
"keyword": True
},
"settings": {
"keyword.max.words": 2
},
"text": "the text"
}
response = requests.post(url, headers=headers, json=body)
Summary
Setting | summary.max.sentences |
Required | No |
Default | 3 |
If using they summary analyzer, the default number of sentences returned is 3.
It's possible to change this value using the summary.max.sentences setting.
body = {
"features": {
"summary": True
},
"settings": {
"summary.max.sentences": 5
},
"text": "the text"
}
response = requests.post(url, headers=headers, json=body)
Setting | diagnostics |
Required | No |
Default | False |
Diagnostics information can be returned with each request. Diagnostics information includes timings for various analyzers and may also include some warnings.
body = {
"features": {
"entities": True,
"pii": True,
"sentiment": True,
"keyword": False,
"summary": False
},
"text": "the text",
"settings": {
"diagnostics": True
}
}
response = requests.post(url, headers=headers, json=body)