Custom batch pre-translationfuction skipping segment or missing result

When I develop a plugin use the Batch task API ,I custom a batch pre-translation function,but when I send the source text to translation engine to ask for the result ,The result is not inserted into the corresponding segment or the result is missing.  I want to know the reason.