Excerpt |
---|
Breaks TEXT_BLOCK tokens into other TEXT_BLOCK tokens, separating the non quoted text from the quoted one. This breaker respects the grammatical rules grammatical rules of quotes. |
Operates On: Lexical Items with TEXT_BLOCK and possibly other flags as specified below.
Note |
---|
This stage follows the correct gramatical grammatical rules for quotation. |
Include Page |
---|
| Generic Configuration Parameters |
---|
| Generic Configuration Parameters |
---|
|
Configuration Parameters
- singleQuotes (boolean, required) -
Indicates if the stage must also break nested quotes (i.e. single quoted text) from the quoted text found. | default | true |
---|
name | SingleQuotes |
---|
type | boolean |
---|
|
- Nested quotes are indicated by a single quote quotion ('), . A single quote quotion outside of double quotes quotion marks is not a quote, and not processed like a quote.
Code Block |
---|
language | js | theme | Eclipse |
---|
title | Example Configuration |
---|
|
{
"type": "QuotationBreaker",
"singleQuotes": true
} |
Example Output
Description
Code Block |
---|
language | text |
---|
theme | FadeToGrey |
---|
|
V----[Lamarr said, "The case is far from over, and we will win."]----V
^--[Lamarr said,]--V--[The case is far from over, and we will win.]--^
V----[He said, "I don't care."]----V
^--[He said,]--V--[I don't care.]--^
With nested quotes
V----------[Dan said: "In a town outside Brisbane, I saw 'Tourists go home' written on a wall. But then someone told me, 'Pay it no mind, lad.' "]-----------V
^--[Dan said:]--V---------[In a town outside Brisbane, I saw 'Tourists go home' written on a wall. But then someone told me, 'Pay it no mind, lad.']---------^
^--[In a town outside Brisbane, I saw]--V--[Tourists go home]--V--[written on a wall. But then someone told me,]--V--[Pay it no mind, lad.]--^ |
Output Flags
Lex-Item Flags:
- PROCESSED - Placed on all the tokens which composed the semantic tag.
- TEXT_BLOCK - Flags all text blocks produced by the SimpleReadeSimpleReader
- QUOTED_TEXT - Marks the TEXT_BLOCK between quotes as QUOTED_TEXT.
Vertex Flags:
- DOUBLE_QUOTE_BEGIN - Indicates the start of a quoted text with double quote, it also quotes. It contains the double quote, quotes and any whitespace next to it.
- DOUBLE_QUOTE_END - Indicates the end of a quoted text with double quote, it also contains quotes. It contains the double quote, quotes and any whitespace next to it.
- SINGLE_QUOTE_BEGIN - Indicates the start of a quoted text with a single quote, it also contains . It contains the single quote , and any whitespace next to it.
- SINGLE_QUOTE_END - Indicates the end of a quoted text with singlequote, it also contains a single quote. It contains the single quote , and any whitespace next to it.
- TEXT_BLOCK_SPLIT - Indicates the split of the textblock.