Consider these major parts of speech –
N V Ad Adv Art Prep Conj
7P2 i.e. 42 such permutations.
For each pair, write the general, elaborate meaning.
E.g. (Proper N) + (V) – John called
Such a meaning of this fragment (pair) is –
‘A person named N did the action of V’ – ‘A person named John did the action of calling’
Other meanings could be with replacing the words (N and V) with their synonyms / (and more importantly) meanings from the dictionary.
These general meaning elaborations will have to be hand-typed. Thus is generated a database of the pairs and their general, elaborate meanings.
Now, given a sentence, take all the pairs of successive words in it. The program will then generate their meanings from this database. The resultant set of sentences would, to a great extent, be the cumulative meaning of the sentence. The set will also contain the various different interpretations of the sentence (due to the synonyms / (and more importantly) meanings of the words of the sentence, from the dictionary).