I am working on some sentence formation like this:
sentence = "PERSON is ADJECTIVE"
dictionary = {"PERSON": ["Alice", "Bob", "Carol"], "ADJECTIVE": ["cute", "intelligent"]}
I would now need all possible combinations to form this sentence from the dictionary, like:
Alice is cute
Alice is intelligent
Bob is cute
Bob is intelligent
Carol is cute
Carol is intelligent
Can we also make this scale up for longer sentences?
Example:
sentence = PERSON is ADJECTIVE and is from COUNTRY
dictionary = {"PERSON": ["Alice", "Bob", "Carol"], "ADJECTIVE": ["cute", "intelligent"], "COUNTRY": ["USA", "Japan", "China", "India"]}
This again provides all possible combinations