This is a simple server that maintains a running instance of the
Sanskrit Sandhi and Compound Splitter.
It has one endpoint (/api/split/
) which directly queries the model.
Input must already be in valid IAST.
See Swagger Doc for official API documentation.
If you have been redirected here from
the old PythonAnywhere page,
please update your bookmark.
Example with curl
and jq
:
curl -X POST https://2018emnlp-sanskrit-splitter-server.dharma.cl/api/split/ \
-H "Content-Type: application/json" \
-d '{"input_text": "tava karakamalasthāṃ sphāṭikīmakṣamālāṃ , nakhakiraṇavibhinnāṃ dāḍimībījabuddhyā |"}' | jq
Example with Python
:
python3 -c "import requests, json; url='https://2018emnlp-sanskrit-splitter-server.dharma.cl/api/split/'; payload={'input_text': 'tava karakamalasthāṃ sphāṭikīmakṣamālāṃ , nakhakiraṇavibhinnāṃ dāḍimībījabuddhyā |'}; response=requests.post(url, json=payload); print(json.dumps(response.json(), indent=4, ensure_ascii=False)) if response.status_code == 200 else print(f'Error: {response.status_code}, {response.text}')"
The primary purpose of this server is to serve as a backend for Skrutable.
Limitations of the 2018 EMNLP model: