- 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",
| Saga_json |
---|
{
"_success": true,
"data": {
"line": [
TOKEN"
{
],
"charactertext": "0:1enjoy",
"componentsstartPos": [2,
"I like traveling with Air Paris"
endPos": 7
},
],
{
"stage": "WhitespaceTokenizer",
"confidencestage": 0.5"WhitespaceTokenizer",
"flagsconfidence": [0.5,
"TOKENmatch": "traveling",
"ALL_UPPER_CASE",
flags": [
"ORIGINAL",
],
"ALL_LOWER_CASE",
"_item": "I",
"matching": "I"TOKEN"
},
],
{
"charactertext": "2:6traveling",
"componentsstartPos": [8,
"I like traveling with Air Paris"
"endPos": 17
},
{
],
"stage": "WhitespaceTokenizer",
"confidence": 0.54,
"flagsmatch": ["with",
"TOKENflags",
: [
"ALL_LOWER_CASEORIGINAL",
"ORIGINALSTOP_WORD",
],
"ALL_LOWER_CASE",
"_item": "like",
"matching": "likeTOKEN"
},
],
{
"charactertext": "7:16with",
"componentsstartPos": [18,
"I like traveling with Air Paris"endPos": 22
},
],{
"stage": "WhitespaceTokenizer",
"confidence": 0.5,
"flagsmatch": [
"Delta",
"flags": [
"TOKEN",
"ALL_LOWER_CASEORIGINAL",
"ORIGINAL"
"TOKEN",
],
"TITLE_itemCASE": "traveling",
"matching": "traveling" ],
},
"text": "Delta",
{
"characterstartPos": "17:21"23,
"componentsendPos": [28
}
"I like traveling with Air Paris"],
"matches": [
],
{
"stage": "WhitespaceTokenizer",
"confidencestage": 0.4"DictionaryTagger",
"flagsconfidence": [0.44999999999999996,
"TOKENdisplay": "Delta 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",
}
}
] |
|