# ILMT-API An API for quering ILMT Systems ## For Installation of dependencies related to Sampark refer to dependencies.txt ## For Installation of perl related dependencies run script install.sh with following command: ``` sh install.sh ``` ## Steps to install Shallowparser MT modules run: ``` cd ilmt-api-pan-shallowparser/ sh setup.sh ``` ## Steps to execute API ``` unset PERL5LIB; . ./setup-env.sh; perl api.pl prefork -l http://*:8686 -w 1 ``` It will make the API in listening form. ## Steps to test API: a) On browser run following URL: ``` http://:8686/pan/hin/translate?data="ਭਾਰਤੀ ਸੰਸਕ੍ਰਿਤੀ ਵਿੱਚ ਰਾਸ਼ੀਆਂ ਦਾ ਆਪਣਾ ਮਹੱਤਵ ਹੈ। ."&pretty=true ``` b) here replace with your IP address. c) For testing API with curl run the following: ``` curl --noproxy '*' http://localhost:8686/pan/hin/translate --data data="ਭਾਰਤੀ ਸੰਸਕ੍ਰਿਤੀ ਵਿੱਚ ਰਾਸ਼ੀਆਂ ਦਾ ਆਪਣਾ ਮਹੱਤਵ ਹੈ। ." ``` d) For Shallowparser with UI run following command: ``` http://:8686/ ``` e) Now you would see proper translation panels. ## To execute sentences using API: please update the host IP in server.json from 10.2.63.52 to your IP and run following command: ``` $python GetShallowParserOutput.py -c server.json -i input.txt ``` ## Shallowparser of Punjabi Language