...
...
...
Operates On: Every lexical Item in the graph.
Include Page |
---|
| Generic Configuration Parameters |
---|
| Generic Configuration Parameters |
---|
|
...
Configuration Parameters | | Generic Producer |
---|
|
...
...
Parameter |
---|
summary | List of tag names to normalize on the output |
---|
name | normalizeTags |
---|
type | string array |
---|
required | true |
---|
|
Defaults to empty. If non empty, |
|
...
language | js |
---|
theme | Eclipse |
---|
title | Example Configuration |
---|
...
list of tag names to apply the replace pattern to | name | replaceTags |
---|
type | string 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 |
---|
name | replacePattern |
---|
type | string array |
---|
required | true |
---|
|
Parameter |
---|
summary | Used to separate tokens |
---|
default | " " |
---|
name | separator |
---|
type | string array |
---|
|
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. |
---|
name | preferFlags |
---|
type | string array |
---|
|
Parameter |
---|
summary | Ignore matches with tags specified in the ignoreTags list |
---|
name | ignoreTags |
---|
type | string array |
---|
|
Parameter |
---|
summary | Include matches with tags specified in the anyWithTags list |
---|
name | anyWithTags |
---|
type | string array |
---|
|
Code Block |
---|
boundaryFlags | TEXT_BLOCK_SPLIT, SENTENCE_SPLIT |
---|
language | js |
---|
|
"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 |
---|
language | text |
---|
theme | FadeToGrey |
---|
|
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]-----^
^-[{#}]-^-[{ |
...
...
...
-[xx]--^-[{measurement}]-^ ^----[flour]-----^ |
...
language | js |
---|
theme | FadeToGrey |
---|
...
...
...
...
...
...
...
...
...
...
...
...
or the following (if onlyEntities = false):
...
language | js |
---|
theme | FadeToGrey |
---|
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
the stage will produce the following output:
Code Block |
---|
language | text |
---|
theme | FadeToGrey |
---|
|
{#} {measurement} of <START:ingredient> Water <END>
use {#} {measurement} of <START:ingredient> FLOUR <END> |