new implementation for sentence tagging