- 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"
],
"text": "enjoy",
"startPos": 2,
| Saga_json |
---|
{
"_success": true,
"data": {
"line": [
{
"characterendPos": "0:1",7
"components": [},
{
"I like traveling with Air Paris"
"stage": "WhitespaceTokenizer",
],
"stageconfidence": "WhitespaceTokenizer"0.5,
"confidencematch": 0.5"traveling",
"flags": [
"TOKENORIGINAL",
"ALL_UPPERLOWER_CASE",
"ORIGINAL"
"TOKEN"
],
],
"_item": "I",
"matchingtext": "Itraveling",
},
"startPos": 8,
{
"characterendPos": "2:6",17
"components": [},
{
"I like traveling with Air Paris"
"stage": "WhitespaceTokenizer",
],
"stageconfidence": "WhitespaceTokenizer"0.4,
"confidencematch": 0.5"with",
"flags": [
"TOKENORIGINAL",
"ALLSTOP_LOWER_CASEWORD",
"ORIGINALALL_LOWER_CASE",
],
"TOKEN"
"_item": "like" ],
"matchingtext": "likewith",
},
"startPos": 18,
{
"characterendPos": "7:16",22
"components": [},
{
"I like traveling with Air Paris"
"stage": "WhitespaceTokenizer",
],
"stageconfidence": "WhitespaceTokenizer"0.5,
"confidencematch": 0.5,
"Delta",
"flags": [
"TOKENORIGINAL",
"ALL_LOWER_CASE "TOKEN",
"ORIGINAL"
"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,
"flags": [
"display": "Delta "TOKEN"Air Lines",
"ALL_LOWER_CASEmatch": "Delta",
"SKIPflags",
: [
"ORIGINAL"
"ENTITY",
],
"SEMANTIC_item": "with",TAG"
"matching": "with"
],
},
"text": "{airline}",
"characterid": "22:31188920",
"stagestartPos": "DictionaryTagger"23,
"displayendPos": "Air Paris"28,
"patternstags": [
"Air Orlyairline",
"Air Paris"]
],}
]
"confidence": 0.6975,
"flags": [
"SEMANTIC_TAG",
}
}
] |
|