function to get comment vector