Subject: Flattening Annotations?


Hi all,

Is there a quick way to remove all annotations of specific type if they are
embedded in a wider annotation of the same type, for example:

<NP> ... <NP> ... <NP>...</NP></NP></NP>

needs to be flattened to just outermost

<NP> ...    ...  ... </NP>

At the moment I am doing it with the following (which seems to work and is
said to be slow)

NP  { PARTOFNEQ(NP)   -> UNMARK(NP)};

Best regards,
Nikolai