# load data filename = 'ner/annotations.jsonl' file = open(filename, 'rt', encoding='utf-8') text = file.read() # count entity PER countPER = text.count('PER') countLOC = text.count('LOC') countORG = text.count('ORG') countMISC = text.count('MISC') print('Počet anotovaných entít typu PER:', countPER,'\n', 'Počet anotovaných entít typu LOC:', countLOC,'\n', 'Počet anotovaných entít typu ORG:', countORG,'\n', 'Počet anotovaných entít typu MISC:', countMISC,'\n')