Added logic to handle semantic information of the tags.