List of usage examples for opennlp.tools.langdetect LanguageDetectorModel LanguageDetectorModel
public LanguageDetectorModel(URL modelURL) throws IOException
From source file:org.apache.solr.update.processor.OpenNLPLangDetectUpdateProcessorFactory.java
private void loadModel() throws IOException { InputStream is = null;/*from ww w.j a va2 s . co m*/ try { if (modelFile != null) { is = solrResourceLoader.openResource(modelFile); model = new LanguageDetectorModel(is); } } finally { IOUtils.closeQuietly(is); } }