public static InstanceBuilder createInstanceBuilderNGram(String dataSource,
OccurrenceDataProvider dataProvider)
throws InitializationException {
if(dataSource.toLowerCase().equals(UKWAC)) {
return new InstanceBuilderNGramUKWAC(dataProvider);
}else if(dataSource.toLowerCase().equals(GOOGLE_NGRAM)){
return new InstanceBuilderNGramGoogle(dataProvider);
}else{
throw new InitializationException("No known occurrence data source found. Please check " +
"org.dbpedia.spotlight.spot.cooccurrence.datasource in the configuration file.");