sudachi/dic/word_info/
raw.rs1use crate::dic::lexicon::strings::StringPointer;
18
19#[derive(Clone, Debug, Default)]
24pub struct WordInfoRawData {
25 pub pos_id: i16,
26
27 pub headword_strptr: StringPointer,
28 pub reading_form_strptr: StringPointer,
29 pub normalized_form: u32,
30 pub dictionary_form: u32,
31
32 pub index_form_length: i16,
34 pub c_unit_split_length: i8,
35 pub b_unit_split_length: i8,
36 pub a_unit_split_length: i8,
37 pub word_structure_length: i8,
38 pub synonym_group_ids_length: i8,
39 pub user_data_flag: i8,
40
41 pub c_unit_split: Vec<u32>,
42 pub b_unit_split: Vec<u32>,
43 pub a_unit_split: Vec<u32>,
44 pub word_structure: Vec<u32>,
45 pub synonym_group_ids: Vec<i32>,
46 pub user_data: String,
47}
48
49#[derive(Clone, Debug, Default)]
50pub struct WordInfoFixedData {
51 pub pos_id: i16,
52 pub headword_strptr: StringPointer,
53 pub reading_form_strptr: StringPointer,
54 pub normalized_form: u32,
55 pub dictionary_form: u32,
56 pub index_form_length: i16,
57 pub c_unit_split_length: i8,
58 pub b_unit_split_length: i8,
59 pub a_unit_split_length: i8,
60 pub word_structure_length: i8,
61 pub synonym_group_ids_length: i8,
62 pub user_data_flag: i8,
63}
64
65pub(crate) struct WordInfoVariableData<'a> {
66 pub c_unit_split: &'a [u32],
67 pub b_unit_split: &'a [u32],
68 pub a_unit_split: &'a [u32],
69 pub word_structure: &'a [u32],
70 pub synonym_group_ids: &'a [i32],
71 pub user_data: &'a str,
72}