Beispiel #1
0
 public SyllTransition(
     enrSYLL_STATE ur_cur_state,
     enrSYLL_STATE ur_match_state,
     enrSYLL_DSCR ur_new_syll)
 {
     this.cur_state   = ur_cur_state;
     this.match_state = ur_match_state;
     this.new_syll    = ur_new_syll;
 }
Beispiel #2
0
 void Append_Syll(
     ref int ref_syll_seq,
     System.Text.StringBuilder ur_stp_syll,
     enrSYLL_DSCR ur_syll_dscr,
     Mx.bitbase <enrSYLL> .table_row ur_sylls,
     Mx.bitbase <enrWORD> .row_enum ur_word_rec)
 {
     if (ur_stp_syll.Length > 0)
     {
         var last_syll = ur_sylls.add_row();
         ref_syll_seq                += 1;
         last_syll[enrSYLL.word]      = ur_word_rec[enrWORD.word];
         last_syll[enrSYLL.syll_seq]  = ref_syll_seq.ToString();
         last_syll[enrSYLL.syll_text] = ur_stp_syll.ToString();
         last_syll[enrSYLL.syll_dscr] = ur_syll_dscr.pname;
         ur_stp_syll.Clear();
     }
 }
Beispiel #3
0
        bool Append_Syll(
            char ur_entry,
            enrSYLL_STATE ur_test_syll,
            enrSYLL_DSCR flag_new_syll,
            ref enrSYLL_STATE ref_cur_state,
            ref int ref_syll_seq,
            System.Text.StringBuilder ur_stp_syll,
            Mx.bitbase <enrSYLL> .table_row ur_sylls,
            Mx.bitbase <enrWORD> .row_enum ur_word_rec,
            System.Collections.Generic.List <SyllCode> ur_syll_codes)
        {
            var ret_is_syll = false;

            foreach (var entry in ur_syll_codes)
            {
                if (ur_test_syll == entry.cur_state)
                {
                    if (ur_entry == entry.syll_char || entry.syll_char == '*')
                    {
                        ret_is_syll = true;
                    }
                }
            }

            if (ret_is_syll || ur_test_syll == enrSYLL_STATE.word_end)
            {
                if (flag_new_syll != enrSYLL_DSCR.incomplete)
                {
                    ret_is_syll = true;
                    Append_Syll(ref ref_syll_seq, ur_stp_syll, flag_new_syll, ur_sylls, ur_word_rec);
                }

                ref_cur_state = ur_test_syll;
                ur_stp_syll.Append(ur_entry);
            }

            return(ret_is_syll);
        }