#!/usr/bin/python3 import requests, json def do_lemmatize(data): response = requests.post(url = 'http://127.0.0.1:10002/lemmatize', 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))