Configuration of Standard Highlighting Transformers

eccenca Documentation

Configuration of Standard Highlighting Transformers

eccenca CE supports and ships these Highlighting Transformers by default.

MaxTextLength Highlighting Transformer

The MaxTextLenght transformer returns text snippet with length limited by specified value.

Parameter Name Parameter Description Value type Constraint Default value
MaxLength Max length of returned text structure. Integer Required  
Example
<HighlightingResult Name="">
    <HighlightingResultField FieldNo="5" Name="Content" xsi:type="HLTextField">
        <HighlightingTransformer Name="urn:MaxTextLength">
            <ParameterSet xmlns="http://www.brox.de/ParameterSet">
                <Parameter Name="MaxLength" xsi:type="Integer">
                    <Value>500</Value>
                </Parameter>
            </ParameterSet>
        </HighlightingTransformer>
        <HighlightingParameter xmlns="http://www.anyfinder.de/DataDictionary/Configuration/TextHighlighting"/>
    </HighlightingResultField>
</HighlightingResult>

Sample result:

Sentence Highlighting Transformer

The sentence highlighting transformer is able to highlight information taking sentence boundaries into credit.

Parameter Name Parameter Description Value type Constraint Default value
MaxLength Max length of returned text structure. Integer Optional  
MaxHLElements Max number of highlighted elements.The returned snippet will be cut off at the start of the MaxHLElement'ths occurence (counting any, not distinct occurences).
This value can be set to smth. like 999. There is some performance overhead involved in injecting the highlighting markup into the string, but that is relativly small compared to the highlighting time itself.
Integer Optional  
MaxSucceedingCharacters Max succeeding characters in after of an highlighted element. Integer Optional 30
SucceedingCharacters Succeeding characters in after of an highlighted element. String Optional  
SortAlgorithm Sort algorithm for output. Enumeration (Score,Occurrence) Optional Occurrence
TextHandling What to return if no highlighted elements exist
Enumeration
  • ReturnFullText
    returns the full text up to MaxLength
  • ReturnSnipplet
    same a ReturnFullText
  • ReturnNoText
    returns an empty string
Optional ReturnFullText
Example
<HighlightingResult Name="">
    <HighlightingResultField FieldNo="5" Name="Content" xsi:type="HLTextField">
        <HighlightingTransformer Name="urn:Sentence">
            <ParameterSet xmlns="http://www.brox.de/ParameterSet">
                <Parameter Name="MaxLength" xsi:type="Integer">
                    <Value>500</Value>
                </Parameter>
                <Parameter Name="MaxHLElements" xsi:type="Integer">
                    <Value>50</Value>
                </Parameter>
                <Parameter Name="MaxSucceedingCharacters" xsi:type="Integer">
                    <Value>50</Value>
                </Parameter>
                <Parameter Name="SucceedingCharacters" xsi:type="String">
                    <Value>...&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;</Value>
                </Parameter>
                <Parameter Name="SortAlgorithm" xsi:type="String">
                    <Value>Occurrence</Value>
                </Parameter>
                <Parameter Name="TextHandling" xsi:type="String">
                    <Value>ReturnSnipplet</Value>
                </Parameter>
            </ParameterSet>
        </HighlightingTransformer>
        <HighlightingParameter xmlns="http://www.anyfinder.de/DataDictionary/Configuration/TextHighlighting"/>
    </HighlightingResultField>
</HighlightingResult>

Sample result:

ComplexHLResultAggregation Highlighting Transformer

The ComplexHLResultAggregation transformer extends sentence transformer and adds some new properties.

Parameter Name Parameter Description Value type Constraint Default value
MaxLength Max length of returned text structure. Integer Optional  
MaxHLElements Max number of highlighted elements.The returned snippet will be cut off at the start of the MaxHLElement'ths occurence (counting any, not distinct occurences).
This value can be set to smth. like 999. There is some performance overhead involved in injecting the highlighting markup into the string, but that is relativly small compared to the highlighting time itself.
Integer Optional  
MaxPrecedingCharacters Max preceding characters in front of an highlighted element. Integer Optional 30
PrecedingCharacters Preceding characters in front of an highlighted element. String Optional  
MaxSucceedingCharacters Max succeeding characters in after of an highlighted element. Integer Optional 30
SucceedingCharacters Succeeding characters in after of an highlighted element. String Optional  
HLElementFilter Filter for highlighted elements containing identical text. Boolean Optional false
SortAlgorithm Sort algorithm for output. Enumeration (Score,Occurrence) Optional Occurrence
TextHandling Specify output when no text for highlighting is available Enumeration (ReturnFullText, ReturnSnipplet, ReturnNoText) Optional ReturnFullText
Example
<HighlightingResult Name="">
    <HighlightingResultField FieldNo="5" Name="Content" xsi:type="HLTextField">
        <HighlightingTransformer Name="urn:ComplexHLResultAggregation">
            <ParameterSet xmlns="http://www.brox.de/ParameterSet">
                <Parameter Name="MaxLength" xsi:type="Integer">
                    <Value>500</Value>
                </Parameter>
                <Parameter Name="MaxHLElements" xsi:type="Integer">
                    <Value>50</Value>
                </Parameter>
                <Parameter Name="MaxPrecedingCharacters" xsi:type="Integer">
                    <Value>50</Value>
                </Parameter>
                <Parameter Name="PrecedingCharacters" xsi:type="String">
                    <Value>...</Value>
                </Parameter>
                <Parameter Name="MaxSucceedingCharacters" xsi:type="Integer">
                    <Value>50</Value>
                </Parameter>
                <Parameter Name="SucceedingCharacters" xsi:type="String">
                    <Value>...&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;</Value>
                </Parameter>
                <Parameter Name="HLElementFilter" xsi:type="Boolean">
                    <Value>true</Value>
                </Parameter>
                <Parameter Name="SortAlgorithm" xsi:type="String">
                    <Value>Occurrence</Value>
                </Parameter>
                <Parameter Name="TextHandling" xsi:type="String">
                    <Value>ReturnSnipplet</Value>
                </Parameter>
            </ParameterSet>
        </HighlightingTransformer>
        <HighlightingParameter xmlns="http://www.anyfinder.de/DataDictionary/Configuration/TextHighlighting"/>
    </HighlightingResultField>
</HighlightingResult>

Sample result:

Labels

quick_result_sub quick_result_sub Delete
highlighting_transformer highlighting_transformer Delete
highlighting highlighting Delete
Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.
  1. Jul 13, 2009

    Thomas Menzel says:

    TODO each HLT should have its own page

    TODO

    • each HLT should have its own page