public static NaaccrDictionary readDictionary ( File file ) throws IOException { if ( file == null ) throw new IOException ( "File is required to load dictionary." ) ; if ( ! file . exists ( ) ) throw new IOException ( "File must exist to load dictionary." ) ; try ( Reader reader = new InputStreamReader ( new FileInputStream ( file ) , StandardCharsets . UTF_8 ) ) { return readDictionary ( reader ) ; } }
Reads a dictionary from the provided file .