I have dictonary named as Entity which look like this:
Entity = {'ORG': 'ABC','PERSON': 'Ankit','ORDINAL': '150th','DATE': 'quarterly', 'MONEY': 'dollars'}
Now I have to create other dictionary which will contain below value according to condition.
Class = {'Signal':'<Condition>'}
The condition is:
If Entity key consists of ORG and PERSON then in Class dictionary value "Medium" should be updated.
If Entity key consists of ORG, PERSON, and MONEY then in Class dictionary value "Strong" should be updated.
If Entity key doesn't consist of above keys then in Class dictionary value "Weak" should be updated.
How should I make the condition for the above problem?
I want an output in Class dictionary like below,
If in Entity dictionary there are ORG and PERSIN keys then Class dictionary should be like,
Class = {'Signal' : 'Medium'}