private static Properties loadProperties(String name) { return loadProperties(name, Thread.currentThread().getContextClassLoader()); }
/** * Finds the properties file in the classpath and loads the properties from there. * * @return The found properties object (must be not-null) * @throws RuntimeException If no properties file can be found on the classpath */ private static Properties loadPropertiesFromClasspath() { List<String> validNames = Arrays.asList("StanfordCoreNLP", "edu.stanford.nlp.pipeline.StanfordCoreNLP"); for (String name : validNames) { Properties props = loadProperties(name); if (props != null) return props; } throw new RuntimeException("ERROR: Could not find properties file in the classpath!"); }
private static Properties loadPropertiesOrException(String propsFileNamePrefix) { Properties props = loadProperties(propsFileNamePrefix); if (props == null) { throw new RuntimeIOException("ERROR: cannot find properties file \"" + propsFileNamePrefix + "\" in the classpath!"); } return props; }
/** * Finds the properties file in the classpath and loads the properties from there * @return */ private static Properties loadPropertiesFromClasspath() { List<String> validNames = Arrays.asList("StanfordCoreNLP", "edu.stanford.nlp.pipeline.StanfordCoreNLP"); for(String name: validNames){ Properties props = loadProperties(name); if(props != null) return props; } throw new RuntimeException("ERROR: Could not find properties file in the classpath!"); }
/** * Finds the properties file in the classpath and loads the properties from there. * * @return The found properties object (must be not-null) * @throws RuntimeException If no properties file can be found on the classpath */ private static Properties loadPropertiesFromClasspath() { List<String> validNames = Arrays.asList("StanfordCoreNLP", "edu.stanford.nlp.pipeline.StanfordCoreNLP"); for (String name : validNames) { Properties props = loadProperties(name); if (props != null) return props; } throw new RuntimeException("ERROR: Could not find properties file in the classpath!"); }
private static Properties loadProperties(String name) { return loadProperties(name, Thread.currentThread().getContextClassLoader()); }
/** * Finds the properties file in the classpath and loads the properties from there. * * @return The found properties object (must be not-null) * @throws RuntimeException If no properties file can be found on the classpath */ private static Properties loadPropertiesFromClasspath() { List<String> validNames = Arrays.asList("StanfordCoreNLP", "edu.stanford.nlp.pipeline.StanfordCoreNLP"); for (String name: validNames) { Properties props = loadProperties(name); if (props != null) return props; } throw new RuntimeException("ERROR: Could not find properties file in the classpath!"); }
private static Properties loadProperties(String name) { return loadProperties(name, Thread.currentThread().getContextClassLoader()); }
private static Properties loadProperties(String name) { return loadProperties(name, Thread.currentThread().getContextClassLoader()); }
private static Properties loadPropertiesOrException(String propsFileNamePrefix) { Properties props = loadProperties(propsFileNamePrefix); if (props == null) { throw new RuntimeIOException("ERROR: cannot find properties file \"" + propsFileNamePrefix + "\" in the classpath!"); } return props; }
public StanfordCoreNLP(String propsFileNamePrefix, boolean enforceRequirements) { Properties props = loadProperties(propsFileNamePrefix); if(props == null){ throw new RuntimeException("ERROR: cannot find properties file \"" + propsFileNamePrefix + "\" in the classpath!"); } construct(null, props, enforceRequirements); }
public StanfordCoreNLP(String propsFileNamePrefix, boolean enforceRequirements) { Properties props = loadProperties(propsFileNamePrefix); if (props == null) { throw new RuntimeIOException("ERROR: cannot find properties file \"" + propsFileNamePrefix + "\" in the classpath!"); } construct(props, enforceRequirements); }