Details
-
Improvement
-
Resolution: Fixed
-
None
-
Critical
-
Enabled batch-processing of segments in the Spellcheck during import.
-
Empty show more show less
Description
Currently, the Spellcheck during import ( MittagQI\Translate5\Plugins\SpellCheck\SegmentProcessor ) requests the languagetool for each segment. The Feature should implement the sending of batches to the Spellchecker as already defined in
MittagQI\Translate5\Plugins\SpellCheck\Segment\Configuration::OPERATION_BATCH_SIZE
This should be tried to achieve by using the "data" parameter instead of "text" of the languagetool API:
https://languagetool.org/http-api/
As a fallback solution, it could be tried to simply concatenate the segments with a blank ant to calculate the result coordinates back to the individual segments.
One caveat to keep in mind, that maybe the amount of text being sent is limited, and maybe oversized segments still need to create their own request.