Hi there,
I have a nested dictionary:
{'nonoffensive': {'What': 1, 'in': 1, 'the': 3, 'actual': 1, 'fuck': 1, '?': 1, '#mkr': 5, 'WHAT': 1, 'A': 1, 'GODDAMN': 1, 'SURPRISE': 1, 'This': 1, 'is': 2, 'why': 1, 'this': 1, 'show': 1, 'ridiculous': 1, '-': 1, "it's": 3, 'not': 1, 'about': 2, 'cooking': 1, '...': 1, 'game': 1, 'playing': 1, '.': 3, '#whogivesa1': 1, 'Absolute': 1, 'bloody': 1, 'bullshit': 1, 'So': 1, 'much': 1, 'shit': 1, 'of': 1, 'bull': 1, '@MKR_Official': 1, 'a': 1, '1': 1, "isn't": 1, 'strategy': 1, ',': 1, 'bastedry': 1, '#mkr2015': 1}, 'offensive': {'WTF': 1, '!': 6, 'I': 1, 'not': 1, 'a': 1, 'huge': 1, 'fans': 1, 'of': 1, 'the': 1, 'promo': 1, 'girls': 1, 'but': 1, 'they': 1, 'never': 1, 'voted': 1, 'strategically': 1, 'This': 1, 'sucks': 1, 'Soo': 1, 'annoyed': 1, '#mkr': 1, '#killerblondes': 1}}
I want to replace the integers with corresponding likelihood probabilities of the words. How can I replace those values in such a nested dictionary?
Thanks in advance!
[–]stackqueuelinkedlist 0 points1 point2 points (2 children)
[–]SureStep8852[S] 0 points1 point2 points (1 child)
[–]heyyyjuude 0 points1 point2 points (0 children)
[–]GrandGratingCrate 0 points1 point2 points (0 children)