def Interpretation_is(sentence):
print(sentence.split())
print(sentence.split()[0])
there = 'distant place'
he = 'gender identity'
if 'place' in setence.split()[0]:
print(sentence.replace('is','exists'))
if 'identity' in sentence.split()[0]:
print(sentence.replace('is','equal to'))
Interpretation_is('there is a woman')
Interpretation_is('he is a boy')
Above Code rephrase the given sentence specifically regarding the meaning of 'is'
Since is only take care of its prior word, subject, I only take the sentence.split()[0] and evaluate its meaning again.
Question is, if I take sentence.split()[0], I eventually get 'there' as a string, but once again I want to let python reads it as a variable which consist of another tuple or set of strings, such as there = 'distant place or location' and check its whether there exists string 'place or location' in it.
Additional Question 1) In an advanced way, I want make up some word group which falls into the group of so called place, such as place = {there, here} then let the program check whether sentence.split()[0] actually falls in this group.
How could I do this?
Additional Question 2) When I refer a word with its meaning, such as is = {exist, parity}. If I note it following mathematical notation, there's no 'order' given, however if I make it as a list or tuple, such as is = (exist, parity) or is = [exist, parity] there inevitably 'order' is given.
Which data structure in python doesn't hold the 'order' in it?
Any recommendation or reference that I can check?