// 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/common/settings/ISettings.java
// public interface ISettings {
// 
//   @Deprecated
//   public ISettings SETTINGS = Guice.createInjector(new SettingsModule()).getInstance(ISettings.class);
// 
//   public String getVersion();
// 
//   public int recommendedMinimumTokensInputCount();
// 
//   public boolean useIsAlphabeticMethod();
// 
//   public double thresholdPForSeparatorCharacterInSecondFilter();
// 
//   public int minimalValuableTokenSizeForSentenceSplit();
// 
//   public int minimumCharacterObservationsCountForMakingCharacterValuableDuringSentenceSplitting();
// 
//   public double thresholdPFirstFilterForSeparatorCharacter();
// 
//   public double splitterCharactersGrouperSearchStep();
// 
//   public double splitterCharactersGrouperInitSearchPValue();
// 
//   public double wordSetDictComparatorThreshold();
// 
//   public double recursiveSubstringComparatorWeight();
// 
//   public double simpleTokenComparatorWeight();
// 
//   public double characterDensityComparatorWeight();
// 
//   public String predefinedSeparators();
// }
// 
// Path: src/main/java/io/aif/language/common/settings/SettingsModule.java
// public class SettingsModule extends AbstractModule {
// 
//   @Override
//   protected void configure() {
//     bind(ISettings.class).toProvider(new PropertyBasedSettings.Provider());
//   }
// 
// }
// 
// 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 com.google.common.annotations.VisibleForTesting;
import com.google.inject.Guice;
import org.apache.log4j.Logger;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import java.util.Optional;
import java.util.Set;
import java.util.stream.Collectors;
import io.aif.language.common.ISplitter;
import io.aif.language.common.settings.ISettings;
import io.aif.language.common.settings.SettingsModule;
import io.aif.language.sentence.separators.classificators.ISeparatorGroupsClassifier;
import io.aif.language.sentence.separators.extractors.ISeparatorExtractor;
import io.aif.language.sentence.separators.groupers.ISeparatorsGrouper;
package io.aif.language.sentence.splitters;





public abstract class AbstractSentenceSplitter implements ISplitter<List<String>, List<String>> {

  private static final Logger logger = Logger.getLogger(AbstractSentenceSplitter.class);

  private final ISeparatorExtractor sentenceSeparatorExtractor;

  private final ISeparatorsGrouper sentenceSeparatorsGrouper;

  private final ISeparatorGroupsClassifier sentenceSeparatorGroupsClassificatory;

// 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/common/settings/ISettings.java
// public interface ISettings {
// 
//   @Deprecated
//   public ISettings SETTINGS = Guice.createInjector(new SettingsModule()).getInstance(ISettings.class);
// 
//   public String getVersion();
// 
//   public int recommendedMinimumTokensInputCount();
// 
//   public boolean useIsAlphabeticMethod();
// 
//   public double thresholdPForSeparatorCharacterInSecondFilter();
// 
//   public int minimalValuableTokenSizeForSentenceSplit();
// 
//   public int minimumCharacterObservationsCountForMakingCharacterValuableDuringSentenceSplitting();
// 
//   public double thresholdPFirstFilterForSeparatorCharacter();
// 
//   public double splitterCharactersGrouperSearchStep();
// 
//   public double splitterCharactersGrouperInitSearchPValue();
// 
//   public double wordSetDictComparatorThreshold();
// 
//   public double recursiveSubstringComparatorWeight();
// 
//   public double simpleTokenComparatorWeight();
// 
//   public double characterDensityComparatorWeight();
// 
//   public String predefinedSeparators();
// }
// 
// Path: src/main/java/io/aif/language/common/settings/SettingsModule.java
// public class SettingsModule extends AbstractModule {
// 
//   @Override
//   protected void configure() {
//     bind(ISettings.class).toProvider(new PropertyBasedSettings.Provider());
//   }
// 
// }
// 
// 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/main/java/io/aif/language/sentence/splitters/AbstractSentenceSplitter.java
import com.google.common.annotations.VisibleForTesting;
import com.google.inject.Guice;
import org.apache.log4j.Logger;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import java.util.Optional;
import java.util.Set;
import java.util.stream.Collectors;
import io.aif.language.common.ISplitter;
import io.aif.language.common.settings.ISettings;
import io.aif.language.common.settings.SettingsModule;
import io.aif.language.sentence.separators.classificators.ISeparatorGroupsClassifier;
import io.aif.language.sentence.separators.extractors.ISeparatorExtractor;
import io.aif.language.sentence.separators.groupers.ISeparatorsGrouper;

package io.aif.language.sentence.splitters;





public abstract class AbstractSentenceSplitter implements ISplitter<List<String>, List<String>> {

  private static final Logger logger = Logger.getLogger(AbstractSentenceSplitter.class);

  private final ISeparatorExtractor sentenceSeparatorExtractor;

  private final ISeparatorsGrouper sentenceSeparatorsGrouper;

  private final ISeparatorGroupsClassifier sentenceSeparatorGroupsClassificatory;

  protected AbstractSentenceSplitter(final ISeparatorExtractor sentenceSeparatorExtractor,