$caila.markup
Parses the argument text.
Syntax
The method accepts the text for parsing in the string
argument.
- ECMAScript 5
- ECMAScript 6
$caila.markup("markup text");
In the ECMAScript 6 runtime, the method is asynchronous:
await $caila.markup("markup text");
The parsed phrase is returned in the JSON format in response: The parsing result for the markup text
phrase is:
{
"source":"markup text", // phrase to be parsed
"words":[
{
"annotations":{
"lemma":"markup",
"pos":"X" // part of speech
},
"startPos":0, // word position in the phrase
"endPos":6,
"pattern":false,
"punctuation":false,
"source":"markup",
"word":"markup" // normalized word form
},
{
"annotations":{
"lemma":"text",
"pos":"X" // part of speech
},
"startPos":7, // word position in the phrase
"endPos":11,
"pattern":false,
"punctuation":false,
"source":"text",
"word":"text" // normalized word form
}
]
}
How to use
- ECMAScript 5
- ECMAScript 6
state: Example
q!: markup text
script:
$reactions.answer(JSON.stringify($caila.markup("markup text")));
state: Example
q!: markup text
scriptEs6:
$reactions.answer(JSON.stringify(await $caila.markup("markup text")));