// Path: src/main/java/io/aif/language/common/ISplitter.java
// @FunctionalInterface
// public interface ISplitter<T1, T2> extends Function<T1, List<T2>> {
// 
//   public List<T2> split(final T1 target);
// 
//   @Override
//   public default List<T2> apply(final T1 t1) {
//     return split(t1);
//   }
// }
// 
// Path: src/main/java/io/aif/language/sentence/separators/extractors/ISeparatorExtractor.java
// public interface ISeparatorExtractor extends IExtractor<List<String>, List<Character>> {
// 
//   public static enum Type {
//     PREDEFINED(new PredefinedSeparatorExtractor()),
//     PROBABILITY(new StatSeparatorExtractor()),
//     NON_ALPHABETIC_CHARACTERS_EXTRACTOR(new NonAlphabeticCharactersExtractor());
// 
//     private final ISeparatorExtractor instance;
// 
//     private Type(final ISeparatorExtractor instance) {
//       this.instance = instance;
//     }
// 
//     public static ISeparatorExtractor getDefault() {
//       final ISettings settings = Guice.createInjector(new SettingsModule()).getInstance(ISettings.class);
//       return settings.useIsAlphabeticMethod() ?
//           Type.NON_ALPHABETIC_CHARACTERS_EXTRACTOR.getInstance() :
//           Type.PROBABILITY.getInstance();
//     }
// 
//     public ISeparatorExtractor getInstance() {
//       return instance;
//     }
// 
//   }
// 
// 
// }
// 
// Path: src/main/java/io/aif/language/sentence/separators/groupers/ISeparatorsGrouper.java
// public interface ISeparatorsGrouper {
// 
//   public List<Set<Character>> group(final List<String> tokens, final List<Character> splitters);
// 
//   public enum Type {
// 
//     PREDEFINED(new PredefinedGrouper()),
//     PROBABILITY(new StatGrouper());
// 
//     private final ISeparatorsGrouper instance;
// 
//     Type(ISeparatorsGrouper instance) {
//       this.instance = instance;
//     }
// 
//     public ISeparatorsGrouper getInstance() {
//       return instance;
//     }
// 
//   }
// 
// }


import org.testng.annotations.Test;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.Optional;
import java.util.Set;
import io.aif.language.common.ISplitter;
import io.aif.language.sentence.separators.classificators.ISeparatorGroupsClassifier;
import io.aif.language.sentence.separators.extractors.ISeparatorExtractor;
import io.aif.language.sentence.separators.groupers.ISeparatorsGrouper;
import static org.mockito.Matchers.eq;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.times;
import static org.mockito.Mockito.verify;
import static org.mockito.Mockito.verifyNoMoreInteractions;
import static org.mockito.Mockito.when;
import static org.testng.Assert.assertEquals;
package io.aif.language.sentence.splitters;





public class SimpleSentenceSplitterTest {

