- Will return a Saga interpretation graph in the format specified
- By default, it returns the graph in HTML format which is used by the UI
- It also can return JSON or plain text
Parameters Parameter |
---|
summary | List of texts to process |
---|
name | batch |
---|
type | string array |
---|
required | true |
---|
|
Parameter |
---|
summary | List of tags to use to process the text |
---|
name | tags |
---|
type | string array |
---|
required | true |
---|
|
Parameter |
---|
summary | Tag to use to process the text |
---|
name | tag |
---|
|
Parameter |
---|
summary | Pipeline or pipeline stage to use to process the text |
---|
name | processor |
---|
|
Parameter |
---|
summary | Specifies the regex to use to split text into TEXT_BLOCKs |
---|
default | [\r\n ]+ |
---|
name | splitRegex |
---|
|
Parameter |
---|
summary | If true, it will combine all the SEMANTIC_TAGs, which has same matching text and same confidence value |
---|
default | false |
---|
name | combine |
---|
type | boolean |
---|
|
- The combination includes the metadata, of every SEMANTIC_TAG
Parameter |
---|
summary | If true, it will also add the components from the highest route confidence tokens. |
---|
default | true |
---|
name | addComponents |
---|
type | boolean |
---|
|
Parameter |
---|
summary | Applicable when addComponents is true. Indicates which components to add to the response |
---|
name | compFields |
---|
type | string array |
---|
|
- If missing all the components will be added
Parameter |
---|
summary | If true, it will add the metadata of the entities found in every SEMANTIC_TAG |
---|
default | false |
---|
name | metadata |
---|
type | boolean |
---|
|
Note |
---|
The parameters tags, tag and processor are mutually exclusive, only one is required, and the priority order is: - tags
- tag
- processor
|
Request Examples
Code Block |
---|
language | powershell |
---|
theme | FadeToGrey |
---|
| curl -X ${method} \
http://localhost:${port}/${url} \
-H 'Content-Type: application/json' \
-d '
{
"batch": ["I like traveling with Air Paris", "I enjoy traveling with Delta"],
"tags": ["airline"],
"combine": true,
"addComponents": true,
"compFields": "paris"
}'
|
Response Saga_json |
---|
[
{
"data": {
"line": [
{
"stage": "WhitespaceTokenizer",
"confidence": 0.5,
"match": "I",
"flags": [
"ORIGINAL",
"ALL_UPPER_CASE",
"TOKEN"
],
"text": "I",
"startPos": 0,
"endPos": 1
},
{
"stage": "WhitespaceTokenizer",
"confidence": 0.5,
"match": "like",
"flags": [
"ORIGINAL",
"ALL_LOWER_CASE",
"TOKEN"
],
"text": "like",
"startPos": 2,
"endPos": 6
},
{
"stage": "WhitespaceTokenizer",
"confidence": 0.5,
"match": "traveling",
"flags": [
"ORIGINAL",
"ALL_LOWER_CASE",
"TOKEN"
],
"text": "traveling",
"startPos": 7,
"endPos": 16
},
{
"stage": "WhitespaceTokenizer",
"confidence": 0.4,
"match": "with",
"flags": [
"ORIGINAL",
"STOP_WORD",
"ALL_LOWER_CASE",
"TOKEN"
],
"text": "with",
"startPos": 17,
"endPos": 21
},
{
"components": [
{
"stage": "CaseAnalysis",
"confidence": 0.45,
"match": "Paris",
"flags": [
"ORIGINAL",
"ALL_LOWER_CASE",
"LOWERED",
"TOKEN"
],
"text": "paris",
"startPos": 26,
"endPos": 31
}
],
"stage": "DictionaryTagger",
"confidence": 0.6975,
"display": "Air Paris",
"match": "Air Paris",
"flags": [
"ENTITY",
"SEMANTIC_TAG"
],
"text": "{airline}",
"id": "34365531",
"startPos": 22,
"endPos": 31,
"tags": [
"airline"
]
}
],
"matches": [
{
"components": [
{
"stage": "CaseAnalysis",
"confidence": 0.45,
"match": "Paris",
"flags": [
"ORIGINAL",
"ALL_LOWER_CASE",
"LOWERED",
"TOKEN"
],
"text": "paris",
"startPos": 26,
"endPos": 31
}
],
"stage": "DictionaryTagger",
"confidence": 0.6975,
"display": "Air Paris",
"match": "Air Paris",
"flags": [
"ENTITY",
"SEMANTIC_TAG"
],
"text": "{airline}",
"id": "34365531",
"startPos": 22,
"endPos": 31,
"tags": [
"airline"
]
}
]
}
},
{
"data": {
"line": [
{
"stage": "WhitespaceTokenizer",
"confidence": 0.5,
"match": "I",
"flags": [
"ORIGINAL",
"ALL_UPPER_CASE",
"TOKEN"
],
"text": "I",
"startPos": 0,
"endPos": 1
},
{
"stage": "WhitespaceTokenizer",
"confidence": 0.5,
"match": "enjoy",
"flags": [
"ORIGINAL",
"ALL_LOWER_CASE",
"TOKEN"
],
| Saga_json |
---|
{
"_success": true,
"data": {
"line": [
{"text": "enjoy",
"characterstartPos": "0:1"2,
"componentsendPos": [7
},
"I like traveling with Air Paris"
{
"stage": "WhitespaceTokenizer",
],
"stageconfidence": "WhitespaceTokenizer"0.5,
"confidencematch": 0.5"traveling",
"flags": [
"TOKENORIGINAL",
"ALL_UPPERLOWER_CASE",
"ORIGINALTOKEN"
],
"_itemtext": "Itraveling",
"matchingstartPos": "I"8,
},
{"endPos": 17
"character": "2:6"},
"components": [{
"stage"I like traveling with Air Paris"
: "WhitespaceTokenizer",
]"confidence": 0.4,
"stagematch": "WhitespaceTokenizerwith",
"confidenceflags": 0.5,
[
"flags": [
ORIGINAL",
"TOKENSTOP_WORD",
"ALL_LOWER_CASE",
"ORIGINAL"
"TOKEN"
],
],
"_item": "like",
"matchingtext": "like"
}with",
{
"character"startPos": "7:16"18,
"components": [
"endPos": 22
"I},
like traveling with Air Paris"
{
],
"stage": "WhitespaceTokenizer",
"confidence": 0.5,
"flagsmatch": ["Delta",
"TOKENflags",: [
"ALL_LOWER_CASE "ORIGINAL",
"ORIGINALTOKEN",
], "TITLE_CASE"
"_item": "traveling" ],
"matchingtext": "travelingDelta",
},
"startPos": 23,
{
"characterendPos": "17:21",28
"components": [}
],
"I like traveling with Air Paris""matches": [
],{
"stage": "WhitespaceTokenizerDictionaryTagger",
"confidence": 0.444999999999999996,
"display": "Delta Air Lines"flags": [,
"TOKENmatch": "Delta",
"ALL_LOWER_CASE",flags": [
"SKIPENTITY",
"ORIGINALSEMANTIC_TAG"
],
"_itemtext": "with{airline}",
"matchingid": "with188920",
},
"startPos": 23,
{
"character": endPos"22:31" 28,
"stagetags": "DictionaryTagger",
[
"displayairline":
"Air Paris",
"patterns": []
}
"Air Orly",
]
}
"Air Paris"
],
"confidence": 0.6975}
] |
|