Esempio n. 1
0
        public IEnumerable <BreakSpan> GetBreakSpanIter()
        {
            List <BreakAtInfo> breakAtList = visitor.GetBreakList();
            int c_index = 0;
            int count   = breakAtList.Count;

            for (int i = 0; i < count; ++i)
            {
                BreakAtInfo brkInfo = breakAtList[i];
                BreakSpan   sp      = new BreakSpan();
                sp.startAt  = c_index;
                sp.len      = (ushort)(brkInfo.breakAt - c_index);
                sp.wordKind = brkInfo.wordKind;

                c_index += sp.len;

                yield return(sp);
            }
            //-------------------
            if (c_index < _endAt)
            {
                BreakSpan sp = new BreakSpan();
                sp.startAt = c_index;
                sp.len     = (ushort)(_endAt - c_index);
                yield return(sp);
            }
        }
Esempio n. 2
0
        public void LoadBreakAtList(List <int> outputList)
        {
            List <BreakAtInfo> breakAtList = visitor.GetBreakList();
            int j = breakAtList.Count;

            for (int i = 0; i < j; ++i)
            {
                BreakAtInfo brk = breakAtList[i];
                outputList.Add(brk.breakAt);
            }
        }