import rnc
ru = MainCorpus({'корпус': {'gramm': {'case': 'acc', 'num': 'sg'}}}, 2)
ru.request_examples()
module 'asyncio' has no attribute 'run'
{'env': 'alpha', 'api': '1.0', 'lang': 'en', 'dpp': 5, 'spd': 10, 'text': 'lexgramm', 'out': 'normal', 'sort': 'i_grtagging', 'nodia': 1, 'lex1': 'корпус', 'gramm1': '%28acc%29%2C%28sg%29', 'mode': 'main'}
res = []
for val in params.values():
if isinstance(val, (str, int)):
val = [str(val)]
if isinstance(val, list):
val = [i.replace(':', '%3A') for i in val]
item = join_inside_symbol.join(val)
res += [item]
else:
msg = "One should give to tags only str, list or int"
logger.error(msg)
raise ValueError(msg)
return ' '.join(res)
import re
import string
def check_valid(s):
for char in s:
if not re.search(r'[А-яA-z]', char) and char not in string.punctuation and char not in string.whitespace:
print('Невалидный символ', char)
return
print('Валидная строка')
check_valid('Привет, World')
check_valid('Прив下ет, World')