Vulavula NER
Vulavula NER is our service for multilingual Named Entity Recognition.
Entity Recognition
POST
https://vulavula-services.lelapa.ai/api/v1/entity_recognition/process.
The Named Entity Recognition (NER) endpoint analyzes the provided text and identifies named entities such as persons, locations, and more. Each request can handle up to 2,000 tokens, with 180 tokens recommended for optimal performance.
BODY PARAMS
encoded_text string required.
This parameter represents the text input that will be analyzed for named entities. It is required for the endpoint to function properly. The encoded_text
should be provided as a string and contains the text to be processed by the Named Entity Recognition (NER) model. The text may include any language and should ideally be encoded in a format suitable for NER processing, ensuring accurate entity detection.
HEADERS
X-CLIENT-TOKEN string required.
Represents the authentication token required for accessing the API. This header ensures that only authorized clients can make requests to the endpoint.
EXAMPLES
- Python SDK
- Python HTTP
- Curl
pdm add vulavula
from vulavula import VulavulaClient
client = VulavulaClient("<INSERT_TOKEN>")
entity_result = client.get_entities({'encoded_text': 'President Ramaphosa gaan loop by Emfuleni Municipality.'})
print("Entity Recognition Output:", entity_result)
# Endpoint URL
url = 'https://vulavula-services.lelapa.ai/api/v1/entity_recognition/process'
# Headers
headers = {
'Content-Type': 'application/json',
'X-CLIENT-TOKEN': '<INSERT_TOKEN>' # Replace '<INSERT_TOKEN>' with your actual client token
}
# Request body
data = {
"encoded_text": "President Ramaphosa gaan loop by Emfuleni Municipality"
}
# Sending POST request
response = requests.post(url, headers=headers, json=data)
# Printing response
print(response.json())
curl --request POST \
--url https://vulavula-services.lelapa.ai/api/v1/entity_recognition/process \
--header 'Content-Type: application/json' \
--header 'User-Agent: curl/7.68.0' \
--header 'X-Client-Token: <INSERT_TOKEN>' \
--data '{"encoded_text": "President Ramaphosa gaan loop by Emfuleni Municipality"}'
RESPONSES
🟢 200 OK
[
{
"entity": "person",
"word": "Ramaphosa",
"start": 10,
"end": 19
},
{
"entity": "location",
"word": "Emfuleni Municipality",
"start": 33,
"end": 54
}
]
RESPONSE BODY PARAMS
Object |
---|
entity string required. Specifies the type of the recognized entity (e.g., person, location). |
word string required. Contains the text representing the recognized entity. |
start number required. Indicates the starting index of the recognized entity in the input text. |
end number required. Indicates the ending index of the recognized entity in the input text. |