Include Page | ||||
---|---|---|---|---|
|
Parameter | ||||||||
---|---|---|---|---|---|---|---|---|
|
Saga_config_stage | ||||||||
---|---|---|---|---|---|---|---|---|
| ||||||||
"patterns":"saga_provider:advanced_patterns" |
The following shows sample output from the advanced pattern matcher, which has multiple patterns for the {product} and {person-product-preference} semantic tags.
Code Block | ||||
---|---|---|---|---|
| ||||
V--------------------[Abe Lincoln likes the iPhone-7]--------------------V
^---[Abe]----V--[Lincoln]--V--[likes]--V--[the]--V------[iPhone-7]-------^
^---[iPhone]----V--[7]--^
^---[abe]----^--[lincoln]--^ ^---[iphone]----^
^--[{name}]--^--[{place}]--^ ^-----------[{product}]-----------^
^-------[{product}]-------^
^---------[{name}]---------^ ^--[{product}]--^
^--------[{place}]---------^ ^------[iphone-7]-------^
^------[{product}]------^
^-----------------[{person-product-preference}]------------------^
^---------------------[{person-product-preference}]----------------------^ |
...
...
Info |
---|
No vertices are created in this stage. |
The resource data
...
is a database of advanced patterns
...
and the resulting semantic
...
tags that they produce.
Resource Format
The pattern database is a series of JSON records, typically indexed by "pattern block ID". Each JSON record represents a block of patterns (one or more) that all produce the same semantic tag. The format is as follows:
Saga_json | ||
---|---|---|
| ||
{
"id":"Q28260",
"tags":["{city}", "{administrative-area}", "{geography}"],
"patterns":[
"Lincoln", "Lincoln, Nebraska", "Lincoln, NE"
],
"confidence":0.95
. . . additional fields as needed go here . . .
} |
Note |
---|
|
...
|
...
|
Parameter | ||||||
---|---|---|---|---|---|---|
|
Parameter | ||||||
---|---|---|---|---|---|---|
|
Parameter | ||||||
---|---|---|---|---|---|---|
|
Tip |
---|
Tags are hierarchical representations of the same intent. For example, {city} → {administrative-area} → {geographical-area} |
Parameter | ||||||
---|---|---|---|---|---|---|
|
Note |
---|
Currently, tokens are separated on simple white-space and punctuation, and then reduced to lowercase. |
Parameter | ||||||||
---|---|---|---|---|---|---|---|---|
|
Parameter | ||||||||
---|---|---|---|---|---|---|---|---|
|
Parameter | ||||||||
---|---|---|---|---|---|---|---|---|
|
Parameter | ||||||||
---|---|---|---|---|---|---|---|---|
|