Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Excerpt

The Markup Producer Stage will produce strings of TEXT_BLOCK with normalized tags based on the graph's path with highest confidence.


Operates On:  Every lexical Item in the graph.

Include Page
Generic Configuration Parameters
Generic Configuration Parameters


Include Page
Generic Producer Configuration Parameters
Generic Producer Configuration Parameters

Configuration Parameters

  • normalizeTags (String array) -
    Parameter
    summary
    List of tag names to normalize on the output
    .
    namenormalizeTags
    typestring array
    requiredtrue
  • replaceTags (String array, optional) -
    Parameter
    summary
    Defaults to empty. If non empty, list of tag names to apply the replace pattern to
    .
    namereplaceTags
    typestring array
  • replacePattern (String, optional) -
    Parameter
    summary
    Required when replaceTags is set. The pattern expects
    a %tag
     and
    and/
    or 
    or %value. Pattern will replace the appearance of tags from replaceTags with the pattern defined
    .separator (String, optional) - Default to single whitespace.
    namereplacePattern
    typestring array
    requiredtrue
  • Parameter
    summaryUsed to separate tokens
    default" "
    nameseparator
    typestring array
  • .preferFlags (String array, optional) - Defaults to empty.
    Parameter
    summary
    If non empty, when a token has multiple flags and one is in the preferFlags, it will take precedence over other flags (to use the value of the token from that variation). That is, LOWERED flag over original text version.
    namepreferFlags
    typestring array
  • ignoreTags (string array, optional) -
    Parameter
    summary
    Ignore matches with tags specified in the ignoreTags list
    .anyWithTags (string array, optional) -
    nameignoreTags
    typestring array
  • Parameter
    summary Include matches with tags specified in the anyWithTags list
    .
code
  • name
language
  • anyWithTags
js
  • typestring array


{ "type": "MarkupProducerStage", "name": "MarkupProducer", "boundaryFlags": [ "" "
Saga_config_stage
themeEclipse
titleExample Configuration
boundaryFlags
TEXT_BLOCK_SPLIT
,
SENTENCE_SPLIT
"
  ]name": "MarkupProducer",
  "normalizeTags": ["#", "measurement"],
  "replaceTags": ["ingredient"],
  "replacePattern": "<START:%tag> %value <END>",
  "separator": " "
}

Example Output

If you have a text block like the following:

Code Block
languagetext
themeFadeToGrey
V-----------------------------------[300 ml of Water. Use XX g of FLOUR]------------------------------------V 
^----------------[300 ml of Water]----------------V-------------------[Use XX g of FLOUR]-------------------^ 
^-[300]-V------[ml]-------V-[of]-V----[Water]-----^-[Use]-V-[XX]--V-------[g]-------V-[of]-V----[FLOUR]-----^ 
^-[{#}]-^-[{measurement}]-^      ^----[water]-----^-[use]-^-[xx]--^-[{measurement}]-^      ^----[flour]-----^ 
                                                          ^-[{#}]-^                        ^-[{ingredient}]-^ 
                                                                                           ^-[{ingredient}]-^ 
                                 ^-[{ingredient}]-^ 
                                 ^-[{ingredient}]-^ 

the stage will produce the following output:

Code Block
themeFadeToGrey
{#} {measurement} of <START:ingredient> Water <END>
use {#} {measurement} of <START:ingredient> FLOUR <END>