Programmer_n
08-28-2016, 06:22 PM
This is tricky.
Situation: I have a code that has repeating elements that I need to clean using VBA.
Example:
In the Parse tree below, the elements of parse tree (like S, DT, NN)and each subsequent occurrence needs to be incremented by one, automatically.
Input:
(S
(NP (DT ) (NN ))
(VP (VBZ )
(NN (DT )))
(. .)))
Output expected
(S
(NP (DT ) (NN ))
(VP (VBZ )
(NN1 (DT1 )))
(. .)))
If another DT or NN occurs it is identified as DT2 or NN2.
Situation: I have a code that has repeating elements that I need to clean using VBA.
Example:
In the Parse tree below, the elements of parse tree (like S, DT, NN)and each subsequent occurrence needs to be incremented by one, automatically.
Input:
(S
(NP (DT ) (NN ))
(VP (VBZ )
(NN (DT )))
(. .)))
Output expected
(S
(NP (DT ) (NN ))
(VP (VBZ )
(NN1 (DT1 )))
(. .)))
If another DT or NN occurs it is identified as DT2 or NN2.