Replaced words with their POS tags

an bug is identified in outside/inside functions where they handle unary
rules of any form:
preTerminal - > Terminal
or
nonTerminal -> nonTerminal