For example the sentence "I saw yesterday the man in the park with a telescope" has 5 different semantic interpretations based on the way the prepositional phrases "in the park" and "with the telescope" are attached: I saw yesterday [the man [in  The problem can be viewed as a decision of attaching a prepositional phrase (PP) to one of the preceding head nouns or verbs.
n1-p-distance = log 10 (1 + log 10 d n1−p ).