Skip to content

Commit

Permalink
regenerated foliaspec for v2.4.2 (proycon/folia#89 proycon/folia#90)
Browse files Browse the repository at this point in the history
  • Loading branch information
proycon committed Dec 17, 2020
1 parent 42b4e62 commit 528827c
Show file tree
Hide file tree
Showing 2 changed files with 65 additions and 9 deletions.
66 changes: 59 additions & 7 deletions src/specification.rs
Original file line number Diff line number Diff line change
Expand Up @@ -948,6 +948,32 @@ impl Properties {
properties.label = "Figure";
properties
},
ElementType::FontFeature => {
let mut properties = Properties::default();
properties.xmltag = "";
properties.annotationtype = None;
properties.accepted_data = &[AcceptedData::AcceptElementType(ElementType::Comment), AcceptedData::AcceptElementType(ElementType::Description)];
properties.required_data = &[];
properties.required_attribs = &[];
properties.optional_attribs = &[];
properties.occurrences = 0;
properties.occurrences_per_set = 0;
properties.textdelimiter = None;
properties.printable = false;
properties.speakable = false;
properties.hidden = false;
properties.xlink = false;
properties.textcontainer = false;
properties.phoncontainer = false;
properties.subset = Some("font");
properties.auth = true;
properties.primaryelement = true;
properties.auto_generate_id = false;
properties.setonly = false;
properties.wrefable = false;
properties.label = "Feature";
properties
},
ElementType::ForeignData => {
let mut properties = Properties::default();
properties.xmltag = "foreign-data";
Expand Down Expand Up @@ -1133,7 +1159,7 @@ impl Properties {
let mut properties = Properties::default();
properties.xmltag = "t-hbr";
properties.annotationtype = Some(AnnotationType::HYPHENATION);
properties.accepted_data = &[AcceptedData::AcceptElementGroup(ElementGroup::TextMarkup), AcceptedData::AcceptElementType(ElementType::Comment), AcceptedData::AcceptElementType(ElementType::Description), AcceptedData::AcceptElementType(ElementType::Linebreak)];
properties.accepted_data = &[AcceptedData::AcceptElementGroup(ElementGroup::TextMarkup), AcceptedData::AcceptElementType(ElementType::Comment), AcceptedData::AcceptElementType(ElementType::Description), AcceptedData::AcceptElementType(ElementType::Feature), AcceptedData::AcceptElementType(ElementType::Linebreak)];
properties.required_data = &[];
properties.required_attribs = &[];
properties.optional_attribs = &[ AttribType::ANNOTATOR,AttribType::BEGINTIME,AttribType::CLASS,AttribType::CONFIDENCE,AttribType::DATETIME,AttribType::ENDTIME,AttribType::ID,AttribType::METADATA,AttribType::N,AttribType::SPEAKER,AttribType::SRC ];
Expand Down Expand Up @@ -2134,6 +2160,32 @@ impl Properties {
properties.wrefable = false;
properties
},
ElementType::SizeFeature => {
let mut properties = Properties::default();
properties.xmltag = "";
properties.annotationtype = None;
properties.accepted_data = &[AcceptedData::AcceptElementType(ElementType::Comment), AcceptedData::AcceptElementType(ElementType::Description)];
properties.required_data = &[];
properties.required_attribs = &[];
properties.optional_attribs = &[];
properties.occurrences = 0;
properties.occurrences_per_set = 0;
properties.textdelimiter = None;
properties.printable = false;
properties.speakable = false;
properties.hidden = false;
properties.xlink = false;
properties.textcontainer = false;
properties.phoncontainer = false;
properties.subset = Some("size");
properties.auth = true;
properties.primaryelement = true;
properties.auto_generate_id = false;
properties.setonly = false;
properties.wrefable = false;
properties.label = "Feature";
properties
},
ElementType::Source => {
let mut properties = Properties::default();
properties.xmltag = "source";
Expand Down Expand Up @@ -2680,7 +2732,7 @@ impl Properties {
let mut properties = Properties::default();
properties.xmltag = "t-correction";
properties.annotationtype = Some(AnnotationType::CORRECTION);
properties.accepted_data = &[AcceptedData::AcceptElementGroup(ElementGroup::TextMarkup), AcceptedData::AcceptElementType(ElementType::Comment), AcceptedData::AcceptElementType(ElementType::Description), AcceptedData::AcceptElementType(ElementType::Linebreak)];
properties.accepted_data = &[AcceptedData::AcceptElementGroup(ElementGroup::TextMarkup), AcceptedData::AcceptElementType(ElementType::Comment), AcceptedData::AcceptElementType(ElementType::Description), AcceptedData::AcceptElementType(ElementType::Feature), AcceptedData::AcceptElementType(ElementType::Linebreak)];
properties.required_data = &[];
properties.required_attribs = &[];
properties.optional_attribs = &[ AttribType::ANNOTATOR,AttribType::BEGINTIME,AttribType::CLASS,AttribType::CONFIDENCE,AttribType::DATETIME,AttribType::ENDTIME,AttribType::ID,AttribType::METADATA,AttribType::N,AttribType::SPEAKER,AttribType::SRC ];
Expand All @@ -2705,7 +2757,7 @@ impl Properties {
let mut properties = Properties::default();
properties.xmltag = "t-error";
properties.annotationtype = Some(AnnotationType::ERRORDETECTION);
properties.accepted_data = &[AcceptedData::AcceptElementGroup(ElementGroup::TextMarkup), AcceptedData::AcceptElementType(ElementType::Comment), AcceptedData::AcceptElementType(ElementType::Description), AcceptedData::AcceptElementType(ElementType::Linebreak)];
properties.accepted_data = &[AcceptedData::AcceptElementGroup(ElementGroup::TextMarkup), AcceptedData::AcceptElementType(ElementType::Comment), AcceptedData::AcceptElementType(ElementType::Description), AcceptedData::AcceptElementType(ElementType::Feature), AcceptedData::AcceptElementType(ElementType::Linebreak)];
properties.required_data = &[];
properties.required_attribs = &[];
properties.optional_attribs = &[ AttribType::ANNOTATOR,AttribType::BEGINTIME,AttribType::CLASS,AttribType::CONFIDENCE,AttribType::DATETIME,AttribType::ENDTIME,AttribType::ID,AttribType::METADATA,AttribType::N,AttribType::SPEAKER,AttribType::SRC ];
Expand All @@ -2730,7 +2782,7 @@ impl Properties {
let mut properties = Properties::default();
properties.xmltag = "t-gap";
properties.annotationtype = Some(AnnotationType::GAP);
properties.accepted_data = &[AcceptedData::AcceptElementGroup(ElementGroup::TextMarkup), AcceptedData::AcceptElementType(ElementType::Comment), AcceptedData::AcceptElementType(ElementType::Description), AcceptedData::AcceptElementType(ElementType::Linebreak)];
properties.accepted_data = &[AcceptedData::AcceptElementGroup(ElementGroup::TextMarkup), AcceptedData::AcceptElementType(ElementType::Comment), AcceptedData::AcceptElementType(ElementType::Description), AcceptedData::AcceptElementType(ElementType::Feature), AcceptedData::AcceptElementType(ElementType::Linebreak)];
properties.required_data = &[];
properties.required_attribs = &[];
properties.optional_attribs = &[ AttribType::ANNOTATOR,AttribType::BEGINTIME,AttribType::CLASS,AttribType::CONFIDENCE,AttribType::DATETIME,AttribType::ENDTIME,AttribType::ID,AttribType::METADATA,AttribType::N,AttribType::SPEAKER,AttribType::SRC ];
Expand All @@ -2755,7 +2807,7 @@ impl Properties {
let mut properties = Properties::default();
properties.xmltag = "t-ref";
properties.annotationtype = Some(AnnotationType::REFERENCE);
properties.accepted_data = &[AcceptedData::AcceptElementGroup(ElementGroup::TextMarkup), AcceptedData::AcceptElementType(ElementType::Comment), AcceptedData::AcceptElementType(ElementType::Description), AcceptedData::AcceptElementType(ElementType::Linebreak)];
properties.accepted_data = &[AcceptedData::AcceptElementGroup(ElementGroup::TextMarkup), AcceptedData::AcceptElementType(ElementType::Comment), AcceptedData::AcceptElementType(ElementType::Description), AcceptedData::AcceptElementType(ElementType::Feature), AcceptedData::AcceptElementType(ElementType::Linebreak)];
properties.required_data = &[];
properties.required_attribs = &[];
properties.optional_attribs = &[ AttribType::ANNOTATOR,AttribType::BEGINTIME,AttribType::CLASS,AttribType::CONFIDENCE,AttribType::DATETIME,AttribType::ENDTIME,AttribType::ID,AttribType::METADATA,AttribType::N,AttribType::SPEAKER,AttribType::SRC ];
Expand All @@ -2780,7 +2832,7 @@ impl Properties {
let mut properties = Properties::default();
properties.xmltag = "t-str";
properties.annotationtype = Some(AnnotationType::STRING);
properties.accepted_data = &[AcceptedData::AcceptElementGroup(ElementGroup::TextMarkup), AcceptedData::AcceptElementType(ElementType::Comment), AcceptedData::AcceptElementType(ElementType::Description), AcceptedData::AcceptElementType(ElementType::Linebreak)];
properties.accepted_data = &[AcceptedData::AcceptElementGroup(ElementGroup::TextMarkup), AcceptedData::AcceptElementType(ElementType::Comment), AcceptedData::AcceptElementType(ElementType::Description), AcceptedData::AcceptElementType(ElementType::Feature), AcceptedData::AcceptElementType(ElementType::Linebreak)];
properties.required_data = &[];
properties.required_attribs = &[];
properties.optional_attribs = &[ AttribType::ANNOTATOR,AttribType::BEGINTIME,AttribType::CLASS,AttribType::CONFIDENCE,AttribType::DATETIME,AttribType::ENDTIME,AttribType::ID,AttribType::METADATA,AttribType::N,AttribType::SPEAKER,AttribType::SRC ];
Expand All @@ -2805,7 +2857,7 @@ impl Properties {
let mut properties = Properties::default();
properties.xmltag = "t-style";
properties.annotationtype = Some(AnnotationType::STYLE);
properties.accepted_data = &[AcceptedData::AcceptElementGroup(ElementGroup::TextMarkup), AcceptedData::AcceptElementType(ElementType::Comment), AcceptedData::AcceptElementType(ElementType::Description), AcceptedData::AcceptElementType(ElementType::Linebreak)];
properties.accepted_data = &[AcceptedData::AcceptElementGroup(ElementGroup::TextMarkup), AcceptedData::AcceptElementType(ElementType::Comment), AcceptedData::AcceptElementType(ElementType::Description), AcceptedData::AcceptElementType(ElementType::Feature), AcceptedData::AcceptElementType(ElementType::FontFeature), AcceptedData::AcceptElementType(ElementType::Linebreak), AcceptedData::AcceptElementType(ElementType::SizeFeature)];
properties.required_data = &[];
properties.required_attribs = &[];
properties.optional_attribs = &[ AttribType::ANNOTATOR,AttribType::BEGINTIME,AttribType::CLASS,AttribType::CONFIDENCE,AttribType::DATETIME,AttribType::ENDTIME,AttribType::ID,AttribType::METADATA,AttribType::N,AttribType::SPEAKER,AttribType::SRC ];
Expand Down
8 changes: 6 additions & 2 deletions src/types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ pub type Subset = String;
#[derive(Copy,Clone,PartialEq,Eq,PartialOrd,Hash,EnumIter,Serialize,Deserialize)]
///This represents the type of a FoLiA element.
//foliaspec:elementtype
pub enum ElementType { ActorFeature, Alternative, AlternativeLayers, BegindatetimeFeature, Caption, Cell, Chunk, ChunkingLayer, Comment, Content, CoreferenceChain, CoreferenceLayer, CoreferenceLink, Correction, Cue, Current, Definition, DependenciesLayer, Dependency, DependencyDependent, Description, Division, DomainAnnotation, EnddatetimeFeature, EntitiesLayer, Entity, Entry, ErrorDetection, Event, Example, External, Feature, Figure, ForeignData, FunctionFeature, Gap, Head, HeadFeature, Headspan, Hiddenword, Hyphbreak, Label, LangAnnotation, LemmaAnnotation, LevelFeature, Linebreak, LinkReference, List, ListItem, Metric, ModalitiesLayer, Modality, ModalityFeature, Morpheme, MorphologyLayer, New, Note, Observation, ObservationLayer, Original, Paragraph, Part, PhonContent, Phoneme, PhonologyLayer, PolarityFeature, PosAnnotation, Predicate, Quote, Reference, Relation, Row, Scope, SemanticRole, SemanticRolesLayer, SenseAnnotation, Sentence, Sentiment, SentimentLayer, Source, SpanRelation, SpanRelationLayer, Speech, Statement, StatementLayer, StatementRelation, StrengthFeature, String, StyleFeature, SubjectivityAnnotation, Suggestion, SynsetFeature, SyntacticUnit, SyntaxLayer, Table, TableHead, Target, Term, Text, TextContent, TextMarkupCorrection, TextMarkupError, TextMarkupGap, TextMarkupReference, TextMarkupString, TextMarkupStyle, TimeFeature, TimeSegment, TimingLayer, Utterance, ValueFeature, Whitespace, Word, WordReference }
pub enum ElementType { ActorFeature, Alternative, AlternativeLayers, BegindatetimeFeature, Caption, Cell, Chunk, ChunkingLayer, Comment, Content, CoreferenceChain, CoreferenceLayer, CoreferenceLink, Correction, Cue, Current, Definition, DependenciesLayer, Dependency, DependencyDependent, Description, Division, DomainAnnotation, EnddatetimeFeature, EntitiesLayer, Entity, Entry, ErrorDetection, Event, Example, External, Feature, Figure, FontFeature, ForeignData, FunctionFeature, Gap, Head, HeadFeature, Headspan, Hiddenword, Hyphbreak, Label, LangAnnotation, LemmaAnnotation, LevelFeature, Linebreak, LinkReference, List, ListItem, Metric, ModalitiesLayer, Modality, ModalityFeature, Morpheme, MorphologyLayer, New, Note, Observation, ObservationLayer, Original, Paragraph, Part, PhonContent, Phoneme, PhonologyLayer, PolarityFeature, PosAnnotation, Predicate, Quote, Reference, Relation, Row, Scope, SemanticRole, SemanticRolesLayer, SenseAnnotation, Sentence, Sentiment, SentimentLayer, SizeFeature, Source, SpanRelation, SpanRelationLayer, Speech, Statement, StatementLayer, StatementRelation, StrengthFeature, String, StyleFeature, SubjectivityAnnotation, Suggestion, SynsetFeature, SyntacticUnit, SyntaxLayer, Table, TableHead, Target, Term, Text, TextContent, TextMarkupCorrection, TextMarkupError, TextMarkupGap, TextMarkupReference, TextMarkupString, TextMarkupStyle, TimeFeature, TimeSegment, TimingLayer, Utterance, ValueFeature, Whitespace, Word, WordReference }

#[derive(Copy,Clone,PartialEq,Debug,Hash,EnumIter,Serialize,Deserialize)]
///This represents groups of element types that share similar characteristics.
Expand All @@ -49,7 +49,7 @@ impl ElementGroup {
ElementGroup::Structure => &[ElementType::Caption,ElementType::Cell,ElementType::Definition,ElementType::Division,ElementType::Entry,ElementType::Event,ElementType::Example,ElementType::Figure,ElementType::Head,ElementType::Hiddenword,ElementType::Label,ElementType::Linebreak,ElementType::List,ElementType::ListItem,ElementType::Note,ElementType::Paragraph,ElementType::Part,ElementType::Quote,ElementType::Reference,ElementType::Row,ElementType::Sentence,ElementType::Speech,ElementType::Table,ElementType::TableHead,ElementType::Term,ElementType::Text,ElementType::Utterance,ElementType::Whitespace,ElementType::Word],
ElementGroup::Subtoken => &[ElementType::Morpheme,ElementType::Phoneme],
ElementGroup::TextMarkup => &[ElementType::TextMarkupCorrection,ElementType::TextMarkupError,ElementType::TextMarkupGap,ElementType::TextMarkupString,ElementType::TextMarkupStyle,ElementType::Hyphbreak,ElementType::TextMarkupReference],
ElementGroup::Feature => &[ElementType::ActorFeature,ElementType::BegindatetimeFeature,ElementType::EnddatetimeFeature,ElementType::FunctionFeature,ElementType::HeadFeature,ElementType::LevelFeature,ElementType::ModalityFeature,ElementType::PolarityFeature,ElementType::StrengthFeature,ElementType::StyleFeature,ElementType::SynsetFeature,ElementType::TimeFeature,ElementType::ValueFeature],
ElementGroup::Feature => &[ElementType::ActorFeature,ElementType::BegindatetimeFeature,ElementType::EnddatetimeFeature,ElementType::FunctionFeature,ElementType::HeadFeature,ElementType::LevelFeature,ElementType::ModalityFeature,ElementType::PolarityFeature,ElementType::StrengthFeature,ElementType::StyleFeature,ElementType::SynsetFeature,ElementType::TimeFeature,ElementType::ValueFeature,ElementType::FontFeature,ElementType::SizeFeature],
}

//leave the above line empty for foliaspec to detect the end!
Expand Down Expand Up @@ -508,6 +508,7 @@ impl ElementType {
ElementType::External => "external",
ElementType::Feature => "feat",
ElementType::Figure => "figure",
ElementType::FontFeature => "font",
ElementType::ForeignData => "foreign-data",
ElementType::FunctionFeature => "function",
ElementType::Gap => "gap",
Expand Down Expand Up @@ -554,6 +555,7 @@ impl ElementType {
ElementType::Sentence => "s",
ElementType::Sentiment => "sentiment",
ElementType::SentimentLayer => "sentiments",
ElementType::SizeFeature => "size",
ElementType::Source => "source",
ElementType::SpanRelation => "spanrelation",
ElementType::SpanRelationLayer => "spanrelations",
Expand Down Expand Up @@ -661,6 +663,7 @@ impl std::str::FromStr for ElementType {
"external" => Ok(ElementType::External),
"feat" => Ok(ElementType::Feature),
"figure" => Ok(ElementType::Figure),
"font" => Ok(ElementType::FontFeature),
"foreign-data" => Ok(ElementType::ForeignData),
"function" => Ok(ElementType::FunctionFeature),
"gap" => Ok(ElementType::Gap),
Expand Down Expand Up @@ -707,6 +710,7 @@ impl std::str::FromStr for ElementType {
"s" => Ok(ElementType::Sentence),
"sentiment" => Ok(ElementType::Sentiment),
"sentiments" => Ok(ElementType::SentimentLayer),
"size" => Ok(ElementType::SizeFeature),
"source" => Ok(ElementType::Source),
"spanrelation" => Ok(ElementType::SpanRelation),
"spanrelations" => Ok(ElementType::SpanRelationLayer),
Expand Down

0 comments on commit 528827c

Please sign in to comment.