extract text before checking grammar