tagger property
result.match_info.rules.tagger
is an array containing the results of tagging.
Each array item has the following properties:
Property | Description |
---|---|
level |
Tag level |
tags |
Tag instances |
tags
is an array. Its items have the following properties:
Property | Description |
---|---|
tag |
Tag name |
syncon |
Tag syncon associated during its declaration |
level |
Not used |
value |
Tag instance |
pos |
Tag's first word position |
len |
Length of the tag instance |
token_begin |
Zero-based starting token index |
token_end |
Zero-based ending token index |
rules |
Tagging rule ID |
gt |
Grammar type associated to the syncon specified for the tag |
rule_details |
Tagging rule details |
rule_details
is an array. Its items have the following properties:
Property | Description |
---|---|
id |
Tagging rule ID |
label |
Tagging rule label |
For example, considering this tag declaration:
TAGS
{
@RAINBOW_COLORS:100001052
}
and this tagging rule:
SCOPE SENTENCE
{
TAGGER[myTaggingRule](9000)
{
@RAINBOW_COLORS[KEYWORD("red", "orange", "yellow", "green", "blue", "indigo", "violet")]
}
}
applied to this text:
The colors of the rainbow are: red, green, blue, yellow, orange, indigo, violet.
the tagger
property has the following JSON serialization:
"tagger": [
{
"level": 9000,
"tags": [
{
"tag": "RAINBOW_COLORS",
"syncon": 100001052,
"level": 0,
"value": "blue",
"pos": 43,
"len": 4,
"token_begin": 11,
"token_end": 11,
"rules": [
0
],
"gt": "ENT",
"rule_details": [
{
"id": 0,
"label": "myTaggingRule"
}
]
},
{
"tag": "RAINBOW_COLORS",
"syncon": 100001052,
"level": 0,
"value": "green",
"pos": 36,
"len": 5,
"token_begin": 9,
"token_end": 9,
"rules": [
0
],
"gt": "ENT",
"rule_details": [
{
"id": 0,
"label": "myTaggingRule"
}
]
},
{
"tag": "RAINBOW_COLORS",
"syncon": 100001052,
"level": 0,
"value": "indigo",
"pos": 65,
"len": 6,
"token_begin": 17,
"token_end": 17,
"rules": [
0
],
"gt": "ENT",
"rule_details": [
{
"id": 0,
"label": "myTaggingRule"
}
]
},
{
"tag": "RAINBOW_COLORS",
"syncon": 100001052,
"level": 0,
"value": "orange",
"pos": 57,
"len": 6,
"token_begin": 15,
"token_end": 15,
"rules": [
0
],
"gt": "ENT",
"rule_details": [
{
"id": 0,
"label": "myTaggingRule"
}
]
},
{
"tag": "RAINBOW_COLORS",
"syncon": 100001052,
"level": 0,
"value": "red",
"pos": 31,
"len": 3,
"token_begin": 7,
"token_end": 7,
"rules": [
0
],
"gt": "ENT",
"rule_details": [
{
"id": 0,
"label": "myTaggingRule"
}
]
},
{
"tag": "RAINBOW_COLORS",
"syncon": 100001052,
"level": 0,
"value": "violet",
"pos": 73,
"len": 6,
"token_begin": 19,
"token_end": 19,
"rules": [
0
],
"gt": "ENT",
"rule_details": [
{
"id": 0,
"label": "myTaggingRule"
}
]
},
{
"tag": "RAINBOW_COLORS",
"syncon": 100001052,
"level": 0,
"value": "yellow",
"pos": 49,
"len": 6,
"token_begin": 13,
"token_end": 13,
"rules": [
0
],
"gt": "ENT",
"rule_details": [
{
"id": 0,
"label": "myTaggingRule"
}
]
}
]
}
]
}