Details
-
Improvement
-
Resolution: Unresolved
-
None
-
None
-
High
-
TermTagger: Send text to tag without any markup to correctly tag texts with trackchanges-tags in it
-
Empty show more show less
Description
The TermTagger has Problems properly tagging text with tags in it. Currently, we send the segment-content only with terminology- and <del>-tags removed. This should be changed so:
- The text is sent without any tags and the del-tags and their content removed
- this creates problems when applying the found text-indices because of the removed content
- which can be solved by memorizing the <del> text indices and shifting the found terminology-indices accordingly
- To solve this, a new base-class should be implemented, that wraps a editor_Segment_FieldTags-object, memorizes the <del>-positions, retrieves the cleaned text (without <del>-contents, this API already exists in the field-tags) and adds term-tags to the wrapped field-tags by text-indices (which must be retrieved from the termtagger-result) and shifts them automatically when adding these tags.
- This base-class should also be used in the SpellCheck Code since the spellcheck also should not check deleted areas
- Additional TODO: It seems in MittagQI\Translate5\Plugins\TermTagger\Processor\Tagger, the term-tags are removed twice when preparing the contents to send, resolve...
- Additional TODO: trackchanges-tag-removal is done in MittagQI\Translate5\Plugins\TermTagger\Service but it should be in the Tagger (Service handling only Request, not processing)