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 -
- 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.
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.
/nlp-engine/fuzzy/cityshould be added as the fuzzy search endpoint for a city search.
/nlp-engine/fuzzy/localityshould be added as the fuzzy search endpoint for locality search.
(Note: All the API’s are in the same postman collection therefore same link is added in each row)