#!/usr/bin/python3 import requests, json local = False if local: port = 9001 else: port = 10002 def do_lemmatize(data): response = requests.post(url = 'http://127.0.0.1:%d/lemmatize' % port, json = data) return json.loads(response.text) data = {'language':'pl', 'sentences':['witajcie w naszej bajce', 'zażółć gęślą jaźń aaronową','drugie zdanie testowe.', 'tę zarezerwowano dla mclarena gt supersamochód który zaprezentowano oficjalnie ne_number maja już przyjechał do polski co to w ogóle za auto']} print('pl') print(do_lemmatize(data)) data = {'language':'en', 'sentences':['this is just one of the sentences for testing']} print('en') print(do_lemmatize(data))