NLP Engine Service
In the existing version of the chatbot, for PGR complaint creation feature, the user has to select his/her city from a drop-down menu by visiting the mseva website. This significantly reduces user convenience as the user is required to constantly switch pages.
To overcome the above inconvenience, nlp-engine service is used. The service has an algorithm that uses fuzzy matching and pattern recognition to recognise the city provided by the user as input. Based on the user input, the cities having the highest match ratio with the input are being returned as the output list. A list comprising all the city names in English, Punjabi and Hindi was used as a reference tool for this service.
Before you proceed with the documentation, make sure the following pre-requisites are met -
- Python.
- egov-mdms service is running and all the data related to the service are added in the mdms repository.
- egov-running service is running.
- Provides city fuzzy search feature which returns the list of cities having the highest match ratio with the input.
- City fuzzy search can support input data in English, Hindi and Punjabi language.
- Provides locality fuzzy search feature which returns the list of localities having the highest match ratio with the input.
Environment Variables | Description |
---|---|
MDMS_MODULE_NAME | Contains the module name of mdms required for nlp-engine. |
CITY_MASTER | Contains the file name of mdms master file which contains the city names in various locale. |
CITY_LOCALE_MASTER | Contains the file name of mdms master file which contains the tenantid of the cities present in CityNames.json mdms file |
STATE_LEVEL_TENANTID | Contains the state level tenantid |





- 1.
- 2.Deploy the latest version of nlp-engine service.
- 3.Whitelist the city and locality fuzzy search API’s.
The nlp-engine service is used to locate the user city and locality by using fuzzy string matching and pattern recognition.
- Currently integrated into the chatbots for locating user city and locality for complaint creation use case.
- This feature functionality can be extended for the other entities and can be used for a fuzzy search of those different entities.
- 1.To integrate, the host of nlp-engine service module should be overwritten in the helm chart.
- 2.
/nlp-engine/fuzzy/city
should be added as the fuzzy search endpoint for a city search. - 3.
/nlp-engine/fuzzy/locality
should be added as the fuzzy search endpoint for locality search.
Title |
---|
(Note: All the APIs are in the same postman collection therefore same link is added in each row)
Last modified 5mo ago