public void loadClassifier ( String loadPath , Properties props ) throws ClassCastException , IOException , ClassNotFoundException { InputStream is ; // ms, 10-04-2010: check first is this path exists in our CLASSPATH. This // takes priority over the file system. if ( ( is = loadStreamFromClasspath ( loadPath ) ) != null ) { Timing . startDoing ( "Loading classifier from " + loadPath ) ; loadClassifier ( is ) ; is . close ( ) ; Timing . endDoing ( ) ; } else { loadClassifier ( new File ( loadPath ) , props ) ; } }
Loads a classifier from the file specified by loadPath . If loadPath ends in . gz uses a GZIPInputStream else uses a regular FileInputStream .