private CorpusConfig mergeConfigs(Set<String> corpora, 
    CorpusConfigMap corpusConfigurations)
  {
    CorpusConfig corpusConfig = new CorpusConfig();

    // calculate the left and right context.
    String leftCtx = mergeConfigValue(KEY_MAX_CONTEXT_LEFT, corpora,
      corpusConfigurations);
    String rightCtx = mergeConfigValue(KEY_MAX_CONTEXT_RIGHT,
      corpora, corpusConfigurations);
    corpusConfig.setConfig(KEY_MAX_CONTEXT_LEFT, leftCtx);
    corpusConfig.setConfig(KEY_MAX_CONTEXT_RIGHT, rightCtx);

    // calculate the default-context
    corpusConfig.setConfig(KEY_CONTEXT_STEPS, mergeConfigValue(
      KEY_CONTEXT_STEPS, corpora, corpusConfigurations));
    corpusConfig.setConfig(KEY_DEFAULT_CONTEXT, mergeConfigValue(
      KEY_DEFAULT_CONTEXT, corpora, corpusConfigurations));

    // get the results per page
    corpusConfig.setConfig(KEY_RESULT_PER_PAGE, mergeConfigValue(
      KEY_RESULT_PER_PAGE, corpora, corpusConfigurations));

    corpusConfig.setConfig(KEY_DEFAULT_CONTEXT_SEGMENTATION, checkSegments(
      KEY_DEFAULT_CONTEXT_SEGMENTATION, corpora, corpusConfigurations));

    corpusConfig.setConfig(KEY_DEFAULT_BASE_TEXT_SEGMENTATION, checkSegments(
      KEY_DEFAULT_BASE_TEXT_SEGMENTATION, corpora, corpusConfigurations));

    return corpusConfig;
  }
private CorpusConfig mergeConfigs ( Set < String > corpora , CorpusConfigMap corpusConfigurations ) { CorpusConfig corpusConfig = new CorpusConfig ( ) ; String leftCtx = mergeConfigValue ( KEY_MAX_CONTEXT_LEFT , corpora , corpusConfigurations ) ; String rightCtx = mergeConfigValue ( KEY_MAX_CONTEXT_RIGHT , corpora , corpusConfigurations ) ; corpusConfig . setConfig ( KEY_MAX_CONTEXT_LEFT , leftCtx ) ; corpusConfig . setConfig ( KEY_MAX_CONTEXT_RIGHT , rightCtx ) ; corpusConfig . setConfig ( KEY_CONTEXT_STEPS , mergeConfigValue ( KEY_CONTEXT_STEPS , corpora , corpusConfigurations ) ) ; corpusConfig . setConfig ( KEY_DEFAULT_CONTEXT , mergeConfigValue ( KEY_DEFAULT_CONTEXT , corpora , corpusConfigurations ) ) ; corpusConfig . setConfig ( KEY_RESULT_PER_PAGE , mergeConfigValue ( KEY_RESULT_PER_PAGE , corpora , corpusConfigurations ) ) ; corpusConfig . setConfig ( KEY_DEFAULT_CONTEXT_SEGMENTATION , checkSegments ( KEY_DEFAULT_CONTEXT_SEGMENTATION , corpora , corpusConfigurations ) ) ; corpusConfig . setConfig ( KEY_DEFAULT_BASE_TEXT_SEGMENTATION , checkSegments ( KEY_DEFAULT_BASE_TEXT_SEGMENTATION , corpora , corpusConfigurations ) ) ; return corpusConfig ; }
Builds a single config for selection of one or muliple corpora.

@param corpora Specifies the combination of corpora, for which the config
is calculated.
@param corpusConfigurations  A map containg the known corpus configurations.
@return A new config which takes into account the segementation of all
selected corpora.