  @Test(groups = "unit-tests")
  public void testSplit() throws Exception {
    // input arguments
    final List<String> inputTokens = Arrays.asList(
        "token...",
        "(token",
        "(!.token..",
        "token",
        "tok!en");
    final List<Character> inputCharacters = Arrays.asList('(', '!', '.');

    // mocks
    final ISeparatorExtractor mockSentenceSeparatorExtractor = mock(ISeparatorExtractor.class);
    when(mockSentenceSeparatorExtractor.extract(eq(inputTokens)))
        .thenReturn(Optional.of(inputCharacters));

    final List<Set<Character>> mockGroups = new ArrayList<>();
    final Set<Character> mockGroup1 = new HashSet<>();
    mockGroup1.add('(');
    mockGroup1.add('!');
    mockGroup1.add('.');
    mockGroups.add(mockGroup1);
    mockGroups.add(Collections.emptySet());
// Path: src/main/java/io/aif/language/common/ISplitter.java
// @FunctionalInterface
// public interface ISplitter<T1, T2> extends Function<T1, List<T2>> {
// 
//   public List<T2> split(final T1 target);
// 
//   @Override
//   public default List<T2> apply(final T1 t1) {
//     return split(t1);
//   }
// }
// 
// Path: src/main/java/io/aif/language/sentence/separators/extractors/ISeparatorExtractor.java
// public interface ISeparatorExtractor extends IExtractor<List<String>, List<Character>> {
// 
//   public static enum Type {
//     PREDEFINED(new PredefinedSeparatorExtractor()),
//     PROBABILITY(new StatSeparatorExtractor()),
//     NON_ALPHABETIC_CHARACTERS_EXTRACTOR(new NonAlphabeticCharactersExtractor());
// 
//     private final ISeparatorExtractor instance;
// 
//     private Type(final ISeparatorExtractor instance) {
//       this.instance = instance;
//     }
// 
//     public static ISeparatorExtractor getDefault() {
//       final ISettings settings = Guice.createInjector(new SettingsModule()).getInstance(ISettings.class);
//       return settings.useIsAlphabeticMethod() ?
//           Type.NON_ALPHABETIC_CHARACTERS_EXTRACTOR.getInstance() :
//           Type.PROBABILITY.getInstance();
//     }
// 
//     public ISeparatorExtractor getInstance() {
//       return instance;
//     }
// 
//   }
// 
// 
// }
// 
// Path: src/main/java/io/aif/language/sentence/separators/groupers/ISeparatorsGrouper.java
// public interface ISeparatorsGrouper {
// 
//   public List<Set<Character>> group(final List<String> tokens, final List<Character> splitters);
// 
//   public enum Type {
// 
//     PREDEFINED(new PredefinedGrouper()),
//     PROBABILITY(new StatGrouper());
// 
//     private final ISeparatorsGrouper instance;
// 
//     Type(ISeparatorsGrouper instance) {
//       this.instance = instance;
//     }
// 
//     public ISeparatorsGrouper getInstance() {
//       return instance;
//     }
// 
//   }
// 
// }


// Path: src/test/unit/java/io/aif/language/sentence/splitters/SimpleSentenceSplitterTest.java
import org.testng.annotations.Test;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.Optional;
import java.util.Set;
import io.aif.language.common.ISplitter;
import io.aif.language.sentence.separators.classificators.ISeparatorGroupsClassifier;
import io.aif.language.sentence.separators.extractors.ISeparatorExtractor;
import io.aif.language.sentence.separators.groupers.ISeparatorsGrouper;
import static org.mockito.Matchers.eq;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.times;
import static org.mockito.Mockito.verify;
import static org.mockito.Mockito.verifyNoMoreInteractions;
import static org.mockito.Mockito.when;
import static org.testng.Assert.assertEquals;

package io.aif.language.sentence.splitters;





public class SimpleSentenceSplitterTest {

  @Test(groups = "unit-tests")
  public void testSplit() throws Exception {
    // input arguments
    final List<String> inputTokens = Arrays.asList(
        "token...",
        "(token",
        "(!.token..",
        "token",
        "tok!en");
    final List<Character> inputCharacters = Arrays.asList('(', '!', '.');

    // mocks
    final ISeparatorExtractor mockSentenceSeparatorExtractor = mock(ISeparatorExtractor.class);
    when(mockSentenceSeparatorExtractor.extract(eq(inputTokens)))
        .thenReturn(Optional.of(inputCharacters));

    final List<Set<Character>> mockGroups = new ArrayList<>();
    final Set<Character> mockGroup1 = new HashSet<>();
    mockGroup1.add('(');
    mockGroup1.add('!');
    mockGroup1.add('.');
    mockGroups.add(mockGroup1);
    mockGroups.add(Collections.emptySet());
    final ISeparatorsGrouper mockSentenceSeparatorsGrouper = mock(ISeparatorsGrouper.class);