README.md 1.33 KB
Newer Older
priyank's avatar
priyank committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58
# 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 MT modules run:
```
cd ilmt-api-kan-shallowparser/

sh setup.sh
```


## Steps to execute API 
```
unset PERL5LIB; . ./setup-env.sh;

perl api.pl prefork -l http://*:8585 -w 1
```

It will make the API in listening form.


## Steps to test API:
a) On browser run following URL:
```
http://<YOUR_IP>:8585/kan/hin/translate?data="ಇಂಡಿಯಾದ ವ್ಯವಸ್ಥಾಪಕ ನಿರ್ದೇ"&pretty=true
```

b) here replace <YOUR_IP> with your IP address.

c) For testing API with curl run the following:
```
curl --noproxy '*' http://localhost:8585/kan/hin/translate --data data="ಇಂಡಿಯಾದ ವ್ಯವಸ್ಥಾಪಕ ನಿರ್ದೇ"
```
d) For MT with UI run following command:
```
http://<YOUR_IP>:8585/
```

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 


## To check which ports are allotted to different services, run following command:
```
find ./ | grep 'run/.*_'
```