0

I have a nasted dictionary that contains position and tag with score for every tag. I need to filter out only 4 highest values for every position dict [i][t]. if i make

for elem in sorted(forward[i].values(), key=float)[0:3]:

dictionary looks líke now:

 dict = {o[NN:0,56;V:0,44;Adj: 0,35.....],1[NN:0,53;V:0,34;Adj: 0,37.....]...}

then I theoretically know the best 4 keys, but i dont know how to know here which tag is that then. To be able to save them in new dictionary... Do you havean idea? Thanks

Nastja Kr
  • 169
  • 2
  • 13

0 Answers0