This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import requests | |
result = requests.get('http://lindat.mff.cuni.cz/services/morphodita/api/tag', params={ | |
'data': 'Zeman: Chci být znovu prezidentem a budu kandidovat', | |
'output': 'json', | |
'convert_tagset': 'strip_lemma_comment', | |
}).json() | |
def is_noun(tag): | |
return tag.startswith('NN') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from __future__ import print_function | |
import time | |
import sys | |
position = 0 | |
size = 10 | |
direction = 1 | |
while True: | |
print("\r[{}={}]".format(" " * position, " " * (size - position), position), end='') |