Search in sources :

Example 91 with BreakIterator

use of java.text.BreakIterator in project j2objc by google.

the class BreakIteratorTest method testGetCharacterInstanceLocale.

/*
     * Class under test for BreakIterator getCharacterInstance(Locale)
     */
public void testGetCharacterInstanceLocale() {
    BreakIterator it = BreakIterator.getCharacterInstance(Locale.US);
    BreakIterator it2 = BreakIterator.getCharacterInstance(Locale.CHINA);
    assertEquals(it, it2);
}
Also used : BreakIterator(java.text.BreakIterator)

Example 92 with BreakIterator

use of java.text.BreakIterator in project j2objc by google.

the class BreakIteratorTest method test_next.

public void test_next() {
    // Regression test for HARMONY-30
    BreakIterator bi = BreakIterator.getWordInstance(Locale.US);
    bi.setText("This is the test, WordInstance");
    int n = bi.first();
    n = bi.next();
    assertEquals("Assert 0: next() returns incorrect value ", 4, n);
    assertEquals(BreakIterator.DONE, iterator.next());
    iterator.setText(TEXT);
    assertEquals(2, iterator.next());
}
Also used : BreakIterator(java.text.BreakIterator)

Example 93 with BreakIterator

use of java.text.BreakIterator in project j2objc by google.

the class BreakIteratorTest method testGetLineInstanceLocale.

/*
     * Class under test for BreakIterator getLineInstance(Locale)
     */
public void testGetLineInstanceLocale() {
    BreakIterator it = BreakIterator.getLineInstance(Locale.US);
    assertNotNull(it);
    BreakIterator.getLineInstance(new Locale("bad locale"));
}
Also used : Locale(java.util.Locale) BreakIterator(java.text.BreakIterator)

Example 94 with BreakIterator

use of java.text.BreakIterator in project j2objc by google.

the class BreakIteratorTest method testGetSentenceInstance.

/*
     * Class under test for BreakIterator getSentenceInstance()
     */
public void testGetSentenceInstance() {
    BreakIterator it = BreakIterator.getSentenceInstance();
    assertNotNull(it);
}
Also used : BreakIterator(java.text.BreakIterator)

Example 95 with BreakIterator

use of java.text.BreakIterator in project j2objc by google.

the class BreakIteratorTest method testGetSentenceInstanceLocale.

/*
     * Class under test for BreakIterator getSentenceInstance(Locale)
     */
public void testGetSentenceInstanceLocale() {
    BreakIterator it = BreakIterator.getSentenceInstance(Locale.US);
    assertNotNull(it);
}
Also used : BreakIterator(java.text.BreakIterator)

Aggregations

BreakIterator (java.text.BreakIterator)120 ArrayList (java.util.ArrayList)17 Locale (java.util.Locale)9 Paint (android.graphics.Paint)4 IntPair (edu.illinois.cs.cogcomp.core.datastructures.IntPair)3 BytesRef (org.apache.lucene.util.BytesRef)3 SuppressLint (android.annotation.SuppressLint)2 Sentence (de.tudarmstadt.ukp.dkpro.core.api.segmentation.type.Sentence)2 Collection (java.util.Collection)2 BadLocationException (javax.swing.text.BadLocationException)2 Document (javax.swing.text.Document)2 Element (javax.swing.text.Element)2 Segment (javax.swing.text.Segment)2 Snippet (org.apache.lucene.search.highlight.Snippet)2 Intent (android.content.Intent)1 RectF (android.graphics.RectF)1 TextPaint (android.text.TextPaint)1 TagElement (com.google.devtools.j2objc.ast.TagElement)1 Token (de.tudarmstadt.ukp.dkpro.core.api.segmentation.type.Token)1 AbstractNLPDecoder (edu.emory.mathcs.nlp.decode.AbstractNLPDecoder)1