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

...

  • Parameter
    summaryList of tag names to normalize on the output

...

  • namenormalizeTags
    typestring array
    requiredtrue
  • Parameter
    summaryDefaults to empty. If non empty, list of tag names to apply the replace pattern to

...

  • namereplaceTags
    typestring array
  • Parameter
    summary
  • Required when replaceTags is set. The pattern expects

...

  • a %tag

...

  • and/

...

  • or %value. Pattern will replace the appearance of tags from replaceTags with the pattern defined

...

  • namereplacePattern
    typestring array
    requiredtrue
  • Parameter
    summary
  • Used to separate tokens

...

  • default" "
    nameseparator
    typestring array
  • Parameter
    summaryIf 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
  • Parameter
    summary

...

  • Ignore matches with tags specified in the ignoreTags list

...

  • nameignoreTags
    typestring array
  • Parameter
    summary
  • Include matches with tags specified in the anyWithTags list

...

...

  • name

...

  • anyWithTags

...

  • type

...

  • string array

...



Code Block

...

boundaryFlagsTEXT_BLOCK_SPLIT

...

,

...

SENTENCE_SPLIT

...

languagejs
"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
languagetext
themeFadeToGrey
{#} {measurement} of <START:ingredient> Water <END>
use {#} {measurement} of <START:ingredient> FLOUR <END>