package com.aif.language.sentence;

import com.aif.language.common.ISplitter;
import org.junit.Test;

import java.util.Arrays;
import java.util.List;

import static org.junit.Assert.*;

public class OpenNLPSentenceSplitterTest {
    private static final String MODEL_RESOURCE_PATH = "/opennlp-models/en-sent.bin";

    @Test
    public void testSplit() {
        final String inputString = " First sentence. Second sentence.";
        final List<String> expectedResult = Arrays.asList("First sentence.", "Second sentence.");

        ISplitter<String, String> splitter =
                new OpenNLPSentenceSplitter(ClassLoader.class.getResourceAsStream(MODEL_RESOURCE_PATH));

        List<String> actualResilt = splitter.split(inputString);

        assertEquals(expectedResult, actualResilt);
    }
}

@@ -700,17 +700,17 @@
 ctualRes
-i
+u
 lt = spl
@@ -782,17 +782,17 @@
 ctualRes
-i
+u
 lt);%0A   

fix typo