diff --git a/src/fullcontext_label.rs b/src/fullcontext_label.rs index 631e193..1cad631 100644 --- a/src/fullcontext_label.rs +++ b/src/fullcontext_label.rs @@ -1,3 +1,4 @@ +#[derive(Debug, Clone, PartialEq, Eq)] pub struct Label { pub phoneme: Phoneme, pub mora: Option, @@ -13,14 +14,16 @@ pub struct Label { pub utterance: Utterance, } +#[derive(Debug, Clone, PartialEq, Eq)] pub struct Phoneme { - pub p2: String, - pub p1: String, - pub c: String, - pub n1: String, - pub n2: String, + pub p2: Option, + pub p1: Option, + pub c: Option, + pub n1: Option, + pub n2: Option, } +#[derive(Debug, Clone, PartialEq, Eq)] pub struct Mora { /// the difference between accent type and position of the current mora identity pub relative_accent_position: i8, @@ -30,6 +33,7 @@ pub struct Mora { pub position_backward: u8, } +#[derive(Debug, Clone, PartialEq, Eq)] pub struct Word { /// pos (part-of-speech) of the word pub pos: Option, @@ -39,6 +43,7 @@ pub struct Word { pub cform: Option, } +#[derive(Debug, Clone, PartialEq, Eq)] pub struct AccentPhraseCurrent { /// the number of moras in the current accent phrase pub mora_count: u8, @@ -56,6 +61,7 @@ pub struct AccentPhraseCurrent { pub mora_position_backward: u8, } +#[derive(Debug, Clone, PartialEq, Eq)] pub struct AccentPhrasePrevNext { /// the number of moras in the accent phrase pub mora_count: u8, @@ -67,6 +73,7 @@ pub struct AccentPhrasePrevNext { pub is_pause_insertion: Option, } +#[derive(Debug, Clone, PartialEq, Eq)] pub struct BreathGroupCurrent { /// the number of accent phrases in the current breath group pub accent_phrase_count: u8, @@ -86,6 +93,7 @@ pub struct BreathGroupCurrent { pub mora_position_backward: u8, } +#[derive(Debug, Clone, PartialEq, Eq)] pub struct BreathGroupPrevNext { /// the number of accent phrases in the breath group pub accent_phrase_count: u8, @@ -93,6 +101,7 @@ pub struct BreathGroupPrevNext { pub mora_count: u8, } +#[derive(Debug, Clone, PartialEq, Eq)] pub struct Utterance { /// the number of breath groups in this utterance pub breath_group_count: u8, diff --git a/src/lib.rs b/src/lib.rs new file mode 100644 index 0000000..dc2bc1e --- /dev/null +++ b/src/lib.rs @@ -0,0 +1 @@ +mod fullcontext_label; diff --git a/src/main.rs b/src/main.rs deleted file mode 100644 index e7a11a9..0000000 --- a/src/main.rs +++ /dev/null @@ -1,3 +0,0 @@ -fn main() { - println!("Hello, world!"); -}