code: private String checkSegments(String key, Set<String> corpora, CorpusConfigMap corpusConfigurations)
    {
      String segmentation = null;
      for (String corpus : corpora)
      {
  
        CorpusConfig c = null;
  
        if (corpusConfigurations.containsConfig(corpus))
        {
          c = corpusConfigurations.get(corpus);
        }
        else
        {
          c = corpusConfigurations.get(DEFAULT_CONFIG);
        }
  
        // do nothing if not even default config is set
        if (c == null)
        {
          continue;
        }
  
        String tmpSegment = c.getConfig(key);
  
        /**
         * If no segment is set in the corpus config use always the tok segment.
         */
        if (tmpSegment == null)
        {
          return corpusConfigurations.get(DEFAULT_CONFIG).getConfig(key);
        }
  
        if (segmentation == null)
        {
          segmentation = tmpSegment;
          continue;
        }
  
        if (!segmentation.equals(tmpSegment)) // return the default config
        {
          return corpusConfigurations.get(DEFAULT_CONFIG).getConfig(key);
        }
      }
  
      if (segmentation == null)
      {
        return corpusConfigurations.get(DEFAULT_CONFIG).getConfig(key);
      }
      else
      {
        return segmentation;
      }
    }
docs: Checks, if all selected corpora have the same default segmentation layer.
  If not the tok layer is taken, because every corpus has this one.
  
  @param key the key for the segementation config, must be
  {@link #KEY_DEFAULT_BASE_TEXT_SEGMENTATION} or
  {@link #KEY_DEFAULT_CONTEXT_SEGMENTATION}.
  @param corpora the corpora which has to be checked.
  @return "tok" or a segment which is defined in all corpora.