1 /* 2 Copyright (c) 2006 - 2021 3 CLST - Radboud University 4 ILK - Tilburg University 5 6 This file is part of libfolia 7 8 libfolia is free software; you can redistribute it and/or modify 9 it under the terms of the GNU General Public License as published by 10 the Free Software Foundation; either version 3 of the License, or 11 (at your option) any later version. 12 13 libfolia is distributed in the hope that it will be useful, 14 but WITHOUT ANY WARRANTY; without even the implied warranty of 15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 GNU General Public License for more details. 17 18 You should have received a copy of the GNU General Public License 19 along with this program; if not, see <http://www.gnu.org/licenses/>. 20 21 For questions and suggestions, see: 22 https://github.com/LanguageMachines/ticcutils/issues 23 or send mail to: 24 lamasoftware (at ) science.ru.nl 25 */ 26 27 #include <set> 28 #include <string> 29 #include <iostream> 30 31 #include "libfolia/folia.h" 32 #include "libfolia/folia_properties.h" 33 34 //foliaspec:header 35 //This file was last updated according to the FoLiA specification for version 2.5.1 on 2021-08-19 11:28:55, using foliaspec.py 36 //Code blocks after a foliaspec comment (until the next newline) are automatically generated. **DO NOT EDIT THOSE** and **DO NOT REMOVE ANY FOLIASPEC COMMENTS** !!! 37 38 namespace folia { 39 40 using namespace std; 41 42 //foliaspec:version_major:MAJOR_VERSION 43 //The FoLiA version (major) 44 const int MAJOR_VERSION = 2; 45 46 //foliaspec:version_minor:MINOR_VERSION 47 //The FoLiA version (minor) 48 const int MINOR_VERSION = 5; 49 50 //foliaspec:version_sub:SUB_VERSION 51 //The FoLiA version (sub/rev) 52 const int SUB_VERSION = 1; 53 54 //foliaspec:namespace:NSFOLIA 55 //The FoLiA XML namespace 56 const string NSFOLIA = "http://ilk.uvt.nl/folia"; 57 58 const string NSDCOI = "http://lands.let.ru.nl/projects/d-coi/ns/1.0"; 59 const string NSIMDI = "http://www.mpi.nl/IMDI/Schema/IMDI"; 60 61 const string DEFAULT_TEXT_SET = "https://raw.githubusercontent.com/proycon/folia/master/setdefinitions/text.foliaset.ttl"; 62 const string DEFAULT_PHON_SET = "https://raw.githubusercontent.com/proycon/folia/master/setdefinitions/phon.foliaset.ttl"; 63 64 //foliaspec:attributefeatures 65 const set<string> AttributeFeatures = { "actor", "begindatetime", "enddatetime", "font", "function", "headfeature", "level", "mod", "polarity", "size", "strength", "style", "synset", "time", "value" }; 66 67 //foliaspec:annotationtype_string_map 68 //A mapping from annotation types to strings 69 const map<AnnotationType,string> ant_s_map = { 70 { AnnotationType::NO_ANN, "NONE" }, 71 { AnnotationType::ALTERNATIVE, "alternative" }, 72 { AnnotationType::CHUNKING, "chunking" }, 73 { AnnotationType::COMMENT, "comment" }, 74 { AnnotationType::RAWCONTENT, "rawcontent" }, 75 { AnnotationType::COREFERENCE, "coreference" }, 76 { AnnotationType::CORRECTION, "correction" }, 77 { AnnotationType::DEFINITION, "definition" }, 78 { AnnotationType::DEPENDENCY, "dependency" }, 79 { AnnotationType::DESCRIPTION, "description" }, 80 { AnnotationType::DIVISION, "division" }, 81 { AnnotationType::DOMAIN, "domain" }, 82 { AnnotationType::ENTITY, "entity" }, 83 { AnnotationType::ENTRY, "entry" }, 84 { AnnotationType::ERRORDETECTION, "errordetection" }, 85 { AnnotationType::EVENT, "event" }, 86 { AnnotationType::EXAMPLE, "example" }, 87 { AnnotationType::EXTERNAL, "external" }, 88 { AnnotationType::FIGURE, "figure" }, 89 { AnnotationType::GAP, "gap" }, 90 { AnnotationType::HEAD, "head" }, 91 { AnnotationType::HIDDENTOKEN, "hiddentoken" }, 92 { AnnotationType::HYPHENATION, "hyphenation" }, 93 { AnnotationType::LANG, "lang" }, 94 { AnnotationType::LEMMA, "lemma" }, 95 { AnnotationType::LINEBREAK, "linebreak" }, 96 { AnnotationType::LIST, "list" }, 97 { AnnotationType::METRIC, "metric" }, 98 { AnnotationType::MODALITY, "modality" }, 99 { AnnotationType::MORPHOLOGICAL, "morphological" }, 100 { AnnotationType::NOTE, "note" }, 101 { AnnotationType::OBSERVATION, "observation" }, 102 { AnnotationType::PARAGRAPH, "paragraph" }, 103 { AnnotationType::PART, "part" }, 104 { AnnotationType::PHON, "phon" }, 105 { AnnotationType::PHONOLOGICAL, "phonological" }, 106 { AnnotationType::POS, "pos" }, 107 { AnnotationType::PREDICATE, "predicate" }, 108 { AnnotationType::QUOTE, "quote" }, 109 { AnnotationType::REFERENCE, "reference" }, 110 { AnnotationType::RELATION, "relation" }, 111 { AnnotationType::SEMROLE, "semrole" }, 112 { AnnotationType::SENSE, "sense" }, 113 { AnnotationType::SENTENCE, "sentence" }, 114 { AnnotationType::SENTIMENT, "sentiment" }, 115 { AnnotationType::SPANRELATION, "spanrelation" }, 116 { AnnotationType::STATEMENT, "statement" }, 117 { AnnotationType::STRING, "string" }, 118 { AnnotationType::SUBJECTIVITY, "subjectivity" }, 119 { AnnotationType::SYNTAX, "syntax" }, 120 { AnnotationType::TABLE, "table" }, 121 { AnnotationType::TERM, "term" }, 122 { AnnotationType::TEXT, "text" }, 123 { AnnotationType::HSPACE, "hspace" }, 124 { AnnotationType::STYLE, "style" }, 125 { AnnotationType::WHITESPACE, "whitespace" }, 126 { AnnotationType::TIMESEGMENT, "timesegment" }, 127 { AnnotationType::UTTERANCE, "utterance" }, 128 { AnnotationType::TOKEN, "token" }, 129 }; 130 131 //foliaspec:string_annotationtype_map 132 //A mapping from strings to annotation types 133 const map<string,AnnotationType> s_ant_map = { 134 { "NONE", AnnotationType::NO_ANN }, 135 { "alternative", AnnotationType::ALTERNATIVE }, 136 { "chunking", AnnotationType::CHUNKING }, 137 { "comment", AnnotationType::COMMENT }, 138 { "rawcontent", AnnotationType::RAWCONTENT }, 139 { "coreference", AnnotationType::COREFERENCE }, 140 { "correction", AnnotationType::CORRECTION }, 141 { "definition", AnnotationType::DEFINITION }, 142 { "dependency", AnnotationType::DEPENDENCY }, 143 { "description", AnnotationType::DESCRIPTION }, 144 { "division", AnnotationType::DIVISION }, 145 { "domain", AnnotationType::DOMAIN }, 146 { "entity", AnnotationType::ENTITY }, 147 { "entry", AnnotationType::ENTRY }, 148 { "errordetection", AnnotationType::ERRORDETECTION }, 149 { "event", AnnotationType::EVENT }, 150 { "example", AnnotationType::EXAMPLE }, 151 { "external", AnnotationType::EXTERNAL }, 152 { "figure", AnnotationType::FIGURE }, 153 { "gap", AnnotationType::GAP }, 154 { "head", AnnotationType::HEAD }, 155 { "hiddentoken", AnnotationType::HIDDENTOKEN }, 156 { "hyphenation", AnnotationType::HYPHENATION }, 157 { "lang", AnnotationType::LANG }, 158 { "lemma", AnnotationType::LEMMA }, 159 { "linebreak", AnnotationType::LINEBREAK }, 160 { "list", AnnotationType::LIST }, 161 { "metric", AnnotationType::METRIC }, 162 { "modality", AnnotationType::MODALITY }, 163 { "morphological", AnnotationType::MORPHOLOGICAL }, 164 { "note", AnnotationType::NOTE }, 165 { "observation", AnnotationType::OBSERVATION }, 166 { "paragraph", AnnotationType::PARAGRAPH }, 167 { "part", AnnotationType::PART }, 168 { "phon", AnnotationType::PHON }, 169 { "phonological", AnnotationType::PHONOLOGICAL }, 170 { "pos", AnnotationType::POS }, 171 { "predicate", AnnotationType::PREDICATE }, 172 { "quote", AnnotationType::QUOTE }, 173 { "reference", AnnotationType::REFERENCE }, 174 { "relation", AnnotationType::RELATION }, 175 { "semrole", AnnotationType::SEMROLE }, 176 { "sense", AnnotationType::SENSE }, 177 { "sentence", AnnotationType::SENTENCE }, 178 { "sentiment", AnnotationType::SENTIMENT }, 179 { "spanrelation", AnnotationType::SPANRELATION }, 180 { "statement", AnnotationType::STATEMENT }, 181 { "string", AnnotationType::STRING }, 182 { "subjectivity", AnnotationType::SUBJECTIVITY }, 183 { "syntax", AnnotationType::SYNTAX }, 184 { "table", AnnotationType::TABLE }, 185 { "term", AnnotationType::TERM }, 186 { "text", AnnotationType::TEXT }, 187 { "hspace", AnnotationType::HSPACE }, 188 { "style", AnnotationType::STYLE }, 189 { "whitespace", AnnotationType::WHITESPACE }, 190 { "timesegment", AnnotationType::TIMESEGMENT }, 191 { "utterance", AnnotationType::UTTERANCE }, 192 { "token", AnnotationType::TOKEN }, 193 }; 194 195 //foliaspec:elementtype_string_map 196 const map<ElementType,string> et_s_map = { 197 { BASE, "FoLiA" }, 198 { AbstractAnnotationLayer_t, "_AbstractAnnotationLayer" }, 199 { AbstractContentAnnotation_t, "_AbstractContentAnnotation" }, 200 { AbstractCorrectionChild_t, "_AbstractCorrectionChild" }, 201 { AbstractHigherOrderAnnotation_t, "_AbstractHigherOrderAnnotation" }, 202 { AbstractInlineAnnotation_t, "_AbstractInlineAnnotation" }, 203 { AbstractSpanAnnotation_t, "_AbstractSpanAnnotation" }, 204 { AbstractSpanRole_t, "_AbstractSpanRole" }, 205 { AbstractStructureElement_t, "_AbstractStructureElement" }, 206 { AbstractSubtokenAnnotation_t, "_AbstractSubtokenAnnotation" }, 207 { AbstractTextMarkup_t, "_AbstractTextMarkup" }, 208 { ActorFeature_t, "actor" }, 209 { Alternative_t, "alt" }, 210 { AlternativeLayers_t, "altlayers" }, 211 { BegindatetimeFeature_t, "begindatetime" }, 212 { Caption_t, "caption" }, 213 { Cell_t, "cell" }, 214 { Chunk_t, "chunk" }, 215 { ChunkingLayer_t, "chunking" }, 216 { Comment_t, "comment" }, 217 { Content_t, "content" }, 218 { CoreferenceChain_t, "coreferencechain" }, 219 { CoreferenceLayer_t, "coreferences" }, 220 { CoreferenceLink_t, "coreferencelink" }, 221 { Correction_t, "correction" }, 222 { Cue_t, "cue" }, 223 { Current_t, "current" }, 224 { Definition_t, "def" }, 225 { DependenciesLayer_t, "dependencies" }, 226 { Dependency_t, "dependency" }, 227 { DependencyDependent_t, "dep" }, 228 { Description_t, "desc" }, 229 { Division_t, "div" }, 230 { DomainAnnotation_t, "domain" }, 231 { EnddatetimeFeature_t, "enddatetime" }, 232 { EntitiesLayer_t, "entities" }, 233 { Entity_t, "entity" }, 234 { Entry_t, "entry" }, 235 { ErrorDetection_t, "errordetection" }, 236 { Event_t, "event" }, 237 { Example_t, "ex" }, 238 { External_t, "external" }, 239 { Feature_t, "feat" }, 240 { Figure_t, "figure" }, 241 { FontFeature_t, "font" }, 242 { ForeignData_t, "foreign-data" }, 243 { FunctionFeature_t, "function" }, 244 { Gap_t, "gap" }, 245 { Head_t, "head" }, 246 { HeadFeature_t, "headfeature" }, 247 { Headspan_t, "hd" }, 248 { Hiddenword_t, "hiddenw" }, 249 { Hyphbreak_t, "t-hbr" }, 250 { Label_t, "label" }, 251 { LangAnnotation_t, "lang" }, 252 { LemmaAnnotation_t, "lemma" }, 253 { LevelFeature_t, "level" }, 254 { Linebreak_t, "br" }, 255 { LinkReference_t, "xref" }, 256 { List_t, "list" }, 257 { ListItem_t, "item" }, 258 { Metric_t, "metric" }, 259 { ModalitiesLayer_t, "modalities" }, 260 { Modality_t, "modality" }, 261 { ModalityFeature_t, "mod" }, 262 { Morpheme_t, "morpheme" }, 263 { MorphologyLayer_t, "morphology" }, 264 { New_t, "new" }, 265 { Note_t, "note" }, 266 { Observation_t, "observation" }, 267 { ObservationLayer_t, "observations" }, 268 { Original_t, "original" }, 269 { Paragraph_t, "p" }, 270 { Part_t, "part" }, 271 { PhonContent_t, "ph" }, 272 { Phoneme_t, "phoneme" }, 273 { PhonologyLayer_t, "phonology" }, 274 { PolarityFeature_t, "polarity" }, 275 { PosAnnotation_t, "pos" }, 276 { Predicate_t, "predicate" }, 277 { Quote_t, "quote" }, 278 { Reference_t, "ref" }, 279 { Relation_t, "relation" }, 280 { Row_t, "row" }, 281 { Scope_t, "scope" }, 282 { SemanticRole_t, "semrole" }, 283 { SemanticRolesLayer_t, "semroles" }, 284 { SenseAnnotation_t, "sense" }, 285 { Sentence_t, "s" }, 286 { Sentiment_t, "sentiment" }, 287 { SentimentLayer_t, "sentiments" }, 288 { SizeFeature_t, "size" }, 289 { Source_t, "source" }, 290 { SpanRelation_t, "spanrelation" }, 291 { SpanRelationLayer_t, "spanrelations" }, 292 { Speech_t, "speech" }, 293 { Statement_t, "statement" }, 294 { StatementLayer_t, "statements" }, 295 { StatementRelation_t, "rel" }, 296 { StrengthFeature_t, "strength" }, 297 { String_t, "str" }, 298 { StyleFeature_t, "style" }, 299 { SubjectivityAnnotation_t, "subjectivity" }, 300 { Suggestion_t, "suggestion" }, 301 { SynsetFeature_t, "synset" }, 302 { SyntacticUnit_t, "su" }, 303 { SyntaxLayer_t, "syntax" }, 304 { Table_t, "table" }, 305 { TableHead_t, "tablehead" }, 306 { Target_t, "target" }, 307 { Term_t, "term" }, 308 { Text_t, "text" }, 309 { TextContent_t, "t" }, 310 { TextMarkupCorrection_t, "t-correction" }, 311 { TextMarkupError_t, "t-error" }, 312 { TextMarkupGap_t, "t-gap" }, 313 { TextMarkupHSpace_t, "t-hspace" }, 314 { TextMarkupLanguage_t, "t-lang" }, 315 { TextMarkupReference_t, "t-ref" }, 316 { TextMarkupString_t, "t-str" }, 317 { TextMarkupStyle_t, "t-style" }, 318 { TextMarkupWhitespace_t, "t-whitespace" }, 319 { TimeFeature_t, "time" }, 320 { TimeSegment_t, "timesegment" }, 321 { TimingLayer_t, "timing" }, 322 { Utterance_t, "utt" }, 323 { ValueFeature_t, "value" }, 324 { Whitespace_t, "whitespace" }, 325 { Word_t, "w" }, 326 { WordReference_t, "wref" }, 327 { PlaceHolder_t, "_PlaceHolder" }, 328 { XmlComment_t, "_XmlComment" }, 329 { XmlText_t, "_XmlText" } 330 }; 331 332 //foliaspec:string_elementtype_map 333 const map<string,ElementType> s_et_map = { 334 { "FoLiA", BASE }, 335 { "_AbstractAnnotationLayer", AbstractAnnotationLayer_t }, 336 { "_AbstractContentAnnotation", AbstractContentAnnotation_t }, 337 { "_AbstractCorrectionChild", AbstractCorrectionChild_t }, 338 { "_AbstractHigherOrderAnnotation", AbstractHigherOrderAnnotation_t }, 339 { "_AbstractInlineAnnotation", AbstractInlineAnnotation_t }, 340 { "_AbstractSpanAnnotation", AbstractSpanAnnotation_t }, 341 { "_AbstractSpanRole", AbstractSpanRole_t }, 342 { "_AbstractStructureElement", AbstractStructureElement_t }, 343 { "_AbstractSubtokenAnnotation", AbstractSubtokenAnnotation_t }, 344 { "_AbstractTextMarkup", AbstractTextMarkup_t }, 345 { "actor", ActorFeature_t }, 346 { "alt", Alternative_t }, 347 { "altlayers", AlternativeLayers_t }, 348 { "begindatetime", BegindatetimeFeature_t }, 349 { "caption", Caption_t }, 350 { "cell", Cell_t }, 351 { "chunk", Chunk_t }, 352 { "chunking", ChunkingLayer_t }, 353 { "comment", Comment_t }, 354 { "content", Content_t }, 355 { "coreferencechain", CoreferenceChain_t }, 356 { "coreferences", CoreferenceLayer_t }, 357 { "coreferencelink", CoreferenceLink_t }, 358 { "correction", Correction_t }, 359 { "cue", Cue_t }, 360 { "current", Current_t }, 361 { "def", Definition_t }, 362 { "dependencies", DependenciesLayer_t }, 363 { "dependency", Dependency_t }, 364 { "dep", DependencyDependent_t }, 365 { "desc", Description_t }, 366 { "div", Division_t }, 367 { "domain", DomainAnnotation_t }, 368 { "enddatetime", EnddatetimeFeature_t }, 369 { "entities", EntitiesLayer_t }, 370 { "entity", Entity_t }, 371 { "entry", Entry_t }, 372 { "errordetection", ErrorDetection_t }, 373 { "event", Event_t }, 374 { "ex", Example_t }, 375 { "external", External_t }, 376 { "feat", Feature_t }, 377 { "figure", Figure_t }, 378 { "font", FontFeature_t }, 379 { "foreign-data", ForeignData_t }, 380 { "function", FunctionFeature_t }, 381 { "gap", Gap_t }, 382 { "head", Head_t }, 383 { "headfeature", HeadFeature_t }, 384 { "hd", Headspan_t }, 385 { "hiddenw", Hiddenword_t }, 386 { "t-hbr", Hyphbreak_t }, 387 { "label", Label_t }, 388 { "lang", LangAnnotation_t }, 389 { "lemma", LemmaAnnotation_t }, 390 { "level", LevelFeature_t }, 391 { "br", Linebreak_t }, 392 { "xref", LinkReference_t }, 393 { "list", List_t }, 394 { "item", ListItem_t }, 395 { "metric", Metric_t }, 396 { "modalities", ModalitiesLayer_t }, 397 { "modality", Modality_t }, 398 { "mod", ModalityFeature_t }, 399 { "morpheme", Morpheme_t }, 400 { "morphology", MorphologyLayer_t }, 401 { "new", New_t }, 402 { "note", Note_t }, 403 { "observation", Observation_t }, 404 { "observations", ObservationLayer_t }, 405 { "original", Original_t }, 406 { "p", Paragraph_t }, 407 { "part", Part_t }, 408 { "ph", PhonContent_t }, 409 { "phoneme", Phoneme_t }, 410 { "phonology", PhonologyLayer_t }, 411 { "polarity", PolarityFeature_t }, 412 { "pos", PosAnnotation_t }, 413 { "predicate", Predicate_t }, 414 { "quote", Quote_t }, 415 { "ref", Reference_t }, 416 { "relation", Relation_t }, 417 { "row", Row_t }, 418 { "scope", Scope_t }, 419 { "semrole", SemanticRole_t }, 420 { "semroles", SemanticRolesLayer_t }, 421 { "sense", SenseAnnotation_t }, 422 { "s", Sentence_t }, 423 { "sentiment", Sentiment_t }, 424 { "sentiments", SentimentLayer_t }, 425 { "size", SizeFeature_t }, 426 { "source", Source_t }, 427 { "spanrelation", SpanRelation_t }, 428 { "spanrelations", SpanRelationLayer_t }, 429 { "speech", Speech_t }, 430 { "statement", Statement_t }, 431 { "statements", StatementLayer_t }, 432 { "rel", StatementRelation_t }, 433 { "strength", StrengthFeature_t }, 434 { "str", String_t }, 435 { "style", StyleFeature_t }, 436 { "subjectivity", SubjectivityAnnotation_t }, 437 { "suggestion", Suggestion_t }, 438 { "synset", SynsetFeature_t }, 439 { "su", SyntacticUnit_t }, 440 { "syntax", SyntaxLayer_t }, 441 { "table", Table_t }, 442 { "tablehead", TableHead_t }, 443 { "target", Target_t }, 444 { "term", Term_t }, 445 { "text", Text_t }, 446 { "t", TextContent_t }, 447 { "t-correction", TextMarkupCorrection_t }, 448 { "t-error", TextMarkupError_t }, 449 { "t-gap", TextMarkupGap_t }, 450 { "t-hspace", TextMarkupHSpace_t }, 451 { "t-lang", TextMarkupLanguage_t }, 452 { "t-ref", TextMarkupReference_t }, 453 { "t-str", TextMarkupString_t }, 454 { "t-style", TextMarkupStyle_t }, 455 { "t-whitespace", TextMarkupWhitespace_t }, 456 { "time", TimeFeature_t }, 457 { "timesegment", TimeSegment_t }, 458 { "timing", TimingLayer_t }, 459 { "utt", Utterance_t }, 460 { "value", ValueFeature_t }, 461 { "whitespace", Whitespace_t }, 462 { "w", Word_t }, 463 { "wref", WordReference_t }, 464 { "_PlaceHolder", PlaceHolder_t }, 465 { "_XmlComment", XmlComment_t }, 466 { "_XmlText", XmlText_t } 467 }; 468 469 //foliaspec:default_ignore 470 //Default ignore list for the select() method, do not descend into these 471 const set<ElementType> default_ignore = { Alternative_t, AlternativeLayers_t, ForeignData_t, Original_t, Suggestion_t }; 472 473 //foliaspec:default_ignore_annotations 474 //Default ignore list for token annotation 475 const set<ElementType> default_ignore_annotations = { Alternative_t, AlternativeLayers_t, MorphologyLayer_t, Original_t, PhonologyLayer_t, Suggestion_t }; 476 477 //foliaspec:default_ignore_structure 478 //Default ignore list for structure annotation 479 const set<ElementType> default_ignore_structure = { Alternative_t, AlternativeLayers_t, ChunkingLayer_t, CoreferenceLayer_t, DependenciesLayer_t, EntitiesLayer_t, ModalitiesLayer_t, MorphologyLayer_t, ObservationLayer_t, Original_t, PhonologyLayer_t, SemanticRolesLayer_t, SentimentLayer_t, SpanRelationLayer_t, StatementLayer_t, Suggestion_t, SyntaxLayer_t, TimingLayer_t }; 480 481 const set<ElementType> AnnoExcludeSet = { Original_t, Suggestion_t }; 482 483 const set<ElementType> SpanSet = { SyntacticUnit_t, 484 Chunk_t, 485 Entity_t, 486 Headspan_t, 487 DependencyDependent_t, 488 CoreferenceLink_t, 489 CoreferenceChain_t, 490 SemanticRole_t, 491 SemanticRolesLayer_t, 492 TimeSegment_t }; 493 494 properties DEFAULT_PROPERTIES; 495 496 //these are not in the external specification yet: 497 properties FoLiA::PROPS = DEFAULT_PROPERTIES; 498 properties DCOI::PROPS = DEFAULT_PROPERTIES; 499 properties XmlComment::PROPS = DEFAULT_PROPERTIES; 500 properties PlaceHolder::PROPS = DEFAULT_PROPERTIES; 501 properties XmlText::PROPS = DEFAULT_PROPERTIES; 502 503 //foliaspec:instantiateelementproperties 504 //Instantiates all element properties for the first time, setting them to the default properties 505 properties AbstractAnnotationLayer::PROPS = DEFAULT_PROPERTIES; 506 properties AbstractContentAnnotation::PROPS = DEFAULT_PROPERTIES; 507 properties AbstractCorrectionChild::PROPS = DEFAULT_PROPERTIES; 508 properties AbstractHigherOrderAnnotation::PROPS = DEFAULT_PROPERTIES; 509 properties AbstractInlineAnnotation::PROPS = DEFAULT_PROPERTIES; 510 properties AbstractSpanAnnotation::PROPS = DEFAULT_PROPERTIES; 511 properties AbstractSpanRole::PROPS = DEFAULT_PROPERTIES; 512 properties AbstractStructureElement::PROPS = DEFAULT_PROPERTIES; 513 properties AbstractSubtokenAnnotation::PROPS = DEFAULT_PROPERTIES; 514 properties AbstractTextMarkup::PROPS = DEFAULT_PROPERTIES; 515 properties ActorFeature::PROPS = DEFAULT_PROPERTIES; 516 properties Alternative::PROPS = DEFAULT_PROPERTIES; 517 properties AlternativeLayers::PROPS = DEFAULT_PROPERTIES; 518 properties BegindatetimeFeature::PROPS = DEFAULT_PROPERTIES; 519 properties Caption::PROPS = DEFAULT_PROPERTIES; 520 properties Cell::PROPS = DEFAULT_PROPERTIES; 521 properties Chunk::PROPS = DEFAULT_PROPERTIES; 522 properties ChunkingLayer::PROPS = DEFAULT_PROPERTIES; 523 properties Comment::PROPS = DEFAULT_PROPERTIES; 524 properties Content::PROPS = DEFAULT_PROPERTIES; 525 properties CoreferenceChain::PROPS = DEFAULT_PROPERTIES; 526 properties CoreferenceLayer::PROPS = DEFAULT_PROPERTIES; 527 properties CoreferenceLink::PROPS = DEFAULT_PROPERTIES; 528 properties Correction::PROPS = DEFAULT_PROPERTIES; 529 properties Cue::PROPS = DEFAULT_PROPERTIES; 530 properties Current::PROPS = DEFAULT_PROPERTIES; 531 properties Definition::PROPS = DEFAULT_PROPERTIES; 532 properties DependenciesLayer::PROPS = DEFAULT_PROPERTIES; 533 properties Dependency::PROPS = DEFAULT_PROPERTIES; 534 properties DependencyDependent::PROPS = DEFAULT_PROPERTIES; 535 properties Description::PROPS = DEFAULT_PROPERTIES; 536 properties Division::PROPS = DEFAULT_PROPERTIES; 537 properties DomainAnnotation::PROPS = DEFAULT_PROPERTIES; 538 properties EnddatetimeFeature::PROPS = DEFAULT_PROPERTIES; 539 properties EntitiesLayer::PROPS = DEFAULT_PROPERTIES; 540 properties Entity::PROPS = DEFAULT_PROPERTIES; 541 properties Entry::PROPS = DEFAULT_PROPERTIES; 542 properties ErrorDetection::PROPS = DEFAULT_PROPERTIES; 543 properties Event::PROPS = DEFAULT_PROPERTIES; 544 properties Example::PROPS = DEFAULT_PROPERTIES; 545 properties External::PROPS = DEFAULT_PROPERTIES; 546 properties Feature::PROPS = DEFAULT_PROPERTIES; 547 properties Figure::PROPS = DEFAULT_PROPERTIES; 548 properties FontFeature::PROPS = DEFAULT_PROPERTIES; 549 properties ForeignData::PROPS = DEFAULT_PROPERTIES; 550 properties FunctionFeature::PROPS = DEFAULT_PROPERTIES; 551 properties Gap::PROPS = DEFAULT_PROPERTIES; 552 properties Head::PROPS = DEFAULT_PROPERTIES; 553 properties HeadFeature::PROPS = DEFAULT_PROPERTIES; 554 properties Headspan::PROPS = DEFAULT_PROPERTIES; 555 properties Hiddenword::PROPS = DEFAULT_PROPERTIES; 556 properties Hyphbreak::PROPS = DEFAULT_PROPERTIES; 557 properties Label::PROPS = DEFAULT_PROPERTIES; 558 properties LangAnnotation::PROPS = DEFAULT_PROPERTIES; 559 properties LemmaAnnotation::PROPS = DEFAULT_PROPERTIES; 560 properties LevelFeature::PROPS = DEFAULT_PROPERTIES; 561 properties Linebreak::PROPS = DEFAULT_PROPERTIES; 562 properties LinkReference::PROPS = DEFAULT_PROPERTIES; 563 properties List::PROPS = DEFAULT_PROPERTIES; 564 properties ListItem::PROPS = DEFAULT_PROPERTIES; 565 properties Metric::PROPS = DEFAULT_PROPERTIES; 566 properties ModalitiesLayer::PROPS = DEFAULT_PROPERTIES; 567 properties Modality::PROPS = DEFAULT_PROPERTIES; 568 properties ModalityFeature::PROPS = DEFAULT_PROPERTIES; 569 properties Morpheme::PROPS = DEFAULT_PROPERTIES; 570 properties MorphologyLayer::PROPS = DEFAULT_PROPERTIES; 571 properties New::PROPS = DEFAULT_PROPERTIES; 572 properties Note::PROPS = DEFAULT_PROPERTIES; 573 properties Observation::PROPS = DEFAULT_PROPERTIES; 574 properties ObservationLayer::PROPS = DEFAULT_PROPERTIES; 575 properties Original::PROPS = DEFAULT_PROPERTIES; 576 properties Paragraph::PROPS = DEFAULT_PROPERTIES; 577 properties Part::PROPS = DEFAULT_PROPERTIES; 578 properties PhonContent::PROPS = DEFAULT_PROPERTIES; 579 properties Phoneme::PROPS = DEFAULT_PROPERTIES; 580 properties PhonologyLayer::PROPS = DEFAULT_PROPERTIES; 581 properties PolarityFeature::PROPS = DEFAULT_PROPERTIES; 582 properties PosAnnotation::PROPS = DEFAULT_PROPERTIES; 583 properties Predicate::PROPS = DEFAULT_PROPERTIES; 584 properties Quote::PROPS = DEFAULT_PROPERTIES; 585 properties Reference::PROPS = DEFAULT_PROPERTIES; 586 properties Relation::PROPS = DEFAULT_PROPERTIES; 587 properties Row::PROPS = DEFAULT_PROPERTIES; 588 properties Scope::PROPS = DEFAULT_PROPERTIES; 589 properties SemanticRole::PROPS = DEFAULT_PROPERTIES; 590 properties SemanticRolesLayer::PROPS = DEFAULT_PROPERTIES; 591 properties SenseAnnotation::PROPS = DEFAULT_PROPERTIES; 592 properties Sentence::PROPS = DEFAULT_PROPERTIES; 593 properties Sentiment::PROPS = DEFAULT_PROPERTIES; 594 properties SentimentLayer::PROPS = DEFAULT_PROPERTIES; 595 properties SizeFeature::PROPS = DEFAULT_PROPERTIES; 596 properties Source::PROPS = DEFAULT_PROPERTIES; 597 properties SpanRelation::PROPS = DEFAULT_PROPERTIES; 598 properties SpanRelationLayer::PROPS = DEFAULT_PROPERTIES; 599 properties Speech::PROPS = DEFAULT_PROPERTIES; 600 properties Statement::PROPS = DEFAULT_PROPERTIES; 601 properties StatementLayer::PROPS = DEFAULT_PROPERTIES; 602 properties StatementRelation::PROPS = DEFAULT_PROPERTIES; 603 properties StrengthFeature::PROPS = DEFAULT_PROPERTIES; 604 properties String::PROPS = DEFAULT_PROPERTIES; 605 properties StyleFeature::PROPS = DEFAULT_PROPERTIES; 606 properties SubjectivityAnnotation::PROPS = DEFAULT_PROPERTIES; 607 properties Suggestion::PROPS = DEFAULT_PROPERTIES; 608 properties SynsetFeature::PROPS = DEFAULT_PROPERTIES; 609 properties SyntacticUnit::PROPS = DEFAULT_PROPERTIES; 610 properties SyntaxLayer::PROPS = DEFAULT_PROPERTIES; 611 properties Table::PROPS = DEFAULT_PROPERTIES; 612 properties TableHead::PROPS = DEFAULT_PROPERTIES; 613 properties Target::PROPS = DEFAULT_PROPERTIES; 614 properties Term::PROPS = DEFAULT_PROPERTIES; 615 properties Text::PROPS = DEFAULT_PROPERTIES; 616 properties TextContent::PROPS = DEFAULT_PROPERTIES; 617 properties TextMarkupCorrection::PROPS = DEFAULT_PROPERTIES; 618 properties TextMarkupError::PROPS = DEFAULT_PROPERTIES; 619 properties TextMarkupGap::PROPS = DEFAULT_PROPERTIES; 620 properties TextMarkupHSpace::PROPS = DEFAULT_PROPERTIES; 621 properties TextMarkupLanguage::PROPS = DEFAULT_PROPERTIES; 622 properties TextMarkupReference::PROPS = DEFAULT_PROPERTIES; 623 properties TextMarkupString::PROPS = DEFAULT_PROPERTIES; 624 properties TextMarkupStyle::PROPS = DEFAULT_PROPERTIES; 625 properties TextMarkupWhitespace::PROPS = DEFAULT_PROPERTIES; 626 properties TimeFeature::PROPS = DEFAULT_PROPERTIES; 627 properties TimeSegment::PROPS = DEFAULT_PROPERTIES; 628 properties TimingLayer::PROPS = DEFAULT_PROPERTIES; 629 properties Utterance::PROPS = DEFAULT_PROPERTIES; 630 properties ValueFeature::PROPS = DEFAULT_PROPERTIES; 631 properties Whitespace::PROPS = DEFAULT_PROPERTIES; 632 properties Word::PROPS = DEFAULT_PROPERTIES; 633 properties WordReference::PROPS = DEFAULT_PROPERTIES; 634 operator +=(set<ElementType> & a,const set<ElementType> & b)635 set<ElementType>& operator+=( set<ElementType>& a , 636 const set<ElementType>& b ){ 637 a.insert(b.begin(), b.end()); 638 return a; 639 } 640 641 map<ElementType,properties*> element_props; 642 static_init()643 void static_init(){ 644 /// initialize a lot of statics ('constants') 645 /// This function should be called once. 646 FoLiA::PROPS.XMLTAG = "FoLiA"; 647 FoLiA::PROPS.ACCEPTED_DATA += { Text_t, Speech_t }; 648 element_props[BASE] = &FoLiA::PROPS; 649 650 DCOI::PROPS.XMLTAG = "DCOI"; 651 DCOI::PROPS.ACCEPTED_DATA += { Text_t, Speech_t }; 652 653 //foliaspec:begin:setelementproperties 654 //Sets all element properties for all elements 655 //------ AbstractAnnotationLayer ------- 656 AbstractAnnotationLayer::PROPS.ELEMENT_ID = AbstractAnnotationLayer_t; 657 AbstractAnnotationLayer::PROPS.ACCEPTED_DATA += {Comment_t, Correction_t, Description_t, ForeignData_t}; 658 AbstractAnnotationLayer::PROPS.OPTIONAL_ATTRIBS = ID|TAG; 659 AbstractAnnotationLayer::PROPS.PRINTABLE = false; 660 AbstractAnnotationLayer::PROPS.SETONLY = true; 661 AbstractAnnotationLayer::PROPS.SPEAKABLE = false; 662 element_props[AbstractAnnotationLayer_t] = &AbstractAnnotationLayer::PROPS; 663 //------ AbstractContentAnnotation ------- 664 AbstractContentAnnotation::PROPS.ELEMENT_ID = AbstractContentAnnotation_t; 665 AbstractContentAnnotation::PROPS.OCCURRENCES = 0; 666 AbstractContentAnnotation::PROPS.OPTIONAL_ATTRIBS = CLASS|ANNOTATOR|CONFIDENCE|DATETIME|METADATA|TAG; 667 AbstractContentAnnotation::PROPS.REQUIRED_ATTRIBS = NO_ATT; 668 element_props[AbstractContentAnnotation_t] = &AbstractContentAnnotation::PROPS; 669 //------ AbstractCorrectionChild ------- 670 AbstractCorrectionChild::PROPS.ELEMENT_ID = AbstractCorrectionChild_t; 671 AbstractCorrectionChild::PROPS.ACCEPTED_DATA += {AbstractInlineAnnotation_t, AbstractSpanAnnotation_t, AbstractStructureElement_t, Comment_t, Correction_t, Description_t, ForeignData_t, Metric_t, PhonContent_t, String_t, TextContent_t}; 672 AbstractCorrectionChild::PROPS.OPTIONAL_ATTRIBS = ID|ANNOTATOR|CONFIDENCE|DATETIME|N|TAG; 673 AbstractCorrectionChild::PROPS.PRINTABLE = true; 674 AbstractCorrectionChild::PROPS.SPEAKABLE = true; 675 AbstractCorrectionChild::PROPS.TEXTDELIMITER = "NONE"; 676 element_props[AbstractCorrectionChild_t] = &AbstractCorrectionChild::PROPS; 677 //------ AbstractHigherOrderAnnotation ------- 678 AbstractHigherOrderAnnotation::PROPS.ELEMENT_ID = AbstractHigherOrderAnnotation_t; 679 AbstractHigherOrderAnnotation::PROPS.OPTIONAL_ATTRIBS = NO_ATT; 680 AbstractHigherOrderAnnotation::PROPS.REQUIRED_ATTRIBS = NO_ATT; 681 element_props[AbstractHigherOrderAnnotation_t] = &AbstractHigherOrderAnnotation::PROPS; 682 //------ AbstractInlineAnnotation ------- 683 AbstractInlineAnnotation::PROPS.ELEMENT_ID = AbstractInlineAnnotation_t; 684 AbstractInlineAnnotation::PROPS.ACCEPTED_DATA += {Comment_t, Description_t, Feature_t, ForeignData_t, Metric_t}; 685 AbstractInlineAnnotation::PROPS.OCCURRENCES_PER_SET = 1; 686 AbstractInlineAnnotation::PROPS.OPTIONAL_ATTRIBS = ID|CLASS|ANNOTATOR|N|CONFIDENCE|DATETIME|SRC|BEGINTIME|ENDTIME|SPEAKER|TEXTCLASS|METADATA|TAG; 687 AbstractInlineAnnotation::PROPS.REQUIRED_ATTRIBS = CLASS; 688 element_props[AbstractInlineAnnotation_t] = &AbstractInlineAnnotation::PROPS; 689 //------ AbstractSpanAnnotation ------- 690 AbstractSpanAnnotation::PROPS.ELEMENT_ID = AbstractSpanAnnotation_t; 691 AbstractSpanAnnotation::PROPS.ACCEPTED_DATA += {AbstractInlineAnnotation_t, Comment_t, Description_t, ForeignData_t, LinkReference_t, Metric_t, Relation_t}; 692 AbstractSpanAnnotation::PROPS.OPTIONAL_ATTRIBS = ID|CLASS|ANNOTATOR|N|CONFIDENCE|DATETIME|SRC|BEGINTIME|ENDTIME|SPEAKER|TEXTCLASS|METADATA|TAG; 693 AbstractSpanAnnotation::PROPS.PRINTABLE = true; 694 AbstractSpanAnnotation::PROPS.SPEAKABLE = true; 695 element_props[AbstractSpanAnnotation_t] = &AbstractSpanAnnotation::PROPS; 696 //------ AbstractSpanRole ------- 697 AbstractSpanRole::PROPS = AbstractSpanAnnotation::PROPS; 698 AbstractSpanRole::PROPS.ELEMENT_ID = AbstractSpanRole_t; 699 AbstractSpanRole::PROPS.ACCEPTED_DATA += {AbstractInlineAnnotation_t, Comment_t, Description_t, Feature_t, ForeignData_t, LinkReference_t, Metric_t, Relation_t, WordReference_t, Hiddenword_t, Morpheme_t, Phoneme_t, Word_t}; 700 AbstractSpanRole::PROPS.OPTIONAL_ATTRIBS = ID|TAG; 701 element_props[AbstractSpanRole_t] = &AbstractSpanRole::PROPS; 702 //------ AbstractStructureElement ------- 703 AbstractStructureElement::PROPS.ELEMENT_ID = AbstractStructureElement_t; 704 AbstractStructureElement::PROPS.ACCEPTED_DATA += {AbstractAnnotationLayer_t, Alternative_t, AlternativeLayers_t, Comment_t, Correction_t, Description_t, External_t, Feature_t, ForeignData_t, Metric_t, Part_t, Relation_t}; 705 AbstractStructureElement::PROPS.AUTO_GENERATE_ID = true; 706 AbstractStructureElement::PROPS.OPTIONAL_ATTRIBS = ID|CLASS|ANNOTATOR|N|CONFIDENCE|DATETIME|SRC|BEGINTIME|ENDTIME|SPEAKER|METADATA|SPACE|TAG; 707 AbstractStructureElement::PROPS.PRINTABLE = true; 708 AbstractStructureElement::PROPS.REQUIRED_ATTRIBS = NO_ATT; 709 AbstractStructureElement::PROPS.SPEAKABLE = true; 710 AbstractStructureElement::PROPS.TEXTDELIMITER = "\n\n"; 711 element_props[AbstractStructureElement_t] = &AbstractStructureElement::PROPS; 712 //------ AbstractSubtokenAnnotation ------- 713 AbstractSubtokenAnnotation::PROPS.ELEMENT_ID = AbstractSubtokenAnnotation_t; 714 AbstractSubtokenAnnotation::PROPS.ACCEPTED_DATA += {AbstractAnnotationLayer_t, Alternative_t, AlternativeLayers_t, Comment_t, Correction_t, Description_t, Feature_t, ForeignData_t, Metric_t, Part_t, Relation_t}; 715 AbstractSubtokenAnnotation::PROPS.AUTO_GENERATE_ID = true; 716 AbstractSubtokenAnnotation::PROPS.OPTIONAL_ATTRIBS = ID|CLASS|ANNOTATOR|N|CONFIDENCE|DATETIME|SRC|BEGINTIME|ENDTIME|SPEAKER|METADATA|TAG; 717 AbstractSubtokenAnnotation::PROPS.PRINTABLE = true; 718 AbstractSubtokenAnnotation::PROPS.REQUIRED_ATTRIBS = NO_ATT; 719 AbstractSubtokenAnnotation::PROPS.SPEAKABLE = true; 720 AbstractSubtokenAnnotation::PROPS.TEXTDELIMITER = "\n\n"; 721 element_props[AbstractSubtokenAnnotation_t] = &AbstractSubtokenAnnotation::PROPS; 722 //------ AbstractTextMarkup ------- 723 AbstractTextMarkup::PROPS.ELEMENT_ID = AbstractTextMarkup_t; 724 AbstractTextMarkup::PROPS.ACCEPTED_DATA += {AbstractTextMarkup_t, Comment_t, Description_t, Feature_t, Linebreak_t, XmlText_t}; 725 AbstractTextMarkup::PROPS.OPTIONAL_ATTRIBS = ID|CLASS|ANNOTATOR|N|CONFIDENCE|DATETIME|SRC|BEGINTIME|ENDTIME|SPEAKER|METADATA|TAG; 726 AbstractTextMarkup::PROPS.PRINTABLE = true; 727 AbstractTextMarkup::PROPS.TEXTCONTAINER = true; 728 AbstractTextMarkup::PROPS.TEXTDELIMITER = ""; 729 AbstractTextMarkup::PROPS.XLINK = true; 730 element_props[AbstractTextMarkup_t] = &AbstractTextMarkup::PROPS; 731 //------ Alternative ------- 732 Alternative::PROPS = AbstractHigherOrderAnnotation::PROPS; 733 Alternative::PROPS.ELEMENT_ID = Alternative_t; 734 Alternative::PROPS.ACCEPTED_DATA += {AbstractInlineAnnotation_t, Comment_t, Correction_t, Description_t, ForeignData_t, MorphologyLayer_t, PhonologyLayer_t}; 735 Alternative::PROPS.ANNOTATIONTYPE = AnnotationType::ALTERNATIVE; 736 Alternative::PROPS.AUTH = false; 737 Alternative::PROPS.LABEL = "Alternative"; 738 Alternative::PROPS.OPTIONAL_ATTRIBS = ID|ANNOTATOR|N|CONFIDENCE|DATETIME|SRC|BEGINTIME|ENDTIME|SPEAKER|METADATA|TAG; 739 Alternative::PROPS.PRINTABLE = false; 740 Alternative::PROPS.REQUIRED_ATTRIBS = NO_ATT; 741 Alternative::PROPS.SPEAKABLE = false; 742 Alternative::PROPS.XMLTAG = "alt"; 743 element_props[Alternative_t] = &Alternative::PROPS; 744 //------ AlternativeLayers ------- 745 AlternativeLayers::PROPS = AbstractHigherOrderAnnotation::PROPS; 746 AlternativeLayers::PROPS.ELEMENT_ID = AlternativeLayers_t; 747 AlternativeLayers::PROPS.ACCEPTED_DATA += {AbstractAnnotationLayer_t, Comment_t, Description_t, ForeignData_t}; 748 AlternativeLayers::PROPS.ANNOTATIONTYPE = AnnotationType::ALTERNATIVE; 749 AlternativeLayers::PROPS.AUTH = false; 750 AlternativeLayers::PROPS.LABEL = "Alternative Layers"; 751 AlternativeLayers::PROPS.OPTIONAL_ATTRIBS = ID|ANNOTATOR|N|CONFIDENCE|DATETIME|SRC|BEGINTIME|ENDTIME|SPEAKER|METADATA|TAG; 752 AlternativeLayers::PROPS.PRINTABLE = false; 753 AlternativeLayers::PROPS.REQUIRED_ATTRIBS = NO_ATT; 754 AlternativeLayers::PROPS.SPEAKABLE = false; 755 AlternativeLayers::PROPS.XMLTAG = "altlayers"; 756 element_props[AlternativeLayers_t] = &AlternativeLayers::PROPS; 757 //------ Caption ------- 758 Caption::PROPS = AbstractStructureElement::PROPS; 759 Caption::PROPS.ELEMENT_ID = Caption_t; 760 Caption::PROPS.ACCEPTED_DATA += {AbstractAnnotationLayer_t, AbstractInlineAnnotation_t, Alternative_t, AlternativeLayers_t, Comment_t, Correction_t, Description_t, External_t, Feature_t, ForeignData_t, Gap_t, Linebreak_t, Metric_t, Paragraph_t, Part_t, PhonContent_t, Quote_t, Reference_t, Relation_t, Sentence_t, String_t, TextContent_t, Whitespace_t}; 761 Caption::PROPS.LABEL = "Caption"; 762 Caption::PROPS.OCCURRENCES = 1; 763 Caption::PROPS.OPTIONAL_ATTRIBS = ID|ANNOTATOR|N|CONFIDENCE|DATETIME|SRC|BEGINTIME|ENDTIME|SPEAKER|METADATA|SPACE|TAG; 764 Caption::PROPS.XMLTAG = "caption"; 765 element_props[Caption_t] = &Caption::PROPS; 766 //------ Cell ------- 767 Cell::PROPS = AbstractStructureElement::PROPS; 768 Cell::PROPS.ELEMENT_ID = Cell_t; 769 Cell::PROPS.ACCEPTED_DATA += {AbstractAnnotationLayer_t, AbstractInlineAnnotation_t, Alternative_t, AlternativeLayers_t, Comment_t, Correction_t, Description_t, Entry_t, Event_t, Example_t, External_t, Feature_t, Figure_t, ForeignData_t, Gap_t, Head_t, Hiddenword_t, Linebreak_t, List_t, Metric_t, Note_t, Paragraph_t, Part_t, Quote_t, Reference_t, Relation_t, Sentence_t, String_t, TextContent_t, Whitespace_t, Word_t}; 770 Cell::PROPS.LABEL = "Cell"; 771 Cell::PROPS.OPTIONAL_ATTRIBS = ID|ANNOTATOR|N|CONFIDENCE|DATETIME|SRC|BEGINTIME|ENDTIME|SPEAKER|METADATA|SPACE|TAG; 772 Cell::PROPS.TEXTDELIMITER = " | "; 773 Cell::PROPS.XMLTAG = "cell"; 774 element_props[Cell_t] = &Cell::PROPS; 775 //------ Chunk ------- 776 Chunk::PROPS = AbstractSpanAnnotation::PROPS; 777 Chunk::PROPS.ELEMENT_ID = Chunk_t; 778 Chunk::PROPS.ACCEPTED_DATA += {AbstractInlineAnnotation_t, Comment_t, Description_t, Feature_t, ForeignData_t, LinkReference_t, Metric_t, Relation_t, WordReference_t, Hiddenword_t, Morpheme_t, Phoneme_t, Word_t}; 779 Chunk::PROPS.ANNOTATIONTYPE = AnnotationType::CHUNKING; 780 Chunk::PROPS.LABEL = "Chunk"; 781 Chunk::PROPS.XMLTAG = "chunk"; 782 element_props[Chunk_t] = &Chunk::PROPS; 783 //------ ChunkingLayer ------- 784 ChunkingLayer::PROPS = AbstractAnnotationLayer::PROPS; 785 ChunkingLayer::PROPS.ELEMENT_ID = ChunkingLayer_t; 786 ChunkingLayer::PROPS.ACCEPTED_DATA += {Chunk_t, Comment_t, Correction_t, Description_t, ForeignData_t}; 787 ChunkingLayer::PROPS.ANNOTATIONTYPE = AnnotationType::CHUNKING; 788 ChunkingLayer::PROPS.XMLTAG = "chunking"; 789 element_props[ChunkingLayer_t] = &ChunkingLayer::PROPS; 790 //------ Comment ------- 791 Comment::PROPS = AbstractHigherOrderAnnotation::PROPS; 792 Comment::PROPS.ELEMENT_ID = Comment_t; 793 Comment::PROPS.ANNOTATIONTYPE = AnnotationType::COMMENT; 794 Comment::PROPS.LABEL = "Comment"; 795 Comment::PROPS.OPTIONAL_ATTRIBS = ID|ANNOTATOR|CONFIDENCE|DATETIME|N|METADATA|TAG; 796 Comment::PROPS.PRINTABLE = false; 797 Comment::PROPS.XMLTAG = "comment"; 798 element_props[Comment_t] = &Comment::PROPS; 799 //------ Content ------- 800 Content::PROPS = AbstractContentAnnotation::PROPS; 801 Content::PROPS.ELEMENT_ID = Content_t; 802 Content::PROPS.ANNOTATIONTYPE = AnnotationType::RAWCONTENT; 803 Content::PROPS.LABEL = "Raw Content"; 804 Content::PROPS.OCCURRENCES = 1; 805 Content::PROPS.PRINTABLE = true; 806 Content::PROPS.XMLTAG = "content"; 807 element_props[Content_t] = &Content::PROPS; 808 //------ CoreferenceChain ------- 809 CoreferenceChain::PROPS = AbstractSpanAnnotation::PROPS; 810 CoreferenceChain::PROPS.ELEMENT_ID = CoreferenceChain_t; 811 CoreferenceChain::PROPS.ACCEPTED_DATA += {AbstractInlineAnnotation_t, Comment_t, CoreferenceLink_t, Description_t, Feature_t, ForeignData_t, LinkReference_t, Metric_t, Relation_t}; 812 CoreferenceChain::PROPS.ANNOTATIONTYPE = AnnotationType::COREFERENCE; 813 CoreferenceChain::PROPS.LABEL = "Coreference Chain"; 814 CoreferenceChain::PROPS.REQUIRED_DATA += {CoreferenceLink_t}; 815 CoreferenceChain::PROPS.XMLTAG = "coreferencechain"; 816 element_props[CoreferenceChain_t] = &CoreferenceChain::PROPS; 817 //------ CoreferenceLayer ------- 818 CoreferenceLayer::PROPS = AbstractAnnotationLayer::PROPS; 819 CoreferenceLayer::PROPS.ELEMENT_ID = CoreferenceLayer_t; 820 CoreferenceLayer::PROPS.ACCEPTED_DATA += {Comment_t, CoreferenceChain_t, Correction_t, Description_t, ForeignData_t}; 821 CoreferenceLayer::PROPS.ANNOTATIONTYPE = AnnotationType::COREFERENCE; 822 CoreferenceLayer::PROPS.XMLTAG = "coreferences"; 823 element_props[CoreferenceLayer_t] = &CoreferenceLayer::PROPS; 824 //------ CoreferenceLink ------- 825 CoreferenceLink::PROPS = AbstractSpanRole::PROPS; 826 CoreferenceLink::PROPS.ELEMENT_ID = CoreferenceLink_t; 827 CoreferenceLink::PROPS.ACCEPTED_DATA += {AbstractInlineAnnotation_t, Comment_t, Description_t, Feature_t, ForeignData_t, Headspan_t, LevelFeature_t, LinkReference_t, Metric_t, ModalityFeature_t, Relation_t, TimeFeature_t, WordReference_t, Hiddenword_t, Morpheme_t, Phoneme_t, Word_t}; 828 CoreferenceLink::PROPS.ANNOTATIONTYPE = AnnotationType::COREFERENCE; 829 CoreferenceLink::PROPS.LABEL = "Coreference Link"; 830 CoreferenceLink::PROPS.XMLTAG = "coreferencelink"; 831 element_props[CoreferenceLink_t] = &CoreferenceLink::PROPS; 832 //------ Correction ------- 833 Correction::PROPS = AbstractHigherOrderAnnotation::PROPS; 834 Correction::PROPS.ELEMENT_ID = Correction_t; 835 Correction::PROPS.ACCEPTED_DATA += {Comment_t, Current_t, Description_t, ErrorDetection_t, Feature_t, ForeignData_t, Metric_t, New_t, Original_t, Suggestion_t}; 836 Correction::PROPS.ANNOTATIONTYPE = AnnotationType::CORRECTION; 837 Correction::PROPS.LABEL = "Correction"; 838 Correction::PROPS.OPTIONAL_ATTRIBS = ID|CLASS|ANNOTATOR|N|CONFIDENCE|DATETIME|SRC|BEGINTIME|ENDTIME|SPEAKER|METADATA|TAG; 839 Correction::PROPS.PRINTABLE = true; 840 Correction::PROPS.SPEAKABLE = true; 841 Correction::PROPS.TEXTDELIMITER = "NONE"; 842 Correction::PROPS.XMLTAG = "correction"; 843 element_props[Correction_t] = &Correction::PROPS; 844 //------ Cue ------- 845 Cue::PROPS = AbstractSpanRole::PROPS; 846 Cue::PROPS.ELEMENT_ID = Cue_t; 847 Cue::PROPS.LABEL = "Cue"; 848 Cue::PROPS.OCCURRENCES = 1; 849 Cue::PROPS.XMLTAG = "cue"; 850 element_props[Cue_t] = &Cue::PROPS; 851 //------ Current ------- 852 Current::PROPS = AbstractCorrectionChild::PROPS; 853 Current::PROPS.ELEMENT_ID = Current_t; 854 Current::PROPS.ANNOTATIONTYPE = AnnotationType::CORRECTION; 855 Current::PROPS.OCCURRENCES = 1; 856 Current::PROPS.OPTIONAL_ATTRIBS = TAG; 857 Current::PROPS.XMLTAG = "current"; 858 element_props[Current_t] = &Current::PROPS; 859 //------ Definition ------- 860 Definition::PROPS = AbstractStructureElement::PROPS; 861 Definition::PROPS.ELEMENT_ID = Definition_t; 862 Definition::PROPS.ACCEPTED_DATA += {AbstractAnnotationLayer_t, AbstractInlineAnnotation_t, Alternative_t, AlternativeLayers_t, Comment_t, Correction_t, Description_t, External_t, Feature_t, Figure_t, ForeignData_t, Hiddenword_t, Linebreak_t, List_t, Metric_t, Paragraph_t, Part_t, PhonContent_t, Reference_t, Relation_t, Sentence_t, String_t, Table_t, TextContent_t, Utterance_t, Whitespace_t, Word_t}; 863 Definition::PROPS.ANNOTATIONTYPE = AnnotationType::DEFINITION; 864 Definition::PROPS.LABEL = "Definition"; 865 Definition::PROPS.XMLTAG = "def"; 866 element_props[Definition_t] = &Definition::PROPS; 867 //------ DependenciesLayer ------- 868 DependenciesLayer::PROPS = AbstractAnnotationLayer::PROPS; 869 DependenciesLayer::PROPS.ELEMENT_ID = DependenciesLayer_t; 870 DependenciesLayer::PROPS.ACCEPTED_DATA += {Comment_t, Correction_t, Dependency_t, Description_t, ForeignData_t}; 871 DependenciesLayer::PROPS.ANNOTATIONTYPE = AnnotationType::DEPENDENCY; 872 DependenciesLayer::PROPS.XMLTAG = "dependencies"; 873 element_props[DependenciesLayer_t] = &DependenciesLayer::PROPS; 874 //------ Dependency ------- 875 Dependency::PROPS = AbstractSpanAnnotation::PROPS; 876 Dependency::PROPS.ELEMENT_ID = Dependency_t; 877 Dependency::PROPS.ACCEPTED_DATA += {AbstractInlineAnnotation_t, Comment_t, DependencyDependent_t, Description_t, Feature_t, ForeignData_t, Headspan_t, LinkReference_t, Metric_t, Relation_t}; 878 Dependency::PROPS.ANNOTATIONTYPE = AnnotationType::DEPENDENCY; 879 Dependency::PROPS.LABEL = "Dependency"; 880 Dependency::PROPS.REQUIRED_DATA += {DependencyDependent_t, Headspan_t}; 881 Dependency::PROPS.XMLTAG = "dependency"; 882 element_props[Dependency_t] = &Dependency::PROPS; 883 //------ DependencyDependent ------- 884 DependencyDependent::PROPS = AbstractSpanRole::PROPS; 885 DependencyDependent::PROPS.ELEMENT_ID = DependencyDependent_t; 886 DependencyDependent::PROPS.LABEL = "Dependent"; 887 DependencyDependent::PROPS.OCCURRENCES = 1; 888 DependencyDependent::PROPS.XMLTAG = "dep"; 889 element_props[DependencyDependent_t] = &DependencyDependent::PROPS; 890 //------ Description ------- 891 Description::PROPS = AbstractHigherOrderAnnotation::PROPS; 892 Description::PROPS.ELEMENT_ID = Description_t; 893 Description::PROPS.ANNOTATIONTYPE = AnnotationType::DESCRIPTION; 894 Description::PROPS.LABEL = "Description"; 895 Description::PROPS.OCCURRENCES = 1; 896 Description::PROPS.OPTIONAL_ATTRIBS = ID|ANNOTATOR|CONFIDENCE|DATETIME|N|METADATA|TAG; 897 Description::PROPS.XMLTAG = "desc"; 898 element_props[Description_t] = &Description::PROPS; 899 //------ Division ------- 900 Division::PROPS = AbstractStructureElement::PROPS; 901 Division::PROPS.ELEMENT_ID = Division_t; 902 Division::PROPS.ACCEPTED_DATA += {AbstractAnnotationLayer_t, AbstractInlineAnnotation_t, Alternative_t, AlternativeLayers_t, Comment_t, Correction_t, Description_t, Division_t, Entry_t, Event_t, Example_t, External_t, Feature_t, Figure_t, ForeignData_t, Gap_t, Head_t, Linebreak_t, List_t, Metric_t, Note_t, Paragraph_t, Part_t, PhonContent_t, Quote_t, Reference_t, Relation_t, Sentence_t, Table_t, TextContent_t, Utterance_t, Whitespace_t, Word_t}; 903 Division::PROPS.ANNOTATIONTYPE = AnnotationType::DIVISION; 904 Division::PROPS.LABEL = "Division"; 905 Division::PROPS.TEXTDELIMITER = "\n\n\n"; 906 Division::PROPS.XMLTAG = "div"; 907 element_props[Division_t] = &Division::PROPS; 908 //------ DomainAnnotation ------- 909 DomainAnnotation::PROPS = AbstractInlineAnnotation::PROPS; 910 DomainAnnotation::PROPS.ELEMENT_ID = DomainAnnotation_t; 911 DomainAnnotation::PROPS.ANNOTATIONTYPE = AnnotationType::DOMAIN; 912 DomainAnnotation::PROPS.LABEL = "Domain"; 913 DomainAnnotation::PROPS.OCCURRENCES_PER_SET = 0; 914 DomainAnnotation::PROPS.XMLTAG = "domain"; 915 element_props[DomainAnnotation_t] = &DomainAnnotation::PROPS; 916 //------ EntitiesLayer ------- 917 EntitiesLayer::PROPS = AbstractAnnotationLayer::PROPS; 918 EntitiesLayer::PROPS.ELEMENT_ID = EntitiesLayer_t; 919 EntitiesLayer::PROPS.ACCEPTED_DATA += {Comment_t, Correction_t, Description_t, Entity_t, ForeignData_t}; 920 EntitiesLayer::PROPS.ANNOTATIONTYPE = AnnotationType::ENTITY; 921 EntitiesLayer::PROPS.XMLTAG = "entities"; 922 element_props[EntitiesLayer_t] = &EntitiesLayer::PROPS; 923 //------ Entity ------- 924 Entity::PROPS = AbstractSpanAnnotation::PROPS; 925 Entity::PROPS.ELEMENT_ID = Entity_t; 926 Entity::PROPS.ACCEPTED_DATA += {AbstractInlineAnnotation_t, Comment_t, Description_t, Feature_t, ForeignData_t, LinkReference_t, Metric_t, Relation_t, WordReference_t, Hiddenword_t, Morpheme_t, Phoneme_t, Word_t}; 927 Entity::PROPS.ANNOTATIONTYPE = AnnotationType::ENTITY; 928 Entity::PROPS.LABEL = "Entity"; 929 Entity::PROPS.XMLTAG = "entity"; 930 element_props[Entity_t] = &Entity::PROPS; 931 //------ Entry ------- 932 Entry::PROPS = AbstractStructureElement::PROPS; 933 Entry::PROPS.ELEMENT_ID = Entry_t; 934 Entry::PROPS.ACCEPTED_DATA += {AbstractAnnotationLayer_t, Alternative_t, AlternativeLayers_t, Comment_t, Correction_t, Definition_t, Description_t, Example_t, External_t, Feature_t, ForeignData_t, Metric_t, Part_t, Relation_t, String_t, Term_t, TextContent_t}; 935 Entry::PROPS.ANNOTATIONTYPE = AnnotationType::ENTRY; 936 Entry::PROPS.LABEL = "Entry"; 937 Entry::PROPS.XMLTAG = "entry"; 938 element_props[Entry_t] = &Entry::PROPS; 939 //------ ErrorDetection ------- 940 ErrorDetection::PROPS = AbstractInlineAnnotation::PROPS; 941 ErrorDetection::PROPS.ELEMENT_ID = ErrorDetection_t; 942 ErrorDetection::PROPS.ANNOTATIONTYPE = AnnotationType::ERRORDETECTION; 943 ErrorDetection::PROPS.LABEL = "Error Detection"; 944 ErrorDetection::PROPS.OCCURRENCES_PER_SET = 0; 945 ErrorDetection::PROPS.XMLTAG = "errordetection"; 946 element_props[ErrorDetection_t] = &ErrorDetection::PROPS; 947 //------ Event ------- 948 Event::PROPS = AbstractStructureElement::PROPS; 949 Event::PROPS.ELEMENT_ID = Event_t; 950 Event::PROPS.ACCEPTED_DATA += {AbstractAnnotationLayer_t, AbstractInlineAnnotation_t, ActorFeature_t, Alternative_t, AlternativeLayers_t, BegindatetimeFeature_t, Comment_t, Correction_t, Description_t, Division_t, EnddatetimeFeature_t, Entry_t, Event_t, Example_t, External_t, Feature_t, Figure_t, ForeignData_t, Gap_t, Head_t, Hiddenword_t, Linebreak_t, List_t, Metric_t, Note_t, Paragraph_t, Part_t, PhonContent_t, Quote_t, Reference_t, Relation_t, Sentence_t, String_t, Table_t, TextContent_t, Utterance_t, Whitespace_t, Word_t}; 951 Event::PROPS.ANNOTATIONTYPE = AnnotationType::EVENT; 952 Event::PROPS.LABEL = "Event"; 953 Event::PROPS.XMLTAG = "event"; 954 element_props[Event_t] = &Event::PROPS; 955 //------ Example ------- 956 Example::PROPS = AbstractStructureElement::PROPS; 957 Example::PROPS.ELEMENT_ID = Example_t; 958 Example::PROPS.ACCEPTED_DATA += {AbstractAnnotationLayer_t, AbstractInlineAnnotation_t, Alternative_t, AlternativeLayers_t, Comment_t, Correction_t, Description_t, External_t, Feature_t, Figure_t, ForeignData_t, Hiddenword_t, Linebreak_t, List_t, Metric_t, Paragraph_t, Part_t, PhonContent_t, Reference_t, Relation_t, Sentence_t, String_t, Table_t, TextContent_t, Utterance_t, Whitespace_t, Word_t}; 959 Example::PROPS.ANNOTATIONTYPE = AnnotationType::EXAMPLE; 960 Example::PROPS.LABEL = "Example"; 961 Example::PROPS.XMLTAG = "ex"; 962 element_props[Example_t] = &Example::PROPS; 963 //------ External ------- 964 External::PROPS = AbstractHigherOrderAnnotation::PROPS; 965 External::PROPS.ELEMENT_ID = External_t; 966 External::PROPS.ACCEPTED_DATA += {Comment_t, Description_t}; 967 External::PROPS.ANNOTATIONTYPE = AnnotationType::EXTERNAL; 968 External::PROPS.LABEL = "External"; 969 External::PROPS.OPTIONAL_ATTRIBS = ID|ANNOTATOR|CONFIDENCE|DATETIME|N|METADATA|BEGINTIME|ENDTIME|TAG; 970 External::PROPS.PRINTABLE = true; 971 External::PROPS.REQUIRED_ATTRIBS = SRC; 972 External::PROPS.SPEAKABLE = true; 973 External::PROPS.XMLTAG = "external"; 974 element_props[External_t] = &External::PROPS; 975 //------ Feature ------- 976 Feature::PROPS = AbstractHigherOrderAnnotation::PROPS; 977 Feature::PROPS.ELEMENT_ID = Feature_t; 978 Feature::PROPS.LABEL = "Feature"; 979 Feature::PROPS.XMLTAG = "feat"; 980 element_props[Feature_t] = &Feature::PROPS; 981 //------ ActorFeature ------- 982 ActorFeature::PROPS = Feature::PROPS; 983 ActorFeature::PROPS.ELEMENT_ID = ActorFeature_t; 984 ActorFeature::PROPS.SUBSET = "actor"; 985 ActorFeature::PROPS.XMLTAG = "actor"; 986 element_props[ActorFeature_t] = &ActorFeature::PROPS; 987 //------ BegindatetimeFeature ------- 988 BegindatetimeFeature::PROPS = Feature::PROPS; 989 BegindatetimeFeature::PROPS.ELEMENT_ID = BegindatetimeFeature_t; 990 BegindatetimeFeature::PROPS.SUBSET = "begindatetime"; 991 BegindatetimeFeature::PROPS.XMLTAG = "begindatetime"; 992 element_props[BegindatetimeFeature_t] = &BegindatetimeFeature::PROPS; 993 //------ EnddatetimeFeature ------- 994 EnddatetimeFeature::PROPS = Feature::PROPS; 995 EnddatetimeFeature::PROPS.ELEMENT_ID = EnddatetimeFeature_t; 996 EnddatetimeFeature::PROPS.SUBSET = "enddatetime"; 997 EnddatetimeFeature::PROPS.XMLTAG = "enddatetime"; 998 element_props[EnddatetimeFeature_t] = &EnddatetimeFeature::PROPS; 999 //------ Figure ------- 1000 Figure::PROPS = AbstractStructureElement::PROPS; 1001 Figure::PROPS.ELEMENT_ID = Figure_t; 1002 Figure::PROPS.ACCEPTED_DATA += {AbstractAnnotationLayer_t, Alternative_t, AlternativeLayers_t, Caption_t, Comment_t, Correction_t, Description_t, External_t, Feature_t, ForeignData_t, Linebreak_t, Metric_t, Part_t, Relation_t, String_t, TextContent_t}; 1003 Figure::PROPS.ANNOTATIONTYPE = AnnotationType::FIGURE; 1004 Figure::PROPS.LABEL = "Figure"; 1005 Figure::PROPS.SPEAKABLE = false; 1006 Figure::PROPS.TEXTDELIMITER = "\n\n"; 1007 Figure::PROPS.XMLTAG = "figure"; 1008 element_props[Figure_t] = &Figure::PROPS; 1009 //------ FontFeature ------- 1010 FontFeature::PROPS = Feature::PROPS; 1011 FontFeature::PROPS.ELEMENT_ID = FontFeature_t; 1012 FontFeature::PROPS.SUBSET = "font"; 1013 FontFeature::PROPS.XMLTAG = "font"; 1014 element_props[FontFeature_t] = &FontFeature::PROPS; 1015 //------ ForeignData ------- 1016 ForeignData::PROPS = AbstractHigherOrderAnnotation::PROPS; 1017 ForeignData::PROPS.ELEMENT_ID = ForeignData_t; 1018 ForeignData::PROPS.XMLTAG = "foreign-data"; 1019 element_props[ForeignData_t] = &ForeignData::PROPS; 1020 //------ FunctionFeature ------- 1021 FunctionFeature::PROPS = Feature::PROPS; 1022 FunctionFeature::PROPS.ELEMENT_ID = FunctionFeature_t; 1023 FunctionFeature::PROPS.SUBSET = "function"; 1024 FunctionFeature::PROPS.XMLTAG = "function"; 1025 element_props[FunctionFeature_t] = &FunctionFeature::PROPS; 1026 //------ Gap ------- 1027 Gap::PROPS = AbstractHigherOrderAnnotation::PROPS; 1028 Gap::PROPS.ELEMENT_ID = Gap_t; 1029 Gap::PROPS.ACCEPTED_DATA += {Comment_t, Content_t, Description_t, Feature_t, ForeignData_t, Metric_t, Part_t}; 1030 Gap::PROPS.ANNOTATIONTYPE = AnnotationType::GAP; 1031 Gap::PROPS.LABEL = "Gap"; 1032 Gap::PROPS.OPTIONAL_ATTRIBS = ID|CLASS|ANNOTATOR|N|DATETIME|SRC|BEGINTIME|ENDTIME|METADATA|TAG; 1033 Gap::PROPS.XMLTAG = "gap"; 1034 element_props[Gap_t] = &Gap::PROPS; 1035 //------ Head ------- 1036 Head::PROPS = AbstractStructureElement::PROPS; 1037 Head::PROPS.ELEMENT_ID = Head_t; 1038 Head::PROPS.ACCEPTED_DATA += {AbstractAnnotationLayer_t, AbstractInlineAnnotation_t, Alternative_t, AlternativeLayers_t, Comment_t, Correction_t, Description_t, Event_t, External_t, Feature_t, ForeignData_t, Gap_t, Hiddenword_t, Linebreak_t, Metric_t, Paragraph_t, Part_t, PhonContent_t, Reference_t, Relation_t, Sentence_t, String_t, TextContent_t, Whitespace_t, Word_t}; 1039 Head::PROPS.ANNOTATIONTYPE = AnnotationType::HEAD; 1040 Head::PROPS.LABEL = "Head"; 1041 Head::PROPS.TEXTDELIMITER = "\n\n"; 1042 Head::PROPS.XMLTAG = "head"; 1043 element_props[Head_t] = &Head::PROPS; 1044 //------ HeadFeature ------- 1045 HeadFeature::PROPS = Feature::PROPS; 1046 HeadFeature::PROPS.ELEMENT_ID = HeadFeature_t; 1047 HeadFeature::PROPS.SUBSET = "head"; 1048 HeadFeature::PROPS.XMLTAG = "head"; 1049 element_props[HeadFeature_t] = &HeadFeature::PROPS; 1050 //------ Headspan ------- 1051 Headspan::PROPS = AbstractSpanRole::PROPS; 1052 Headspan::PROPS.ELEMENT_ID = Headspan_t; 1053 Headspan::PROPS.LABEL = "Head"; 1054 Headspan::PROPS.OCCURRENCES = 1; 1055 Headspan::PROPS.XMLTAG = "hd"; 1056 element_props[Headspan_t] = &Headspan::PROPS; 1057 //------ Hiddenword ------- 1058 Hiddenword::PROPS = AbstractStructureElement::PROPS; 1059 Hiddenword::PROPS.ELEMENT_ID = Hiddenword_t; 1060 Hiddenword::PROPS.ACCEPTED_DATA += {AbstractAnnotationLayer_t, AbstractInlineAnnotation_t, Alternative_t, AlternativeLayers_t, Comment_t, Correction_t, Description_t, External_t, Feature_t, ForeignData_t, Metric_t, Part_t, PhonContent_t, Reference_t, Relation_t, String_t, TextContent_t}; 1061 Hiddenword::PROPS.ANNOTATIONTYPE = AnnotationType::HIDDENTOKEN; 1062 Hiddenword::PROPS.HIDDEN = true; 1063 Hiddenword::PROPS.LABEL = "Hidden Word/Token"; 1064 Hiddenword::PROPS.OPTIONAL_ATTRIBS = ID|CLASS|ANNOTATOR|N|CONFIDENCE|DATETIME|SRC|BEGINTIME|ENDTIME|SPEAKER|TEXTCLASS|METADATA|SPACE|TAG; 1065 Hiddenword::PROPS.TEXTDELIMITER = " "; 1066 Hiddenword::PROPS.WREFABLE = true; 1067 Hiddenword::PROPS.XMLTAG = "hiddenw"; 1068 element_props[Hiddenword_t] = &Hiddenword::PROPS; 1069 //------ Hyphbreak ------- 1070 Hyphbreak::PROPS = AbstractTextMarkup::PROPS; 1071 Hyphbreak::PROPS.ELEMENT_ID = Hyphbreak_t; 1072 Hyphbreak::PROPS.ANNOTATIONTYPE = AnnotationType::HYPHENATION; 1073 Hyphbreak::PROPS.IMPLICITSPACE = true; 1074 Hyphbreak::PROPS.LABEL = "Hyphbreak"; 1075 Hyphbreak::PROPS.TEXTDELIMITER = ""; 1076 Hyphbreak::PROPS.XMLTAG = "t-hbr"; 1077 element_props[Hyphbreak_t] = &Hyphbreak::PROPS; 1078 //------ Label ------- 1079 Label::PROPS = AbstractStructureElement::PROPS; 1080 Label::PROPS.ELEMENT_ID = Label_t; 1081 Label::PROPS.ACCEPTED_DATA += {AbstractAnnotationLayer_t, AbstractInlineAnnotation_t, Alternative_t, AlternativeLayers_t, Comment_t, Correction_t, Description_t, External_t, Feature_t, ForeignData_t, Hiddenword_t, Linebreak_t, Metric_t, Part_t, PhonContent_t, Reference_t, Relation_t, String_t, TextContent_t, Whitespace_t, Word_t}; 1082 Label::PROPS.LABEL = "Label"; 1083 Label::PROPS.XMLTAG = "label"; 1084 element_props[Label_t] = &Label::PROPS; 1085 //------ LangAnnotation ------- 1086 LangAnnotation::PROPS = AbstractInlineAnnotation::PROPS; 1087 LangAnnotation::PROPS.ELEMENT_ID = LangAnnotation_t; 1088 LangAnnotation::PROPS.ANNOTATIONTYPE = AnnotationType::LANG; 1089 LangAnnotation::PROPS.LABEL = "Language"; 1090 LangAnnotation::PROPS.XMLTAG = "lang"; 1091 element_props[LangAnnotation_t] = &LangAnnotation::PROPS; 1092 //------ LemmaAnnotation ------- 1093 LemmaAnnotation::PROPS = AbstractInlineAnnotation::PROPS; 1094 LemmaAnnotation::PROPS.ELEMENT_ID = LemmaAnnotation_t; 1095 LemmaAnnotation::PROPS.ANNOTATIONTYPE = AnnotationType::LEMMA; 1096 LemmaAnnotation::PROPS.LABEL = "Lemma"; 1097 LemmaAnnotation::PROPS.XMLTAG = "lemma"; 1098 element_props[LemmaAnnotation_t] = &LemmaAnnotation::PROPS; 1099 //------ LevelFeature ------- 1100 LevelFeature::PROPS = Feature::PROPS; 1101 LevelFeature::PROPS.ELEMENT_ID = LevelFeature_t; 1102 LevelFeature::PROPS.SUBSET = "level"; 1103 LevelFeature::PROPS.XMLTAG = "level"; 1104 element_props[LevelFeature_t] = &LevelFeature::PROPS; 1105 //------ Linebreak ------- 1106 Linebreak::PROPS = AbstractStructureElement::PROPS; 1107 Linebreak::PROPS.ELEMENT_ID = Linebreak_t; 1108 Linebreak::PROPS.ANNOTATIONTYPE = AnnotationType::LINEBREAK; 1109 Linebreak::PROPS.IMPLICITSPACE = true; 1110 Linebreak::PROPS.LABEL = "Linebreak"; 1111 Linebreak::PROPS.TEXTDELIMITER = ""; 1112 Linebreak::PROPS.XLINK = true; 1113 Linebreak::PROPS.XMLTAG = "br"; 1114 element_props[Linebreak_t] = &Linebreak::PROPS; 1115 //------ LinkReference ------- 1116 LinkReference::PROPS.ELEMENT_ID = LinkReference_t; 1117 LinkReference::PROPS.OPTIONAL_ATTRIBS = IDREF|TAG; 1118 LinkReference::PROPS.XMLTAG = "xref"; 1119 element_props[LinkReference_t] = &LinkReference::PROPS; 1120 //------ List ------- 1121 List::PROPS = AbstractStructureElement::PROPS; 1122 List::PROPS.ELEMENT_ID = List_t; 1123 List::PROPS.ACCEPTED_DATA += {AbstractAnnotationLayer_t, AbstractInlineAnnotation_t, Alternative_t, AlternativeLayers_t, Caption_t, Comment_t, Correction_t, Description_t, Event_t, External_t, Feature_t, ForeignData_t, Linebreak_t, ListItem_t, Metric_t, Note_t, Part_t, PhonContent_t, Reference_t, Relation_t, String_t, TextContent_t}; 1124 List::PROPS.ANNOTATIONTYPE = AnnotationType::LIST; 1125 List::PROPS.LABEL = "List"; 1126 List::PROPS.TEXTDELIMITER = "\n\n"; 1127 List::PROPS.XMLTAG = "list"; 1128 element_props[List_t] = &List::PROPS; 1129 //------ ListItem ------- 1130 ListItem::PROPS = AbstractStructureElement::PROPS; 1131 ListItem::PROPS.ELEMENT_ID = ListItem_t; 1132 ListItem::PROPS.ACCEPTED_DATA += {AbstractAnnotationLayer_t, AbstractInlineAnnotation_t, Alternative_t, AlternativeLayers_t, Comment_t, Correction_t, Description_t, Event_t, External_t, Feature_t, ForeignData_t, Gap_t, Hiddenword_t, Label_t, Linebreak_t, List_t, Metric_t, Note_t, Paragraph_t, Part_t, PhonContent_t, Quote_t, Reference_t, Relation_t, Sentence_t, String_t, TextContent_t, Whitespace_t, Word_t}; 1133 ListItem::PROPS.LABEL = "List Item"; 1134 ListItem::PROPS.OPTIONAL_ATTRIBS = ID|ANNOTATOR|N|CONFIDENCE|DATETIME|SRC|BEGINTIME|ENDTIME|SPEAKER|METADATA|TAG; 1135 ListItem::PROPS.TEXTDELIMITER = "\n"; 1136 ListItem::PROPS.XMLTAG = "item"; 1137 element_props[ListItem_t] = &ListItem::PROPS; 1138 //------ Metric ------- 1139 Metric::PROPS = AbstractHigherOrderAnnotation::PROPS; 1140 Metric::PROPS.ELEMENT_ID = Metric_t; 1141 Metric::PROPS.ACCEPTED_DATA += {Comment_t, Description_t, Feature_t, ForeignData_t, ValueFeature_t}; 1142 Metric::PROPS.ANNOTATIONTYPE = AnnotationType::METRIC; 1143 Metric::PROPS.LABEL = "Metric"; 1144 Metric::PROPS.OPTIONAL_ATTRIBS = ID|CLASS|ANNOTATOR|N|CONFIDENCE|DATETIME|SRC|BEGINTIME|ENDTIME|SPEAKER|METADATA|TAG; 1145 Metric::PROPS.XMLTAG = "metric"; 1146 element_props[Metric_t] = &Metric::PROPS; 1147 //------ ModalitiesLayer ------- 1148 ModalitiesLayer::PROPS = AbstractAnnotationLayer::PROPS; 1149 ModalitiesLayer::PROPS.ELEMENT_ID = ModalitiesLayer_t; 1150 ModalitiesLayer::PROPS.ACCEPTED_DATA += {Comment_t, Correction_t, Description_t, ForeignData_t, Modality_t}; 1151 ModalitiesLayer::PROPS.ANNOTATIONTYPE = AnnotationType::MODALITY; 1152 ModalitiesLayer::PROPS.XMLTAG = "modalities"; 1153 element_props[ModalitiesLayer_t] = &ModalitiesLayer::PROPS; 1154 //------ Modality ------- 1155 Modality::PROPS = AbstractSpanAnnotation::PROPS; 1156 Modality::PROPS.ELEMENT_ID = Modality_t; 1157 Modality::PROPS.ACCEPTED_DATA += {AbstractInlineAnnotation_t, Comment_t, Cue_t, Description_t, Feature_t, ForeignData_t, LinkReference_t, Metric_t, PolarityFeature_t, Relation_t, Scope_t, Source_t, StrengthFeature_t, Target_t}; 1158 Modality::PROPS.ANNOTATIONTYPE = AnnotationType::MODALITY; 1159 Modality::PROPS.LABEL = "Modality"; 1160 Modality::PROPS.XMLTAG = "modality"; 1161 element_props[Modality_t] = &Modality::PROPS; 1162 //------ ModalityFeature ------- 1163 ModalityFeature::PROPS = Feature::PROPS; 1164 ModalityFeature::PROPS.ELEMENT_ID = ModalityFeature_t; 1165 ModalityFeature::PROPS.SUBSET = "mod"; 1166 ModalityFeature::PROPS.XMLTAG = "mod"; 1167 element_props[ModalityFeature_t] = &ModalityFeature::PROPS; 1168 //------ Morpheme ------- 1169 Morpheme::PROPS = AbstractSubtokenAnnotation::PROPS; 1170 Morpheme::PROPS.ELEMENT_ID = Morpheme_t; 1171 Morpheme::PROPS.ACCEPTED_DATA += {AbstractAnnotationLayer_t, AbstractInlineAnnotation_t, Alternative_t, AlternativeLayers_t, Comment_t, Correction_t, Description_t, Feature_t, ForeignData_t, FunctionFeature_t, Metric_t, Morpheme_t, Part_t, PhonContent_t, Relation_t, String_t, TextContent_t}; 1172 Morpheme::PROPS.ANNOTATIONTYPE = AnnotationType::MORPHOLOGICAL; 1173 Morpheme::PROPS.LABEL = "Morpheme"; 1174 Morpheme::PROPS.TEXTDELIMITER = ""; 1175 Morpheme::PROPS.WREFABLE = true; 1176 Morpheme::PROPS.XMLTAG = "morpheme"; 1177 element_props[Morpheme_t] = &Morpheme::PROPS; 1178 //------ MorphologyLayer ------- 1179 MorphologyLayer::PROPS = AbstractAnnotationLayer::PROPS; 1180 MorphologyLayer::PROPS.ELEMENT_ID = MorphologyLayer_t; 1181 MorphologyLayer::PROPS.ACCEPTED_DATA += {Comment_t, Correction_t, Description_t, ForeignData_t, Morpheme_t}; 1182 MorphologyLayer::PROPS.ANNOTATIONTYPE = AnnotationType::MORPHOLOGICAL; 1183 MorphologyLayer::PROPS.XMLTAG = "morphology"; 1184 element_props[MorphologyLayer_t] = &MorphologyLayer::PROPS; 1185 //------ New ------- 1186 New::PROPS = AbstractCorrectionChild::PROPS; 1187 New::PROPS.ELEMENT_ID = New_t; 1188 New::PROPS.ANNOTATIONTYPE = AnnotationType::CORRECTION; 1189 New::PROPS.OCCURRENCES = 1; 1190 New::PROPS.OPTIONAL_ATTRIBS = TAG; 1191 New::PROPS.XMLTAG = "new"; 1192 element_props[New_t] = &New::PROPS; 1193 //------ Note ------- 1194 Note::PROPS = AbstractStructureElement::PROPS; 1195 Note::PROPS.ELEMENT_ID = Note_t; 1196 Note::PROPS.ACCEPTED_DATA += {AbstractAnnotationLayer_t, AbstractInlineAnnotation_t, Alternative_t, AlternativeLayers_t, Comment_t, Correction_t, Description_t, Example_t, External_t, Feature_t, Figure_t, ForeignData_t, Head_t, Hiddenword_t, Linebreak_t, List_t, Metric_t, Paragraph_t, Part_t, PhonContent_t, Reference_t, Relation_t, Sentence_t, String_t, Table_t, TextContent_t, Utterance_t, Whitespace_t, Word_t}; 1197 Note::PROPS.ANNOTATIONTYPE = AnnotationType::NOTE; 1198 Note::PROPS.LABEL = "Note"; 1199 Note::PROPS.XMLTAG = "note"; 1200 element_props[Note_t] = &Note::PROPS; 1201 //------ Observation ------- 1202 Observation::PROPS = AbstractSpanAnnotation::PROPS; 1203 Observation::PROPS.ELEMENT_ID = Observation_t; 1204 Observation::PROPS.ACCEPTED_DATA += {AbstractInlineAnnotation_t, Comment_t, Description_t, Feature_t, ForeignData_t, LinkReference_t, Metric_t, Relation_t, WordReference_t, Hiddenword_t, Morpheme_t, Phoneme_t, Word_t}; 1205 Observation::PROPS.ANNOTATIONTYPE = AnnotationType::OBSERVATION; 1206 Observation::PROPS.LABEL = "Observation"; 1207 Observation::PROPS.XMLTAG = "observation"; 1208 element_props[Observation_t] = &Observation::PROPS; 1209 //------ ObservationLayer ------- 1210 ObservationLayer::PROPS = AbstractAnnotationLayer::PROPS; 1211 ObservationLayer::PROPS.ELEMENT_ID = ObservationLayer_t; 1212 ObservationLayer::PROPS.ACCEPTED_DATA += {Comment_t, Correction_t, Description_t, ForeignData_t, Observation_t}; 1213 ObservationLayer::PROPS.ANNOTATIONTYPE = AnnotationType::OBSERVATION; 1214 ObservationLayer::PROPS.XMLTAG = "observations"; 1215 element_props[ObservationLayer_t] = &ObservationLayer::PROPS; 1216 //------ Original ------- 1217 Original::PROPS = AbstractCorrectionChild::PROPS; 1218 Original::PROPS.ELEMENT_ID = Original_t; 1219 Original::PROPS.ANNOTATIONTYPE = AnnotationType::CORRECTION; 1220 Original::PROPS.AUTH = false; 1221 Original::PROPS.OCCURRENCES = 1; 1222 Original::PROPS.OPTIONAL_ATTRIBS = TAG; 1223 Original::PROPS.XMLTAG = "original"; 1224 element_props[Original_t] = &Original::PROPS; 1225 //------ Paragraph ------- 1226 Paragraph::PROPS = AbstractStructureElement::PROPS; 1227 Paragraph::PROPS.ELEMENT_ID = Paragraph_t; 1228 Paragraph::PROPS.ACCEPTED_DATA += {AbstractAnnotationLayer_t, AbstractInlineAnnotation_t, Alternative_t, AlternativeLayers_t, Comment_t, Correction_t, Description_t, Entry_t, Event_t, Example_t, External_t, Feature_t, Figure_t, ForeignData_t, Gap_t, Head_t, Hiddenword_t, Linebreak_t, List_t, Metric_t, Note_t, Part_t, PhonContent_t, Quote_t, Reference_t, Relation_t, Sentence_t, String_t, TextContent_t, Whitespace_t, Word_t}; 1229 Paragraph::PROPS.ANNOTATIONTYPE = AnnotationType::PARAGRAPH; 1230 Paragraph::PROPS.LABEL = "Paragraph"; 1231 Paragraph::PROPS.TEXTDELIMITER = "\n\n"; 1232 Paragraph::PROPS.XMLTAG = "p"; 1233 element_props[Paragraph_t] = &Paragraph::PROPS; 1234 //------ Part ------- 1235 Part::PROPS = AbstractStructureElement::PROPS; 1236 Part::PROPS.ELEMENT_ID = Part_t; 1237 Part::PROPS.ACCEPTED_DATA += {AbstractAnnotationLayer_t, AbstractInlineAnnotation_t, AbstractStructureElement_t, Alternative_t, AlternativeLayers_t, Comment_t, Correction_t, Description_t, External_t, Feature_t, ForeignData_t, Metric_t, Part_t, PhonContent_t, Relation_t, TextContent_t}; 1238 Part::PROPS.ANNOTATIONTYPE = AnnotationType::PART; 1239 Part::PROPS.LABEL = "Part"; 1240 Part::PROPS.TEXTDELIMITER = " "; 1241 Part::PROPS.XMLTAG = "part"; 1242 element_props[Part_t] = &Part::PROPS; 1243 //------ PhonContent ------- 1244 PhonContent::PROPS = AbstractContentAnnotation::PROPS; 1245 PhonContent::PROPS.ELEMENT_ID = PhonContent_t; 1246 PhonContent::PROPS.ACCEPTED_DATA += {Comment_t, Description_t, Feature_t, XmlText_t}; 1247 PhonContent::PROPS.ANNOTATIONTYPE = AnnotationType::PHON; 1248 PhonContent::PROPS.LABEL = "Phonetic Content"; 1249 PhonContent::PROPS.PHONCONTAINER = true; 1250 PhonContent::PROPS.PRINTABLE = false; 1251 PhonContent::PROPS.SPEAKABLE = true; 1252 PhonContent::PROPS.XMLTAG = "ph"; 1253 element_props[PhonContent_t] = &PhonContent::PROPS; 1254 //------ Phoneme ------- 1255 Phoneme::PROPS = AbstractSubtokenAnnotation::PROPS; 1256 Phoneme::PROPS.ELEMENT_ID = Phoneme_t; 1257 Phoneme::PROPS.ACCEPTED_DATA += {AbstractAnnotationLayer_t, AbstractInlineAnnotation_t, Alternative_t, AlternativeLayers_t, Comment_t, Correction_t, Description_t, Feature_t, ForeignData_t, FunctionFeature_t, Metric_t, Part_t, PhonContent_t, Phoneme_t, Relation_t, String_t, TextContent_t}; 1258 Phoneme::PROPS.ANNOTATIONTYPE = AnnotationType::PHONOLOGICAL; 1259 Phoneme::PROPS.LABEL = "Phoneme"; 1260 Phoneme::PROPS.TEXTDELIMITER = ""; 1261 Phoneme::PROPS.WREFABLE = true; 1262 Phoneme::PROPS.XMLTAG = "phoneme"; 1263 element_props[Phoneme_t] = &Phoneme::PROPS; 1264 //------ PhonologyLayer ------- 1265 PhonologyLayer::PROPS = AbstractAnnotationLayer::PROPS; 1266 PhonologyLayer::PROPS.ELEMENT_ID = PhonologyLayer_t; 1267 PhonologyLayer::PROPS.ACCEPTED_DATA += {Comment_t, Correction_t, Description_t, ForeignData_t, Phoneme_t}; 1268 PhonologyLayer::PROPS.ANNOTATIONTYPE = AnnotationType::PHONOLOGICAL; 1269 PhonologyLayer::PROPS.XMLTAG = "phonology"; 1270 element_props[PhonologyLayer_t] = &PhonologyLayer::PROPS; 1271 //------ PolarityFeature ------- 1272 PolarityFeature::PROPS = Feature::PROPS; 1273 PolarityFeature::PROPS.ELEMENT_ID = PolarityFeature_t; 1274 PolarityFeature::PROPS.SUBSET = "polarity"; 1275 PolarityFeature::PROPS.XMLTAG = "polarity"; 1276 element_props[PolarityFeature_t] = &PolarityFeature::PROPS; 1277 //------ PosAnnotation ------- 1278 PosAnnotation::PROPS = AbstractInlineAnnotation::PROPS; 1279 PosAnnotation::PROPS.ELEMENT_ID = PosAnnotation_t; 1280 PosAnnotation::PROPS.ACCEPTED_DATA += {Comment_t, Description_t, Feature_t, ForeignData_t, HeadFeature_t, Metric_t}; 1281 PosAnnotation::PROPS.ANNOTATIONTYPE = AnnotationType::POS; 1282 PosAnnotation::PROPS.LABEL = "Part-of-Speech"; 1283 PosAnnotation::PROPS.XMLTAG = "pos"; 1284 element_props[PosAnnotation_t] = &PosAnnotation::PROPS; 1285 //------ Predicate ------- 1286 Predicate::PROPS = AbstractSpanAnnotation::PROPS; 1287 Predicate::PROPS.ELEMENT_ID = Predicate_t; 1288 Predicate::PROPS.ACCEPTED_DATA += {AbstractInlineAnnotation_t, Comment_t, Description_t, Feature_t, ForeignData_t, LinkReference_t, Metric_t, Relation_t, SemanticRole_t, WordReference_t, Hiddenword_t, Morpheme_t, Phoneme_t, Word_t}; 1289 Predicate::PROPS.ANNOTATIONTYPE = AnnotationType::PREDICATE; 1290 Predicate::PROPS.LABEL = "Predicate"; 1291 Predicate::PROPS.XMLTAG = "predicate"; 1292 element_props[Predicate_t] = &Predicate::PROPS; 1293 //------ Quote ------- 1294 Quote::PROPS = AbstractStructureElement::PROPS; 1295 Quote::PROPS.ELEMENT_ID = Quote_t; 1296 Quote::PROPS.ACCEPTED_DATA += {AbstractAnnotationLayer_t, AbstractInlineAnnotation_t, Alternative_t, AlternativeLayers_t, Comment_t, Correction_t, Description_t, Division_t, External_t, Feature_t, ForeignData_t, Gap_t, Hiddenword_t, Linebreak_t, Metric_t, Paragraph_t, Part_t, Quote_t, Reference_t, Relation_t, Sentence_t, String_t, TextContent_t, Utterance_t, Whitespace_t, Word_t}; 1297 Quote::PROPS.ANNOTATIONTYPE = AnnotationType::QUOTE; 1298 Quote::PROPS.LABEL = "Quote"; 1299 Quote::PROPS.XMLTAG = "quote"; 1300 element_props[Quote_t] = &Quote::PROPS; 1301 //------ Reference ------- 1302 Reference::PROPS = AbstractStructureElement::PROPS; 1303 Reference::PROPS.ELEMENT_ID = Reference_t; 1304 Reference::PROPS.ACCEPTED_DATA += {AbstractAnnotationLayer_t, Alternative_t, AlternativeLayers_t, Comment_t, Correction_t, Description_t, External_t, Feature_t, ForeignData_t, Hiddenword_t, Linebreak_t, Metric_t, Paragraph_t, Part_t, PhonContent_t, Quote_t, Relation_t, Sentence_t, String_t, TextContent_t, Utterance_t, Whitespace_t, Word_t}; 1305 Reference::PROPS.ANNOTATIONTYPE = AnnotationType::REFERENCE; 1306 Reference::PROPS.LABEL = "Reference"; 1307 Reference::PROPS.TEXTDELIMITER = " "; 1308 Reference::PROPS.XLINK = true; 1309 Reference::PROPS.XMLTAG = "ref"; 1310 element_props[Reference_t] = &Reference::PROPS; 1311 //------ Relation ------- 1312 Relation::PROPS = AbstractHigherOrderAnnotation::PROPS; 1313 Relation::PROPS.ELEMENT_ID = Relation_t; 1314 Relation::PROPS.ACCEPTED_DATA += {Comment_t, Description_t, Feature_t, ForeignData_t, LinkReference_t, Metric_t}; 1315 Relation::PROPS.ANNOTATIONTYPE = AnnotationType::RELATION; 1316 Relation::PROPS.LABEL = "Relation"; 1317 Relation::PROPS.OPTIONAL_ATTRIBS = ID|CLASS|ANNOTATOR|N|CONFIDENCE|DATETIME|SRC|BEGINTIME|ENDTIME|SPEAKER|METADATA|TAG; 1318 Relation::PROPS.PRINTABLE = false; 1319 Relation::PROPS.REQUIRED_ATTRIBS = NO_ATT; 1320 Relation::PROPS.SPEAKABLE = false; 1321 Relation::PROPS.XLINK = true; 1322 Relation::PROPS.XMLTAG = "relation"; 1323 element_props[Relation_t] = &Relation::PROPS; 1324 //------ Row ------- 1325 Row::PROPS = AbstractStructureElement::PROPS; 1326 Row::PROPS.ELEMENT_ID = Row_t; 1327 Row::PROPS.ACCEPTED_DATA += {AbstractAnnotationLayer_t, AbstractInlineAnnotation_t, Alternative_t, AlternativeLayers_t, Cell_t, Comment_t, Correction_t, Description_t, External_t, Feature_t, ForeignData_t, Metric_t, Part_t, Relation_t}; 1328 Row::PROPS.LABEL = "Table Row"; 1329 Row::PROPS.TEXTDELIMITER = "\n"; 1330 Row::PROPS.XMLTAG = "row"; 1331 element_props[Row_t] = &Row::PROPS; 1332 //------ Scope ------- 1333 Scope::PROPS = AbstractSpanRole::PROPS; 1334 Scope::PROPS.ELEMENT_ID = Scope_t; 1335 Scope::PROPS.ACCEPTED_DATA += {AbstractInlineAnnotation_t, Comment_t, Cue_t, Description_t, Feature_t, ForeignData_t, LinkReference_t, Metric_t, Relation_t, Source_t, Target_t, WordReference_t, Hiddenword_t, Morpheme_t, Phoneme_t, Word_t}; 1336 Scope::PROPS.LABEL = "Scope"; 1337 Scope::PROPS.OCCURRENCES = 1; 1338 Scope::PROPS.XMLTAG = "scope"; 1339 element_props[Scope_t] = &Scope::PROPS; 1340 //------ SemanticRole ------- 1341 SemanticRole::PROPS = AbstractSpanAnnotation::PROPS; 1342 SemanticRole::PROPS.ELEMENT_ID = SemanticRole_t; 1343 SemanticRole::PROPS.ACCEPTED_DATA += {AbstractInlineAnnotation_t, Comment_t, Description_t, Feature_t, ForeignData_t, Headspan_t, LinkReference_t, Metric_t, Relation_t, WordReference_t, Hiddenword_t, Morpheme_t, Phoneme_t, Word_t}; 1344 SemanticRole::PROPS.ANNOTATIONTYPE = AnnotationType::SEMROLE; 1345 SemanticRole::PROPS.LABEL = "Semantic Role"; 1346 SemanticRole::PROPS.REQUIRED_ATTRIBS = CLASS; 1347 SemanticRole::PROPS.XMLTAG = "semrole"; 1348 element_props[SemanticRole_t] = &SemanticRole::PROPS; 1349 //------ SemanticRolesLayer ------- 1350 SemanticRolesLayer::PROPS = AbstractAnnotationLayer::PROPS; 1351 SemanticRolesLayer::PROPS.ELEMENT_ID = SemanticRolesLayer_t; 1352 SemanticRolesLayer::PROPS.ACCEPTED_DATA += {Comment_t, Correction_t, Description_t, ForeignData_t, Predicate_t, SemanticRole_t}; 1353 SemanticRolesLayer::PROPS.ANNOTATIONTYPE = AnnotationType::SEMROLE; 1354 SemanticRolesLayer::PROPS.XMLTAG = "semroles"; 1355 element_props[SemanticRolesLayer_t] = &SemanticRolesLayer::PROPS; 1356 //------ SenseAnnotation ------- 1357 SenseAnnotation::PROPS = AbstractInlineAnnotation::PROPS; 1358 SenseAnnotation::PROPS.ELEMENT_ID = SenseAnnotation_t; 1359 SenseAnnotation::PROPS.ACCEPTED_DATA += {Comment_t, Description_t, Feature_t, ForeignData_t, Metric_t, SynsetFeature_t}; 1360 SenseAnnotation::PROPS.ANNOTATIONTYPE = AnnotationType::SENSE; 1361 SenseAnnotation::PROPS.LABEL = "Semantic Sense"; 1362 SenseAnnotation::PROPS.OCCURRENCES_PER_SET = 0; 1363 SenseAnnotation::PROPS.XMLTAG = "sense"; 1364 element_props[SenseAnnotation_t] = &SenseAnnotation::PROPS; 1365 //------ Sentence ------- 1366 Sentence::PROPS = AbstractStructureElement::PROPS; 1367 Sentence::PROPS.ELEMENT_ID = Sentence_t; 1368 Sentence::PROPS.ACCEPTED_DATA += {AbstractAnnotationLayer_t, AbstractInlineAnnotation_t, Alternative_t, AlternativeLayers_t, Comment_t, Correction_t, Description_t, Entry_t, Event_t, Example_t, External_t, Feature_t, ForeignData_t, Gap_t, Hiddenword_t, Linebreak_t, Metric_t, Note_t, Part_t, PhonContent_t, Quote_t, Reference_t, Relation_t, String_t, TextContent_t, Whitespace_t, Word_t}; 1369 Sentence::PROPS.ANNOTATIONTYPE = AnnotationType::SENTENCE; 1370 Sentence::PROPS.LABEL = "Sentence"; 1371 Sentence::PROPS.TEXTDELIMITER = " "; 1372 Sentence::PROPS.XMLTAG = "s"; 1373 element_props[Sentence_t] = &Sentence::PROPS; 1374 //------ Sentiment ------- 1375 Sentiment::PROPS = AbstractSpanAnnotation::PROPS; 1376 Sentiment::PROPS.ELEMENT_ID = Sentiment_t; 1377 Sentiment::PROPS.ACCEPTED_DATA += {AbstractInlineAnnotation_t, Comment_t, Description_t, Feature_t, ForeignData_t, Headspan_t, LinkReference_t, Metric_t, PolarityFeature_t, Relation_t, Source_t, StrengthFeature_t, Target_t, WordReference_t, Hiddenword_t, Morpheme_t, Phoneme_t, Word_t}; 1378 Sentiment::PROPS.ANNOTATIONTYPE = AnnotationType::SENTIMENT; 1379 Sentiment::PROPS.LABEL = "Sentiment"; 1380 Sentiment::PROPS.XMLTAG = "sentiment"; 1381 element_props[Sentiment_t] = &Sentiment::PROPS; 1382 //------ SentimentLayer ------- 1383 SentimentLayer::PROPS = AbstractAnnotationLayer::PROPS; 1384 SentimentLayer::PROPS.ELEMENT_ID = SentimentLayer_t; 1385 SentimentLayer::PROPS.ACCEPTED_DATA += {Comment_t, Correction_t, Description_t, ForeignData_t, Sentiment_t}; 1386 SentimentLayer::PROPS.ANNOTATIONTYPE = AnnotationType::SENTIMENT; 1387 SentimentLayer::PROPS.XMLTAG = "sentiments"; 1388 element_props[SentimentLayer_t] = &SentimentLayer::PROPS; 1389 //------ SizeFeature ------- 1390 SizeFeature::PROPS = Feature::PROPS; 1391 SizeFeature::PROPS.ELEMENT_ID = SizeFeature_t; 1392 SizeFeature::PROPS.SUBSET = "size"; 1393 SizeFeature::PROPS.XMLTAG = "size"; 1394 element_props[SizeFeature_t] = &SizeFeature::PROPS; 1395 //------ Source ------- 1396 Source::PROPS = AbstractSpanRole::PROPS; 1397 Source::PROPS.ELEMENT_ID = Source_t; 1398 Source::PROPS.LABEL = "Source"; 1399 Source::PROPS.OCCURRENCES = 1; 1400 Source::PROPS.XMLTAG = "source"; 1401 element_props[Source_t] = &Source::PROPS; 1402 //------ SpanRelation ------- 1403 SpanRelation::PROPS = AbstractHigherOrderAnnotation::PROPS; 1404 SpanRelation::PROPS.ELEMENT_ID = SpanRelation_t; 1405 SpanRelation::PROPS.ACCEPTED_DATA += {Comment_t, Description_t, Feature_t, ForeignData_t, Metric_t, Relation_t}; 1406 SpanRelation::PROPS.ANNOTATIONTYPE = AnnotationType::SPANRELATION; 1407 SpanRelation::PROPS.LABEL = "Span Relation"; 1408 SpanRelation::PROPS.OPTIONAL_ATTRIBS = ID|CLASS|ANNOTATOR|N|CONFIDENCE|DATETIME|SRC|BEGINTIME|ENDTIME|SPEAKER|METADATA|TAG; 1409 SpanRelation::PROPS.PRINTABLE = false; 1410 SpanRelation::PROPS.REQUIRED_ATTRIBS = NO_ATT; 1411 SpanRelation::PROPS.SPEAKABLE = false; 1412 SpanRelation::PROPS.XMLTAG = "spanrelation"; 1413 element_props[SpanRelation_t] = &SpanRelation::PROPS; 1414 //------ SpanRelationLayer ------- 1415 SpanRelationLayer::PROPS = AbstractAnnotationLayer::PROPS; 1416 SpanRelationLayer::PROPS.ELEMENT_ID = SpanRelationLayer_t; 1417 SpanRelationLayer::PROPS.ACCEPTED_DATA += {Comment_t, Correction_t, Description_t, ForeignData_t, SpanRelation_t}; 1418 SpanRelationLayer::PROPS.ANNOTATIONTYPE = AnnotationType::SPANRELATION; 1419 SpanRelationLayer::PROPS.XMLTAG = "spanrelations"; 1420 element_props[SpanRelationLayer_t] = &SpanRelationLayer::PROPS; 1421 //------ Speech ------- 1422 Speech::PROPS = AbstractStructureElement::PROPS; 1423 Speech::PROPS.ELEMENT_ID = Speech_t; 1424 Speech::PROPS.ACCEPTED_DATA += {AbstractAnnotationLayer_t, AbstractInlineAnnotation_t, Alternative_t, AlternativeLayers_t, Comment_t, Correction_t, Description_t, Division_t, Entry_t, Event_t, Example_t, External_t, Feature_t, ForeignData_t, Gap_t, Hiddenword_t, List_t, Metric_t, Note_t, Paragraph_t, Part_t, PhonContent_t, Quote_t, Reference_t, Relation_t, Sentence_t, String_t, TextContent_t, Utterance_t, Word_t}; 1425 Speech::PROPS.LABEL = "Speech Body"; 1426 Speech::PROPS.OPTIONAL_ATTRIBS = ID|ANNOTATOR|DATETIME|SRC|BEGINTIME|ENDTIME|SPEAKER|METADATA|SPACE|TAG; 1427 Speech::PROPS.TEXTDELIMITER = "\n\n\n"; 1428 Speech::PROPS.XMLTAG = "speech"; 1429 element_props[Speech_t] = &Speech::PROPS; 1430 //------ Statement ------- 1431 Statement::PROPS = AbstractSpanAnnotation::PROPS; 1432 Statement::PROPS.ELEMENT_ID = Statement_t; 1433 Statement::PROPS.ACCEPTED_DATA += {AbstractInlineAnnotation_t, Comment_t, Description_t, Feature_t, ForeignData_t, Headspan_t, LinkReference_t, Metric_t, Relation_t, Source_t, StatementRelation_t, WordReference_t, Hiddenword_t, Morpheme_t, Phoneme_t, Word_t}; 1434 Statement::PROPS.ANNOTATIONTYPE = AnnotationType::STATEMENT; 1435 Statement::PROPS.LABEL = "Statement"; 1436 Statement::PROPS.XMLTAG = "statement"; 1437 element_props[Statement_t] = &Statement::PROPS; 1438 //------ StatementLayer ------- 1439 StatementLayer::PROPS = AbstractAnnotationLayer::PROPS; 1440 StatementLayer::PROPS.ELEMENT_ID = StatementLayer_t; 1441 StatementLayer::PROPS.ACCEPTED_DATA += {Comment_t, Correction_t, Description_t, ForeignData_t, Statement_t}; 1442 StatementLayer::PROPS.ANNOTATIONTYPE = AnnotationType::STATEMENT; 1443 StatementLayer::PROPS.XMLTAG = "statements"; 1444 element_props[StatementLayer_t] = &StatementLayer::PROPS; 1445 //------ StatementRelation ------- 1446 StatementRelation::PROPS = AbstractSpanRole::PROPS; 1447 StatementRelation::PROPS.ELEMENT_ID = StatementRelation_t; 1448 StatementRelation::PROPS.LABEL = "Relation"; 1449 StatementRelation::PROPS.OCCURRENCES = 1; 1450 StatementRelation::PROPS.XMLTAG = "rel"; 1451 element_props[StatementRelation_t] = &StatementRelation::PROPS; 1452 //------ StrengthFeature ------- 1453 StrengthFeature::PROPS = Feature::PROPS; 1454 StrengthFeature::PROPS.ELEMENT_ID = StrengthFeature_t; 1455 StrengthFeature::PROPS.SUBSET = "strength"; 1456 StrengthFeature::PROPS.XMLTAG = "strength"; 1457 element_props[StrengthFeature_t] = &StrengthFeature::PROPS; 1458 //------ String ------- 1459 String::PROPS = AbstractHigherOrderAnnotation::PROPS; 1460 String::PROPS.ELEMENT_ID = String_t; 1461 String::PROPS.ACCEPTED_DATA += {AbstractInlineAnnotation_t, Comment_t, Correction_t, Description_t, Feature_t, ForeignData_t, Metric_t, PhonContent_t, Relation_t, TextContent_t}; 1462 String::PROPS.ANNOTATIONTYPE = AnnotationType::STRING; 1463 String::PROPS.LABEL = "String"; 1464 String::PROPS.OCCURRENCES = 0; 1465 String::PROPS.OPTIONAL_ATTRIBS = ID|CLASS|ANNOTATOR|CONFIDENCE|DATETIME|N|SRC|BEGINTIME|ENDTIME|METADATA|TAG; 1466 String::PROPS.PRINTABLE = true; 1467 String::PROPS.XMLTAG = "str"; 1468 element_props[String_t] = &String::PROPS; 1469 //------ StyleFeature ------- 1470 StyleFeature::PROPS = Feature::PROPS; 1471 StyleFeature::PROPS.ELEMENT_ID = StyleFeature_t; 1472 StyleFeature::PROPS.SUBSET = "style"; 1473 StyleFeature::PROPS.XMLTAG = "style"; 1474 element_props[StyleFeature_t] = &StyleFeature::PROPS; 1475 //------ SubjectivityAnnotation ------- 1476 SubjectivityAnnotation::PROPS = AbstractInlineAnnotation::PROPS; 1477 SubjectivityAnnotation::PROPS.ELEMENT_ID = SubjectivityAnnotation_t; 1478 SubjectivityAnnotation::PROPS.ANNOTATIONTYPE = AnnotationType::SUBJECTIVITY; 1479 SubjectivityAnnotation::PROPS.LABEL = "Subjectivity/Sentiment"; 1480 SubjectivityAnnotation::PROPS.XMLTAG = "subjectivity"; 1481 element_props[SubjectivityAnnotation_t] = &SubjectivityAnnotation::PROPS; 1482 //------ Suggestion ------- 1483 Suggestion::PROPS = AbstractCorrectionChild::PROPS; 1484 Suggestion::PROPS.ELEMENT_ID = Suggestion_t; 1485 Suggestion::PROPS.ANNOTATIONTYPE = AnnotationType::CORRECTION; 1486 Suggestion::PROPS.AUTH = false; 1487 Suggestion::PROPS.OCCURRENCES = 0; 1488 Suggestion::PROPS.OPTIONAL_ATTRIBS = CONFIDENCE|N|TAG; 1489 Suggestion::PROPS.XMLTAG = "suggestion"; 1490 element_props[Suggestion_t] = &Suggestion::PROPS; 1491 //------ SynsetFeature ------- 1492 SynsetFeature::PROPS = Feature::PROPS; 1493 SynsetFeature::PROPS.ELEMENT_ID = SynsetFeature_t; 1494 SynsetFeature::PROPS.SUBSET = "synset"; 1495 SynsetFeature::PROPS.XMLTAG = "synset"; 1496 element_props[SynsetFeature_t] = &SynsetFeature::PROPS; 1497 //------ SyntacticUnit ------- 1498 SyntacticUnit::PROPS = AbstractSpanAnnotation::PROPS; 1499 SyntacticUnit::PROPS.ELEMENT_ID = SyntacticUnit_t; 1500 SyntacticUnit::PROPS.ACCEPTED_DATA += {AbstractInlineAnnotation_t, Comment_t, Description_t, Feature_t, ForeignData_t, LinkReference_t, Metric_t, Relation_t, SyntacticUnit_t, WordReference_t, Hiddenword_t, Morpheme_t, Phoneme_t, Word_t}; 1501 SyntacticUnit::PROPS.ANNOTATIONTYPE = AnnotationType::SYNTAX; 1502 SyntacticUnit::PROPS.LABEL = "Syntactic Unit"; 1503 SyntacticUnit::PROPS.XMLTAG = "su"; 1504 element_props[SyntacticUnit_t] = &SyntacticUnit::PROPS; 1505 //------ SyntaxLayer ------- 1506 SyntaxLayer::PROPS = AbstractAnnotationLayer::PROPS; 1507 SyntaxLayer::PROPS.ELEMENT_ID = SyntaxLayer_t; 1508 SyntaxLayer::PROPS.ACCEPTED_DATA += {Comment_t, Correction_t, Description_t, ForeignData_t, SyntacticUnit_t}; 1509 SyntaxLayer::PROPS.ANNOTATIONTYPE = AnnotationType::SYNTAX; 1510 SyntaxLayer::PROPS.XMLTAG = "syntax"; 1511 element_props[SyntaxLayer_t] = &SyntaxLayer::PROPS; 1512 //------ Table ------- 1513 Table::PROPS = AbstractStructureElement::PROPS; 1514 Table::PROPS.ELEMENT_ID = Table_t; 1515 Table::PROPS.ACCEPTED_DATA += {AbstractAnnotationLayer_t, AbstractInlineAnnotation_t, Alternative_t, AlternativeLayers_t, Comment_t, Correction_t, Description_t, External_t, Feature_t, ForeignData_t, Linebreak_t, Metric_t, Part_t, Relation_t, Row_t, TableHead_t}; 1516 Table::PROPS.ANNOTATIONTYPE = AnnotationType::TABLE; 1517 Table::PROPS.LABEL = "Table"; 1518 Table::PROPS.XMLTAG = "table"; 1519 element_props[Table_t] = &Table::PROPS; 1520 //------ TableHead ------- 1521 TableHead::PROPS = AbstractStructureElement::PROPS; 1522 TableHead::PROPS.ELEMENT_ID = TableHead_t; 1523 TableHead::PROPS.ACCEPTED_DATA += {AbstractAnnotationLayer_t, AbstractInlineAnnotation_t, Alternative_t, AlternativeLayers_t, Comment_t, Correction_t, Description_t, External_t, Feature_t, ForeignData_t, Metric_t, Part_t, Relation_t, Row_t}; 1524 TableHead::PROPS.LABEL = "Table Header"; 1525 TableHead::PROPS.OPTIONAL_ATTRIBS = ID|ANNOTATOR|N|CONFIDENCE|DATETIME|SRC|BEGINTIME|ENDTIME|SPEAKER|METADATA|TAG; 1526 TableHead::PROPS.XMLTAG = "tablehead"; 1527 element_props[TableHead_t] = &TableHead::PROPS; 1528 //------ Target ------- 1529 Target::PROPS = AbstractSpanRole::PROPS; 1530 Target::PROPS.ELEMENT_ID = Target_t; 1531 Target::PROPS.LABEL = "Target"; 1532 Target::PROPS.OCCURRENCES = 1; 1533 Target::PROPS.XMLTAG = "target"; 1534 element_props[Target_t] = &Target::PROPS; 1535 //------ Term ------- 1536 Term::PROPS = AbstractStructureElement::PROPS; 1537 Term::PROPS.ELEMENT_ID = Term_t; 1538 Term::PROPS.ACCEPTED_DATA += {AbstractAnnotationLayer_t, AbstractInlineAnnotation_t, Alternative_t, AlternativeLayers_t, Comment_t, Correction_t, Description_t, Event_t, External_t, Feature_t, Figure_t, ForeignData_t, Gap_t, Hiddenword_t, Linebreak_t, List_t, Metric_t, Paragraph_t, Part_t, PhonContent_t, Reference_t, Relation_t, Sentence_t, String_t, Table_t, TextContent_t, Utterance_t, Whitespace_t, Word_t}; 1539 Term::PROPS.ANNOTATIONTYPE = AnnotationType::TERM; 1540 Term::PROPS.LABEL = "Term"; 1541 Term::PROPS.XMLTAG = "term"; 1542 element_props[Term_t] = &Term::PROPS; 1543 //------ Text ------- 1544 Text::PROPS = AbstractStructureElement::PROPS; 1545 Text::PROPS.ELEMENT_ID = Text_t; 1546 Text::PROPS.ACCEPTED_DATA += {AbstractAnnotationLayer_t, AbstractInlineAnnotation_t, Alternative_t, AlternativeLayers_t, Comment_t, Correction_t, Description_t, Division_t, Entry_t, Event_t, Example_t, External_t, Feature_t, Figure_t, ForeignData_t, Gap_t, Hiddenword_t, Linebreak_t, List_t, Metric_t, Note_t, Paragraph_t, Part_t, PhonContent_t, Quote_t, Reference_t, Relation_t, Sentence_t, String_t, Table_t, TextContent_t, Whitespace_t, Word_t}; 1547 Text::PROPS.LABEL = "Text Body"; 1548 Text::PROPS.OPTIONAL_ATTRIBS = ID|ANNOTATOR|DATETIME|SRC|BEGINTIME|ENDTIME|SPEAKER|METADATA|SPACE|TAG; 1549 Text::PROPS.TEXTDELIMITER = "\n\n\n"; 1550 Text::PROPS.XMLTAG = "text"; 1551 element_props[Text_t] = &Text::PROPS; 1552 //------ TextContent ------- 1553 TextContent::PROPS = AbstractContentAnnotation::PROPS; 1554 TextContent::PROPS.ELEMENT_ID = TextContent_t; 1555 TextContent::PROPS.ACCEPTED_DATA += {AbstractTextMarkup_t, Comment_t, Description_t, Feature_t, Linebreak_t, XmlText_t}; 1556 TextContent::PROPS.ANNOTATIONTYPE = AnnotationType::TEXT; 1557 TextContent::PROPS.LABEL = "Text"; 1558 TextContent::PROPS.PRINTABLE = true; 1559 TextContent::PROPS.SPEAKABLE = false; 1560 TextContent::PROPS.TEXTCONTAINER = true; 1561 TextContent::PROPS.XLINK = true; 1562 TextContent::PROPS.XMLTAG = "t"; 1563 element_props[TextContent_t] = &TextContent::PROPS; 1564 //------ TextMarkupCorrection ------- 1565 TextMarkupCorrection::PROPS = AbstractTextMarkup::PROPS; 1566 TextMarkupCorrection::PROPS.ELEMENT_ID = TextMarkupCorrection_t; 1567 TextMarkupCorrection::PROPS.ANNOTATIONTYPE = AnnotationType::CORRECTION; 1568 TextMarkupCorrection::PROPS.XMLTAG = "t-correction"; 1569 element_props[TextMarkupCorrection_t] = &TextMarkupCorrection::PROPS; 1570 //------ TextMarkupError ------- 1571 TextMarkupError::PROPS = AbstractTextMarkup::PROPS; 1572 TextMarkupError::PROPS.ELEMENT_ID = TextMarkupError_t; 1573 TextMarkupError::PROPS.ANNOTATIONTYPE = AnnotationType::ERRORDETECTION; 1574 TextMarkupError::PROPS.XMLTAG = "t-error"; 1575 element_props[TextMarkupError_t] = &TextMarkupError::PROPS; 1576 //------ TextMarkupGap ------- 1577 TextMarkupGap::PROPS = AbstractTextMarkup::PROPS; 1578 TextMarkupGap::PROPS.ELEMENT_ID = TextMarkupGap_t; 1579 TextMarkupGap::PROPS.ANNOTATIONTYPE = AnnotationType::GAP; 1580 TextMarkupGap::PROPS.XMLTAG = "t-gap"; 1581 element_props[TextMarkupGap_t] = &TextMarkupGap::PROPS; 1582 //------ TextMarkupHSpace ------- 1583 TextMarkupHSpace::PROPS = AbstractTextMarkup::PROPS; 1584 TextMarkupHSpace::PROPS.ELEMENT_ID = TextMarkupHSpace_t; 1585 TextMarkupHSpace::PROPS.ANNOTATIONTYPE = AnnotationType::HSPACE; 1586 TextMarkupHSpace::PROPS.IMPLICITSPACE = true; 1587 TextMarkupHSpace::PROPS.TEXTDELIMITER = ""; 1588 TextMarkupHSpace::PROPS.XMLTAG = "t-hspace"; 1589 element_props[TextMarkupHSpace_t] = &TextMarkupHSpace::PROPS; 1590 //------ TextMarkupLanguage ------- 1591 TextMarkupLanguage::PROPS = AbstractTextMarkup::PROPS; 1592 TextMarkupLanguage::PROPS.ELEMENT_ID = TextMarkupLanguage_t; 1593 TextMarkupLanguage::PROPS.ANNOTATIONTYPE = AnnotationType::LANG; 1594 TextMarkupLanguage::PROPS.XMLTAG = "t-lang"; 1595 element_props[TextMarkupLanguage_t] = &TextMarkupLanguage::PROPS; 1596 //------ TextMarkupReference ------- 1597 TextMarkupReference::PROPS = AbstractTextMarkup::PROPS; 1598 TextMarkupReference::PROPS.ELEMENT_ID = TextMarkupReference_t; 1599 TextMarkupReference::PROPS.ANNOTATIONTYPE = AnnotationType::REFERENCE; 1600 TextMarkupReference::PROPS.XMLTAG = "t-ref"; 1601 element_props[TextMarkupReference_t] = &TextMarkupReference::PROPS; 1602 //------ TextMarkupString ------- 1603 TextMarkupString::PROPS = AbstractTextMarkup::PROPS; 1604 TextMarkupString::PROPS.ELEMENT_ID = TextMarkupString_t; 1605 TextMarkupString::PROPS.ANNOTATIONTYPE = AnnotationType::STRING; 1606 TextMarkupString::PROPS.XMLTAG = "t-str"; 1607 element_props[TextMarkupString_t] = &TextMarkupString::PROPS; 1608 //------ TextMarkupStyle ------- 1609 TextMarkupStyle::PROPS = AbstractTextMarkup::PROPS; 1610 TextMarkupStyle::PROPS.ELEMENT_ID = TextMarkupStyle_t; 1611 TextMarkupStyle::PROPS.ACCEPTED_DATA += {AbstractTextMarkup_t, Comment_t, Description_t, Feature_t, FontFeature_t, Linebreak_t, SizeFeature_t}; 1612 TextMarkupStyle::PROPS.ANNOTATIONTYPE = AnnotationType::STYLE; 1613 TextMarkupStyle::PROPS.XMLTAG = "t-style"; 1614 element_props[TextMarkupStyle_t] = &TextMarkupStyle::PROPS; 1615 //------ TextMarkupWhitespace ------- 1616 TextMarkupWhitespace::PROPS = AbstractTextMarkup::PROPS; 1617 TextMarkupWhitespace::PROPS.ELEMENT_ID = TextMarkupWhitespace_t; 1618 TextMarkupWhitespace::PROPS.ANNOTATIONTYPE = AnnotationType::WHITESPACE; 1619 TextMarkupWhitespace::PROPS.IMPLICITSPACE = true; 1620 TextMarkupWhitespace::PROPS.TEXTDELIMITER = ""; 1621 TextMarkupWhitespace::PROPS.XMLTAG = "t-whitespace"; 1622 element_props[TextMarkupWhitespace_t] = &TextMarkupWhitespace::PROPS; 1623 //------ TimeFeature ------- 1624 TimeFeature::PROPS = Feature::PROPS; 1625 TimeFeature::PROPS.ELEMENT_ID = TimeFeature_t; 1626 TimeFeature::PROPS.SUBSET = "time"; 1627 TimeFeature::PROPS.XMLTAG = "time"; 1628 element_props[TimeFeature_t] = &TimeFeature::PROPS; 1629 //------ TimeSegment ------- 1630 TimeSegment::PROPS = AbstractSpanAnnotation::PROPS; 1631 TimeSegment::PROPS.ELEMENT_ID = TimeSegment_t; 1632 TimeSegment::PROPS.ACCEPTED_DATA += {AbstractInlineAnnotation_t, ActorFeature_t, BegindatetimeFeature_t, Comment_t, Description_t, EnddatetimeFeature_t, Feature_t, ForeignData_t, LinkReference_t, Metric_t, Relation_t, WordReference_t, Hiddenword_t, Morpheme_t, Phoneme_t, Word_t}; 1633 TimeSegment::PROPS.ANNOTATIONTYPE = AnnotationType::TIMESEGMENT; 1634 TimeSegment::PROPS.LABEL = "Time Segment"; 1635 TimeSegment::PROPS.XMLTAG = "timesegment"; 1636 element_props[TimeSegment_t] = &TimeSegment::PROPS; 1637 //------ TimingLayer ------- 1638 TimingLayer::PROPS = AbstractAnnotationLayer::PROPS; 1639 TimingLayer::PROPS.ELEMENT_ID = TimingLayer_t; 1640 TimingLayer::PROPS.ACCEPTED_DATA += {Comment_t, Correction_t, Description_t, ForeignData_t, TimeSegment_t}; 1641 TimingLayer::PROPS.ANNOTATIONTYPE = AnnotationType::TIMESEGMENT; 1642 TimingLayer::PROPS.XMLTAG = "timing"; 1643 element_props[TimingLayer_t] = &TimingLayer::PROPS; 1644 //------ Utterance ------- 1645 Utterance::PROPS = AbstractStructureElement::PROPS; 1646 Utterance::PROPS.ELEMENT_ID = Utterance_t; 1647 Utterance::PROPS.ACCEPTED_DATA += {AbstractAnnotationLayer_t, AbstractInlineAnnotation_t, Alternative_t, AlternativeLayers_t, Comment_t, Correction_t, Description_t, External_t, Feature_t, ForeignData_t, Gap_t, Hiddenword_t, Metric_t, Note_t, Part_t, PhonContent_t, Quote_t, Reference_t, Relation_t, Sentence_t, String_t, TextContent_t, Word_t}; 1648 Utterance::PROPS.ANNOTATIONTYPE = AnnotationType::UTTERANCE; 1649 Utterance::PROPS.LABEL = "Utterance"; 1650 Utterance::PROPS.TEXTDELIMITER = " "; 1651 Utterance::PROPS.XMLTAG = "utt"; 1652 element_props[Utterance_t] = &Utterance::PROPS; 1653 //------ ValueFeature ------- 1654 ValueFeature::PROPS = Feature::PROPS; 1655 ValueFeature::PROPS.ELEMENT_ID = ValueFeature_t; 1656 ValueFeature::PROPS.SUBSET = "value"; 1657 ValueFeature::PROPS.XMLTAG = "value"; 1658 element_props[ValueFeature_t] = &ValueFeature::PROPS; 1659 //------ Whitespace ------- 1660 Whitespace::PROPS = AbstractStructureElement::PROPS; 1661 Whitespace::PROPS.ELEMENT_ID = Whitespace_t; 1662 Whitespace::PROPS.ANNOTATIONTYPE = AnnotationType::WHITESPACE; 1663 Whitespace::PROPS.IMPLICITSPACE = true; 1664 Whitespace::PROPS.LABEL = "Whitespace"; 1665 Whitespace::PROPS.TEXTDELIMITER = ""; 1666 Whitespace::PROPS.XMLTAG = "whitespace"; 1667 element_props[Whitespace_t] = &Whitespace::PROPS; 1668 //------ Word ------- 1669 Word::PROPS = AbstractStructureElement::PROPS; 1670 Word::PROPS.ELEMENT_ID = Word_t; 1671 Word::PROPS.ACCEPTED_DATA += {AbstractAnnotationLayer_t, AbstractInlineAnnotation_t, Alternative_t, AlternativeLayers_t, Comment_t, Correction_t, Description_t, External_t, Feature_t, ForeignData_t, Metric_t, Part_t, PhonContent_t, Reference_t, Relation_t, String_t, TextContent_t}; 1672 Word::PROPS.ANNOTATIONTYPE = AnnotationType::TOKEN; 1673 Word::PROPS.LABEL = "Word/Token"; 1674 Word::PROPS.OPTIONAL_ATTRIBS = ID|CLASS|ANNOTATOR|N|CONFIDENCE|DATETIME|SRC|BEGINTIME|ENDTIME|SPEAKER|TEXTCLASS|METADATA|SPACE|TAG; 1675 Word::PROPS.TEXTDELIMITER = " "; 1676 Word::PROPS.WREFABLE = true; 1677 Word::PROPS.XMLTAG = "w"; 1678 element_props[Word_t] = &Word::PROPS; 1679 //------ WordReference ------- 1680 WordReference::PROPS.ELEMENT_ID = WordReference_t; 1681 WordReference::PROPS.OPTIONAL_ATTRIBS = IDREF|TAG; 1682 WordReference::PROPS.XMLTAG = "wref"; 1683 element_props[WordReference_t] = &WordReference::PROPS; 1684 1685 //foliaspec:end:setelementproperties 1686 1687 XmlText::PROPS.XMLTAG = "_XmlText"; 1688 XmlText::PROPS.ELEMENT_ID = XmlText_t; 1689 XmlText::PROPS.TEXTDELIMITER = "*"; 1690 XmlText::PROPS.PRINTABLE = true; 1691 XmlText::PROPS.SPEAKABLE = true; 1692 1693 XmlComment::PROPS.XMLTAG = "_XmlComment"; 1694 XmlComment::PROPS.ELEMENT_ID = XmlComment_t; 1695 1696 PlaceHolder::PROPS = Word::PROPS; 1697 PlaceHolder::PROPS.XMLTAG="_PlaceHolder"; 1698 PlaceHolder::PROPS.ELEMENT_ID = PlaceHolder_t; 1699 PlaceHolder::PROPS.REQUIRED_ATTRIBS = NO_ATT; 1700 1701 for ( const auto& it : oldtags ){ 1702 reverse_old[it.second] = it.first; 1703 } 1704 1705 for ( const auto& it : annotationtype_elementtype_map ){ 1706 element_annotation_map[it.second] = it.first; 1707 } 1708 } 1709 1710 1711 //foliaspec:typehierarchy 1712 static const map<ElementType, set<ElementType> > typeHierarchy = { { AbstractAnnotationLayer_t, { } }, 1713 { AbstractContentAnnotation_t, { } }, 1714 { AbstractCorrectionChild_t, { } }, 1715 { AbstractHigherOrderAnnotation_t, { } }, 1716 { AbstractInlineAnnotation_t, { } }, 1717 { AbstractSpanAnnotation_t, { } }, 1718 { AbstractSpanRole_t, { AbstractSpanAnnotation_t } }, 1719 { AbstractStructureElement_t, { } }, 1720 { AbstractSubtokenAnnotation_t, { } }, 1721 { AbstractTextMarkup_t, { } }, 1722 { ActorFeature_t, { Feature_t,AbstractHigherOrderAnnotation_t } }, 1723 { Alternative_t, { AbstractHigherOrderAnnotation_t } }, 1724 { AlternativeLayers_t, { AbstractHigherOrderAnnotation_t } }, 1725 { BegindatetimeFeature_t, { Feature_t,AbstractHigherOrderAnnotation_t } }, 1726 { Caption_t, { AbstractStructureElement_t } }, 1727 { Cell_t, { AbstractStructureElement_t } }, 1728 { Chunk_t, { AbstractSpanAnnotation_t } }, 1729 { ChunkingLayer_t, { AbstractAnnotationLayer_t } }, 1730 { Comment_t, { AbstractHigherOrderAnnotation_t } }, 1731 { Content_t, { AbstractContentAnnotation_t } }, 1732 { CoreferenceChain_t, { AbstractSpanAnnotation_t } }, 1733 { CoreferenceLayer_t, { AbstractAnnotationLayer_t } }, 1734 { CoreferenceLink_t, { AbstractSpanRole_t,AbstractSpanAnnotation_t } }, 1735 { Correction_t, { AbstractHigherOrderAnnotation_t } }, 1736 { Cue_t, { AbstractSpanRole_t,AbstractSpanAnnotation_t } }, 1737 { Current_t, { AbstractCorrectionChild_t } }, 1738 { Definition_t, { AbstractStructureElement_t } }, 1739 { DependenciesLayer_t, { AbstractAnnotationLayer_t } }, 1740 { Dependency_t, { AbstractSpanAnnotation_t } }, 1741 { DependencyDependent_t, { AbstractSpanRole_t,AbstractSpanAnnotation_t } }, 1742 { Description_t, { AbstractHigherOrderAnnotation_t } }, 1743 { Division_t, { AbstractStructureElement_t } }, 1744 { DomainAnnotation_t, { AbstractInlineAnnotation_t } }, 1745 { EnddatetimeFeature_t, { Feature_t,AbstractHigherOrderAnnotation_t } }, 1746 { EntitiesLayer_t, { AbstractAnnotationLayer_t } }, 1747 { Entity_t, { AbstractSpanAnnotation_t } }, 1748 { Entry_t, { AbstractStructureElement_t } }, 1749 { ErrorDetection_t, { AbstractInlineAnnotation_t } }, 1750 { Event_t, { AbstractStructureElement_t } }, 1751 { Example_t, { AbstractStructureElement_t } }, 1752 { External_t, { AbstractHigherOrderAnnotation_t } }, 1753 { Feature_t, { AbstractHigherOrderAnnotation_t } }, 1754 { Figure_t, { AbstractStructureElement_t } }, 1755 { FontFeature_t, { Feature_t,AbstractHigherOrderAnnotation_t } }, 1756 { ForeignData_t, { AbstractHigherOrderAnnotation_t } }, 1757 { FunctionFeature_t, { Feature_t,AbstractHigherOrderAnnotation_t } }, 1758 { Gap_t, { AbstractHigherOrderAnnotation_t } }, 1759 { Head_t, { AbstractStructureElement_t } }, 1760 { HeadFeature_t, { Feature_t,AbstractHigherOrderAnnotation_t } }, 1761 { Headspan_t, { AbstractSpanRole_t,AbstractSpanAnnotation_t } }, 1762 { Hiddenword_t, { AbstractStructureElement_t } }, 1763 { Hyphbreak_t, { AbstractTextMarkup_t } }, 1764 { Label_t, { AbstractStructureElement_t } }, 1765 { LangAnnotation_t, { AbstractInlineAnnotation_t } }, 1766 { LemmaAnnotation_t, { AbstractInlineAnnotation_t } }, 1767 { LevelFeature_t, { Feature_t,AbstractHigherOrderAnnotation_t } }, 1768 { Linebreak_t, { AbstractStructureElement_t } }, 1769 { LinkReference_t, { } }, 1770 { List_t, { AbstractStructureElement_t } }, 1771 { ListItem_t, { AbstractStructureElement_t } }, 1772 { Metric_t, { AbstractHigherOrderAnnotation_t } }, 1773 { ModalitiesLayer_t, { AbstractAnnotationLayer_t } }, 1774 { Modality_t, { AbstractSpanAnnotation_t } }, 1775 { ModalityFeature_t, { Feature_t,AbstractHigherOrderAnnotation_t } }, 1776 { Morpheme_t, { AbstractSubtokenAnnotation_t } }, 1777 { MorphologyLayer_t, { AbstractAnnotationLayer_t } }, 1778 { New_t, { AbstractCorrectionChild_t } }, 1779 { Note_t, { AbstractStructureElement_t } }, 1780 { Observation_t, { AbstractSpanAnnotation_t } }, 1781 { ObservationLayer_t, { AbstractAnnotationLayer_t } }, 1782 { Original_t, { AbstractCorrectionChild_t } }, 1783 { Paragraph_t, { AbstractStructureElement_t } }, 1784 { Part_t, { AbstractStructureElement_t } }, 1785 { PhonContent_t, { AbstractContentAnnotation_t } }, 1786 { Phoneme_t, { AbstractSubtokenAnnotation_t } }, 1787 { PhonologyLayer_t, { AbstractAnnotationLayer_t } }, 1788 { PolarityFeature_t, { Feature_t,AbstractHigherOrderAnnotation_t } }, 1789 { PosAnnotation_t, { AbstractInlineAnnotation_t } }, 1790 { Predicate_t, { AbstractSpanAnnotation_t } }, 1791 { Quote_t, { AbstractStructureElement_t } }, 1792 { Reference_t, { AbstractStructureElement_t } }, 1793 { Relation_t, { AbstractHigherOrderAnnotation_t } }, 1794 { Row_t, { AbstractStructureElement_t } }, 1795 { Scope_t, { AbstractSpanRole_t,AbstractSpanAnnotation_t } }, 1796 { SemanticRole_t, { AbstractSpanAnnotation_t } }, 1797 { SemanticRolesLayer_t, { AbstractAnnotationLayer_t } }, 1798 { SenseAnnotation_t, { AbstractInlineAnnotation_t } }, 1799 { Sentence_t, { AbstractStructureElement_t } }, 1800 { Sentiment_t, { AbstractSpanAnnotation_t } }, 1801 { SentimentLayer_t, { AbstractAnnotationLayer_t } }, 1802 { SizeFeature_t, { Feature_t,AbstractHigherOrderAnnotation_t } }, 1803 { Source_t, { AbstractSpanRole_t,AbstractSpanAnnotation_t } }, 1804 { SpanRelation_t, { AbstractHigherOrderAnnotation_t } }, 1805 { SpanRelationLayer_t, { AbstractAnnotationLayer_t } }, 1806 { Speech_t, { AbstractStructureElement_t } }, 1807 { Statement_t, { AbstractSpanAnnotation_t } }, 1808 { StatementLayer_t, { AbstractAnnotationLayer_t } }, 1809 { StatementRelation_t, { AbstractSpanRole_t,AbstractSpanAnnotation_t } }, 1810 { StrengthFeature_t, { Feature_t,AbstractHigherOrderAnnotation_t } }, 1811 { String_t, { AbstractHigherOrderAnnotation_t } }, 1812 { StyleFeature_t, { Feature_t,AbstractHigherOrderAnnotation_t } }, 1813 { SubjectivityAnnotation_t, { AbstractInlineAnnotation_t } }, 1814 { Suggestion_t, { AbstractCorrectionChild_t } }, 1815 { SynsetFeature_t, { Feature_t,AbstractHigherOrderAnnotation_t } }, 1816 { SyntacticUnit_t, { AbstractSpanAnnotation_t } }, 1817 { SyntaxLayer_t, { AbstractAnnotationLayer_t } }, 1818 { Table_t, { AbstractStructureElement_t } }, 1819 { TableHead_t, { AbstractStructureElement_t } }, 1820 { Target_t, { AbstractSpanRole_t,AbstractSpanAnnotation_t } }, 1821 { Term_t, { AbstractStructureElement_t } }, 1822 { Text_t, { AbstractStructureElement_t } }, 1823 { TextContent_t, { AbstractContentAnnotation_t } }, 1824 { TextMarkupCorrection_t, { AbstractTextMarkup_t } }, 1825 { TextMarkupError_t, { AbstractTextMarkup_t } }, 1826 { TextMarkupGap_t, { AbstractTextMarkup_t } }, 1827 { TextMarkupHSpace_t, { AbstractTextMarkup_t } }, 1828 { TextMarkupLanguage_t, { AbstractTextMarkup_t } }, 1829 { TextMarkupReference_t, { AbstractTextMarkup_t } }, 1830 { TextMarkupString_t, { AbstractTextMarkup_t } }, 1831 { TextMarkupStyle_t, { AbstractTextMarkup_t } }, 1832 { TextMarkupWhitespace_t, { AbstractTextMarkup_t } }, 1833 { TimeFeature_t, { Feature_t,AbstractHigherOrderAnnotation_t } }, 1834 { TimeSegment_t, { AbstractSpanAnnotation_t } }, 1835 { TimingLayer_t, { AbstractAnnotationLayer_t } }, 1836 { Utterance_t, { AbstractStructureElement_t } }, 1837 { ValueFeature_t, { Feature_t,AbstractHigherOrderAnnotation_t } }, 1838 { Whitespace_t, { AbstractStructureElement_t } }, 1839 { Word_t, { AbstractStructureElement_t } }, 1840 { WordReference_t, { } }, 1841 { PlaceHolder_t , { Word_t, AbstractStructureElement_t } } 1842 }; 1843 1844 //foliaspec:oldtags_map 1845 const map<string,string> oldtags = { 1846 { "alignment", "relation" }, 1847 { "aref", "xref" }, 1848 { "complexalignment", "spanrelation" }, 1849 { "complexalignments", "spanrelations" }, 1850 { "listitem", "item" }, 1851 }; 1852 1853 map<string,string> reverse_old; 1854 map<ElementType,AnnotationType> element_annotation_map; 1855 1856 //foliaspec:wrefables 1857 //Elements that act as words and can be referable from span annotations 1858 const set<ElementType> wrefables = { Hiddenword_t, Morpheme_t, Phoneme_t, Word_t }; 1859 1860 //foliaspec:annotationtype_elementtype_map 1861 //A mapping from annotation types to element types, based on the assumption that there is always only one primary element for an annotation type (and possible multiple secondary ones which are not included in this map,w) 1862 const map<AnnotationType,ElementType> annotationtype_elementtype_map = { 1863 { AnnotationType::ALTERNATIVE, Alternative_t }, 1864 { AnnotationType::CHUNKING, Chunk_t }, 1865 { AnnotationType::COMMENT, Comment_t }, 1866 { AnnotationType::RAWCONTENT, Content_t }, 1867 { AnnotationType::COREFERENCE, CoreferenceChain_t }, 1868 { AnnotationType::CORRECTION, Correction_t }, 1869 { AnnotationType::DEFINITION, Definition_t }, 1870 { AnnotationType::DEPENDENCY, Dependency_t }, 1871 { AnnotationType::DESCRIPTION, Description_t }, 1872 { AnnotationType::DIVISION, Division_t }, 1873 { AnnotationType::DOMAIN, DomainAnnotation_t }, 1874 { AnnotationType::ENTITY, Entity_t }, 1875 { AnnotationType::ENTRY, Entry_t }, 1876 { AnnotationType::ERRORDETECTION, ErrorDetection_t }, 1877 { AnnotationType::EVENT, Event_t }, 1878 { AnnotationType::EXAMPLE, Example_t }, 1879 { AnnotationType::EXTERNAL, External_t }, 1880 { AnnotationType::FIGURE, Figure_t }, 1881 { AnnotationType::GAP, Gap_t }, 1882 { AnnotationType::HEAD, Head_t }, 1883 { AnnotationType::HIDDENTOKEN, Hiddenword_t }, 1884 { AnnotationType::HYPHENATION, Hyphbreak_t }, 1885 { AnnotationType::LANG, LangAnnotation_t }, 1886 { AnnotationType::LEMMA, LemmaAnnotation_t }, 1887 { AnnotationType::LINEBREAK, Linebreak_t }, 1888 { AnnotationType::LIST, List_t }, 1889 { AnnotationType::METRIC, Metric_t }, 1890 { AnnotationType::MODALITY, Modality_t }, 1891 { AnnotationType::MORPHOLOGICAL, Morpheme_t }, 1892 { AnnotationType::NOTE, Note_t }, 1893 { AnnotationType::OBSERVATION, Observation_t }, 1894 { AnnotationType::PARAGRAPH, Paragraph_t }, 1895 { AnnotationType::PART, Part_t }, 1896 { AnnotationType::PHON, PhonContent_t }, 1897 { AnnotationType::PHONOLOGICAL, Phoneme_t }, 1898 { AnnotationType::POS, PosAnnotation_t }, 1899 { AnnotationType::PREDICATE, Predicate_t }, 1900 { AnnotationType::QUOTE, Quote_t }, 1901 { AnnotationType::REFERENCE, Reference_t }, 1902 { AnnotationType::RELATION, Relation_t }, 1903 { AnnotationType::SEMROLE, SemanticRole_t }, 1904 { AnnotationType::SENSE, SenseAnnotation_t }, 1905 { AnnotationType::SENTENCE, Sentence_t }, 1906 { AnnotationType::SENTIMENT, Sentiment_t }, 1907 { AnnotationType::SPANRELATION, SpanRelation_t }, 1908 { AnnotationType::STATEMENT, Statement_t }, 1909 { AnnotationType::STRING, String_t }, 1910 { AnnotationType::SUBJECTIVITY, SubjectivityAnnotation_t }, 1911 { AnnotationType::SYNTAX, SyntacticUnit_t }, 1912 { AnnotationType::TABLE, Table_t }, 1913 { AnnotationType::TERM, Term_t }, 1914 { AnnotationType::TEXT, TextContent_t }, 1915 { AnnotationType::HSPACE, TextMarkupHSpace_t }, 1916 { AnnotationType::STYLE, TextMarkupStyle_t }, 1917 { AnnotationType::TIMESEGMENT, TimeSegment_t }, 1918 { AnnotationType::UTTERANCE, Utterance_t }, 1919 { AnnotationType::WHITESPACE, Whitespace_t }, 1920 { AnnotationType::TOKEN, Word_t }, 1921 }; 1922 1923 //foliaspec:annotationtype_xml_map 1924 //A mapping from annotation types to xml tags (strings) 1925 const map<AnnotationType,string> annotationtype_xml_map = { 1926 { AnnotationType::ALTERNATIVE, "alt" }, 1927 { AnnotationType::CHUNKING, "chunk" }, 1928 { AnnotationType::COMMENT, "comment" }, 1929 { AnnotationType::RAWCONTENT, "content" }, 1930 { AnnotationType::COREFERENCE, "coreferencechain" }, 1931 { AnnotationType::CORRECTION, "correction" }, 1932 { AnnotationType::DEFINITION, "def" }, 1933 { AnnotationType::DEPENDENCY, "dependency" }, 1934 { AnnotationType::DESCRIPTION, "desc" }, 1935 { AnnotationType::DIVISION, "div" }, 1936 { AnnotationType::DOMAIN, "domain" }, 1937 { AnnotationType::ENTITY, "entity" }, 1938 { AnnotationType::ENTRY, "entry" }, 1939 { AnnotationType::ERRORDETECTION, "errordetection" }, 1940 { AnnotationType::EVENT, "event" }, 1941 { AnnotationType::EXAMPLE, "ex" }, 1942 { AnnotationType::EXTERNAL, "external" }, 1943 { AnnotationType::FIGURE, "figure" }, 1944 { AnnotationType::GAP, "gap" }, 1945 { AnnotationType::HEAD, "head" }, 1946 { AnnotationType::HIDDENTOKEN, "hiddenw" }, 1947 { AnnotationType::HYPHENATION, "t-hbr" }, 1948 { AnnotationType::LANG, "lang" }, 1949 { AnnotationType::LEMMA, "lemma" }, 1950 { AnnotationType::LINEBREAK, "br" }, 1951 { AnnotationType::LIST, "list" }, 1952 { AnnotationType::METRIC, "metric" }, 1953 { AnnotationType::MODALITY, "modality" }, 1954 { AnnotationType::MORPHOLOGICAL, "morpheme" }, 1955 { AnnotationType::NOTE, "note" }, 1956 { AnnotationType::OBSERVATION, "observation" }, 1957 { AnnotationType::PARAGRAPH, "p" }, 1958 { AnnotationType::PART, "part" }, 1959 { AnnotationType::PHON, "ph" }, 1960 { AnnotationType::PHONOLOGICAL, "phoneme" }, 1961 { AnnotationType::POS, "pos" }, 1962 { AnnotationType::PREDICATE, "predicate" }, 1963 { AnnotationType::QUOTE, "quote" }, 1964 { AnnotationType::REFERENCE, "ref" }, 1965 { AnnotationType::RELATION, "relation" }, 1966 { AnnotationType::SEMROLE, "semrole" }, 1967 { AnnotationType::SENSE, "sense" }, 1968 { AnnotationType::SENTENCE, "s" }, 1969 { AnnotationType::SENTIMENT, "sentiment" }, 1970 { AnnotationType::SPANRELATION, "spanrelation" }, 1971 { AnnotationType::STATEMENT, "statement" }, 1972 { AnnotationType::STRING, "str" }, 1973 { AnnotationType::SUBJECTIVITY, "subjectivity" }, 1974 { AnnotationType::SYNTAX, "su" }, 1975 { AnnotationType::TABLE, "table" }, 1976 { AnnotationType::TERM, "term" }, 1977 { AnnotationType::TEXT, "t" }, 1978 { AnnotationType::HSPACE, "t-hspace" }, 1979 { AnnotationType::STYLE, "t-style" }, 1980 { AnnotationType::TIMESEGMENT, "timesegment" }, 1981 { AnnotationType::UTTERANCE, "utt" }, 1982 { AnnotationType::WHITESPACE, "whitespace" }, 1983 { AnnotationType::TOKEN, "w" }, 1984 }; 1985 properties()1986 properties::properties() { 1987 //foliaspec:begin:defaultproperties 1988 //Default properties which all elements inherit 1989 ELEMENT_ID = BASE; 1990 ACCEPTED_DATA.insert(XmlComment_t); 1991 ACCEPTED_DATA += {Description_t, Comment_t}; 1992 ANNOTATIONTYPE = AnnotationType::NO_ANN; 1993 AUTH = true; 1994 AUTO_GENERATE_ID = false; 1995 HIDDEN = false; 1996 IMPLICITSPACE = false; 1997 OCCURRENCES = 0; 1998 OCCURRENCES_PER_SET = 0; 1999 OPTIONAL_ATTRIBS = NO_ATT; 2000 PHONCONTAINER = false; 2001 PRINTABLE = false; 2002 REQUIRED_ATTRIBS = NO_ATT; 2003 REQUIRED_DATA = {}; 2004 SETONLY = false; 2005 SPEAKABLE = false; 2006 SUBSET = ""; 2007 TEXTCONTAINER = false; 2008 TEXTDELIMITER = "NONE"; 2009 WREFABLE = false; 2010 XLINK = false; 2011 XMLTAG = "NONE"; 2012 2013 //foliaspec:end:defaultproperties 2014 } 2015 2016 const int XML_PARSER_OPTIONS = XML_PARSE_NSCLEAN|XML_PARSE_HUGE; 2017 private_createElement(ElementType et)2018 FoliaElement *FoliaElement::private_createElement( ElementType et ){ 2019 switch ( et ){ 2020 case BASE: return new FoLiA(); 2021 case Text_t: return new Text(); 2022 case Speech_t: return new Speech(); 2023 case Utterance_t: return new Utterance(); 2024 case ForeignData_t: return new ForeignData(); 2025 case Entry_t: return new Entry(); 2026 case Example_t: return new Example(); 2027 case Term_t: return new Term(); 2028 case Definition_t: return new Definition(); 2029 case PhonContent_t: return new PhonContent(); 2030 case Word_t: return new Word(); 2031 case String_t: return new String(); 2032 case Event_t: return new Event(); 2033 case TimeSegment_t: return new TimeSegment(); 2034 case TimingLayer_t: return new TimingLayer(); 2035 case Sentence_t: return new Sentence(); 2036 case TextContent_t: return new TextContent(); 2037 case Linebreak_t: return new Linebreak(); 2038 case Whitespace_t: return new Whitespace(); 2039 case Comment_t: return new Comment(); 2040 case Figure_t: return new Figure(); 2041 case Caption_t: return new Caption(); 2042 case Label_t: return new Label(); 2043 case List_t: return new List(); 2044 case ListItem_t: return new ListItem(); 2045 case Paragraph_t: return new Paragraph(); 2046 case New_t: return new New(); 2047 case Original_t: return new Original(); 2048 case Current_t: return new Current(); 2049 case Suggestion_t: return new Suggestion(); 2050 case Head_t: return new Head(); 2051 case Table_t: return new Table(); 2052 case TableHead_t: return new TableHead(); 2053 case Cell_t: return new Cell(); 2054 case Row_t: return new Row(); 2055 case LangAnnotation_t: return new LangAnnotation(); 2056 case XmlComment_t: return new XmlComment(); 2057 case XmlText_t: return new XmlText(); 2058 case External_t: return new External(); 2059 case Note_t: return new Note(); 2060 case Reference_t: return new Reference(); 2061 case Description_t: return new Description(); 2062 case Gap_t: return new Gap(); 2063 case Content_t: return new Content(); 2064 case Metric_t: return new Metric(); 2065 case Division_t: return new Division(); 2066 case PosAnnotation_t: return new PosAnnotation(); 2067 case LemmaAnnotation_t: return new LemmaAnnotation(); 2068 case PhonologyLayer_t: return new PhonologyLayer(); 2069 case Phoneme_t: return new Phoneme(); 2070 case DomainAnnotation_t: return new DomainAnnotation(); 2071 case SenseAnnotation_t: return new SenseAnnotation(); 2072 case SyntaxLayer_t: return new SyntaxLayer(); 2073 case SubjectivityAnnotation_t: return new SubjectivityAnnotation(); 2074 case Chunk_t: return new Chunk(); 2075 case ChunkingLayer_t: return new ChunkingLayer(); 2076 case Entity_t: return new Entity(); 2077 case EntitiesLayer_t: return new EntitiesLayer(); 2078 case SemanticRolesLayer_t: return new SemanticRolesLayer(); 2079 case SemanticRole_t: return new SemanticRole(); 2080 case CoreferenceLayer_t: return new CoreferenceLayer(); 2081 case CoreferenceLink_t: return new CoreferenceLink(); 2082 case CoreferenceChain_t: return new CoreferenceChain(); 2083 case Alternative_t: return new Alternative(); 2084 case PlaceHolder_t: return new PlaceHolder(); 2085 case AlternativeLayers_t: return new AlternativeLayers(); 2086 case SyntacticUnit_t: return new SyntacticUnit(); 2087 case WordReference_t: return new WordReference(); 2088 case Correction_t: return new Correction(); 2089 case ErrorDetection_t: return new ErrorDetection(); 2090 case MorphologyLayer_t: return new MorphologyLayer(); 2091 case Morpheme_t: return new Morpheme(); 2092 case Feature_t: return new Feature(); 2093 case BegindatetimeFeature_t: return new BegindatetimeFeature(); 2094 case EnddatetimeFeature_t: return new EnddatetimeFeature(); 2095 case SynsetFeature_t: return new SynsetFeature(); 2096 case ActorFeature_t: return new ActorFeature(); 2097 case HeadFeature_t: return new HeadFeature(); 2098 case ValueFeature_t: return new ValueFeature(); 2099 case TimeFeature_t: return new TimeFeature(); 2100 case ModalityFeature_t: return new ModalityFeature(); 2101 case FunctionFeature_t: return new FunctionFeature(); 2102 case LevelFeature_t: return new LevelFeature(); 2103 case FontFeature_t: return new FontFeature(); 2104 case SizeFeature_t: return new SizeFeature(); 2105 case Quote_t: return new Quote(); 2106 case DependenciesLayer_t: return new DependenciesLayer(); 2107 case Dependency_t: return new Dependency(); 2108 case DependencyDependent_t: return new DependencyDependent(); 2109 case Headspan_t: return new Headspan(); 2110 case SpanRelationLayer_t: return new SpanRelationLayer(); 2111 case SpanRelation_t: return new SpanRelation(); 2112 case LinkReference_t: return new LinkReference(); 2113 case TextMarkupString_t: return new TextMarkupString(); 2114 case TextMarkupGap_t: return new TextMarkupGap(); 2115 case TextMarkupCorrection_t: return new TextMarkupCorrection(); 2116 case TextMarkupError_t: return new TextMarkupError(); 2117 case TextMarkupStyle_t: return new TextMarkupStyle(); 2118 case TextMarkupHSpace_t: return new TextMarkupHSpace(); 2119 case TextMarkupLanguage_t: return new TextMarkupLanguage(); 2120 case TextMarkupWhitespace_t: return new TextMarkupWhitespace(); 2121 case TextMarkupReference_t: return new TextMarkupReference(); 2122 case Part_t: return new Part(); 2123 case Observation_t: return new Observation(); 2124 case ObservationLayer_t: return new ObservationLayer(); 2125 case PolarityFeature_t: return new PolarityFeature(); 2126 case Predicate_t: return new Predicate(); 2127 case Relation_t: return new Relation(); 2128 case Sentiment_t: return new Sentiment(); 2129 case Modality_t: return new Modality(); 2130 case SentimentLayer_t: return new SentimentLayer(); 2131 case ModalitiesLayer_t: return new ModalitiesLayer(); 2132 case Statement_t: return new Statement(); 2133 case StatementRelation_t: return new StatementRelation(); 2134 case StatementLayer_t: return new StatementLayer(); 2135 case StrengthFeature_t: return new StrengthFeature(); 2136 case StyleFeature_t: return new StyleFeature(); 2137 case Source_t: return new Source(); 2138 case Target_t: return new Target(); 2139 case Scope_t: return new Scope(); 2140 case Cue_t: return new Cue(); 2141 case Hiddenword_t: return new Hiddenword(); 2142 case Hyphbreak_t: return new Hyphbreak(); 2143 case AbstractContentAnnotation_t: 2144 case AbstractHigherOrderAnnotation_t: 2145 case AbstractSubtokenAnnotation_t: 2146 case AbstractSpanAnnotation_t: 2147 case AbstractSpanRole_t: 2148 case AbstractAnnotationLayer_t: 2149 case AbstractTextMarkup_t: 2150 case AbstractInlineAnnotation_t: 2151 case AbstractStructureElement_t: 2152 case AbstractCorrectionChild_t: 2153 throw ValueError( "you may not create an abstract node of type " 2154 + TiCC::toString(int(et)) + ")" ); 2155 default: 2156 throw ValueError( "private_createElement: unknown elementtype(" 2157 + TiCC::toString(int(et)) + ")" ); 2158 } 2159 return 0; 2160 } 2161 isSubClass(const ElementType e1,const ElementType e2)2162 bool isSubClass( const ElementType e1, const ElementType e2 ){ 2163 /// check if an ElementType is a subclass of another one 2164 /*! 2165 \param e1 an ElementType 2166 \param e2 an ElementType 2167 \return true if e1 is in the typeHierarchy of e2 2168 */ 2169 if ( e1 == e2 ) 2170 return true; 2171 const auto& it = typeHierarchy.find( e1 ); 2172 if ( it != typeHierarchy.end() ){ 2173 return it->second.find( e2 ) != it->second.end(); 2174 } 2175 return false; 2176 } 2177 isSubClass(const FoliaElement * e1,const FoliaElement * e2)2178 bool isSubClass( const FoliaElement *e1, const FoliaElement *e2 ){ 2179 /// check if a FoliaElement is a subclass of another one 2180 /*! 2181 \param e1 a FoliaElement 2182 \param e2 a FoliaElement 2183 \return true if e1 is a subclass of e2 2184 This is about C++ class inheritance: is our class a derivative of c's 2185 class? 2186 */ 2187 return isSubClass( e1->element_id(), e2->element_id() ); 2188 } 2189 isSubClass(ElementType t) const2190 bool FoliaElement::isSubClass( ElementType t ) const { 2191 /// check if this FoliaElement is a subclass of the ElementType \e t 2192 /*! 2193 \param t an ElementType 2194 \return true if our class is a subclass of t 2195 This is about C++ class inheritance: is our class a derivative of c's 2196 class? 2197 */ 2198 return folia::isSubClass( element_id(), t ); 2199 } 2200 isAttributeFeature(const string & att)2201 bool isAttributeFeature( const string& att ){ 2202 /// check if an attribute is to be handled as a feature 2203 /*! 2204 \param att the attribute to check 2205 \return true if this attribute has to be stored internally as an Feature 2206 2207 example, the FoLiA fragment: 2208 \verbatim 2209 <sentiment xml:id="sentiment.1" class="disappointment" polarity="negative" strength="strong"> 2210 \endverbatim 2211 2212 will internally be stored as 2213 \verbatim 2214 <sentiment class="disappointment"> 2215 <polarity class="negative"/> 2216 <strength class="strong"/> 2217 </sentiment> 2218 \endverbatim 2219 because polarity and strenght are AttributeFeatures 2220 */ 2221 return AttributeFeatures.find( att ) != AttributeFeatures.end(); 2222 } 2223 print_type_hierarchy(ostream & os)2224 void print_type_hierarchy( ostream& os ){ 2225 /// output the type hierarchy. DEBUGGING PURPOSES ONLY 2226 for ( auto const& top : typeHierarchy ){ 2227 os << toString(top.first) << endl; 2228 for ( auto const& el : top.second ){ 2229 os << " -- " << toString(el) << endl; 2230 } 2231 } 2232 } 2233 2234 namespace { 2235 // 2236 // this trick assures that the static_int() function is called 2237 // exactly once en every run. 2238 // This because the static 'i' is initialized before main() starts. 2239 // 2240 struct initializer { initializerfolia::__anon5816e9910111::initializer2241 initializer() { 2242 static_init(); 2243 // print_type_hierarchy( cout ); 2244 } ~initializerfolia::__anon5816e9910111::initializer2245 ~initializer() { 2246 // cout << "Unloading the properties" << endl; 2247 // cout << "but don't care.." << endl; 2248 } 2249 }; 2250 static initializer i; 2251 } 2252 2253 } 2254