using labels to categorize document nodes