Similarity has several uses - it can be used to catch
We can have ABC and DE, which could be
|(ABC and D) E|
|A (BC and D) E|
|AB (C and D) E|
|ABC and DE|
Similarity can be used to figure out which is meant.
We can have
A of B and CD
Apart from where we can have an Internal And, this can be
|(A of B) and CD|
|A of (B and CD)|
It can be more complicated -
A shall B C of D from E and F to G, where F can be a noun or verb.
That is, the And can refer to the object of the previous preposition, or the one before that, or the object of the verb, or be in parallel with the verb.
Similarity relies on the modelling to make it clear which word goes with which. The effectiveness of th emodelling relies on some of the structure already being built - in the sentence A of B and C, comparing C with A may give a quite different answer to comparing C with A of B. A good example is
Part of A and B
Comparing B with "part" will give a weak result - "part" by itself is a general term.