6566676869707172737475
profile.add(ngram.get(i)); } } } } catch (IOException e) { throw new LangDetectException(ErrorCode.CantOpenTrainData, "Can't open training database file '" + textFile.getName() + "'"); } finally { IOUtils.closeQuietly(is); } return profile; }
3940414243444546
public LanguageIdentifier() throws LangDetectException { DetectorFactory.clear(); try { DetectorFactory.loadProfile(loadProfiles("profiles","profiles.cfg")); } catch (Exception e) { throw new LangDetectException(null, "Error in Initialization: "+e.getMessage()); } }