Filter out the malformed phrases