NewWordInstance() 공개 정적인 메소드

Create a new CharArrayIterator that works around JRE bugs in a manner suitable for BreakIterator#getWordInstance()
public static NewWordInstance ( ) : CharArrayIterator
리턴 CharArrayIterator
예제 #1
0
        public virtual void TestConsumeWordInstance()
        {
            // we use the default locale, as its randomized by LuceneTestCase
            BreakIterator bi = BreakIterator.GetWordInstance(CultureInfo.CurrentCulture);
            var           ci = CharArrayIterator.NewWordInstance();

            for (var i = 0; i < 10000; i++)
            {
                var text = TestUtil.RandomUnicodeString(Random()).toCharArray();
                ci.SetText(text, 0, text.Length);
                Consume(bi, ci);
            }
        }
예제 #2
0
        public virtual void TestConsumeWordInstance()
        {
            // we use the default locale, as its randomized by LuceneTestCase
            var iteratorType = BreakIterator.UBreakIteratorType.WORD;
            var locale       = new Locale("en", "US");
            var ci           = CharArrayIterator.NewWordInstance();

            for (var i = 0; i < 10000; i++)
            {
                var text = TestUtil.RandomUnicodeString(Random()).toCharArray();
                ci.SetText(text, 0, text.Length);
                Consume(iteratorType, locale, ci);
            }
        }
예제 #3
0
 public virtual void TestWordInstance()
 {
     DoTests(CharArrayIterator.NewWordInstance());
 }