diff --git a/nlp-engine/application.properties b/nlp-engine/application.properties new file mode 100644 index 000000000..c8b434e58 --- /dev/null +++ b/nlp-engine/application.properties @@ -0,0 +1,15 @@ +########### MDMS SERVICE ##################### + +MDMS_HOST = 'http://egov-mdms-service.egov:8080/' +MDMS_SEARCH_URL = 'egov-mdms-service/v1/_search' +MDMS_MODULE_NAME = 'Chatbot' +CITY_MASTER = 'CityNames' +CITY_LOCALE_MASTER = 'CityLocaleMasterData' + +########### EGOV-LOCATION SERVICE ############### +EGOV_LOCATION_HOST = 'http://egov-location.egov:8080/' +EGOV_LOCATION_SEARCH_URL = 'egov-location/location/v11/boundarys/_search' + + +STATE_LEVEL_TENANTID = 'pb' +DEFAULT_LOCALISATION_TENANT = 'pb' \ No newline at end of file diff --git a/nlp-engine/requirements.txt b/nlp-engine/requirements.txt index df37f65e7..ac1ad1755 100644 --- a/nlp-engine/requirements.txt +++ b/nlp-engine/requirements.txt @@ -29,4 +29,4 @@ six==1.15.0 sniffio==1.1.0 tqdm==4.48.2 urllib3==1.25.10 -Werkzeug==1.0.1 +Werkzeug==1.0.1 \ No newline at end of file diff --git a/nlp-engine/src/CitySearch.py b/nlp-engine/src/CitySearch.py index d26ab1755..33a294d1f 100644 --- a/nlp-engine/src/CitySearch.py +++ b/nlp-engine/src/CitySearch.py @@ -6,6 +6,7 @@ import nltk import requests import json +import os translator= Translator() @@ -13,7 +14,7 @@ url = MDMS_HOST + MDMS_SEARCH_URL data = {"RequestInfo":{},"MdmsCriteria":{"tenantId": "","moduleDetails":[{"moduleName":"", "masterDetails":[]}]}} -data["MdmsCriteria"]["tenantId"] = STATE_LEVEL_TENANTID +data["MdmsCriteria"]["tenantId"] = os.environ.get('DEFAULT_LOCALISATION_TENANT') data["MdmsCriteria"]["moduleDetails"][0]["moduleName"] = MDMS_MODULE_NAME masterDeatils = {"name":CITY_MASTER} data["MdmsCriteria"]["moduleDetails"][0]["masterDetails"].append(masterDeatils) diff --git a/nlp-engine/src/Config.py b/nlp-engine/src/Config.py index ae996a1c4..c8b434e58 100644 --- a/nlp-engine/src/Config.py +++ b/nlp-engine/src/Config.py @@ -11,4 +11,5 @@ EGOV_LOCATION_SEARCH_URL = 'egov-location/location/v11/boundarys/_search' -STATE_LEVEL_TENANTID = 'pb' \ No newline at end of file +STATE_LEVEL_TENANTID = 'pb' +DEFAULT_LOCALISATION_TENANT = 'pb' \ No newline at end of file