code: public static final InputStream getDictionaryResource(final String resource) {
  
      InputStream dictInputStream;
      final Path resourcePath = Paths.get(resource);
      final String normalizedPath = resourcePath.toString();
      dictInputStream = getStreamFromClassPath(normalizedPath);
      if (dictInputStream == null) {
        try {
          dictInputStream = new FileInputStream(normalizedPath);
        } catch (final FileNotFoundException e) {
          e.printStackTrace();
        }
      }
      return new BufferedInputStream(dictInputStream);
    }
docs: Get an input stream from a resource name. This could be either an absolute
  path pointing to a resource in the classpath or a file or a directory in
  the file system. If found in the classpath that will be loaded first.
  
  @param resource
  the name of the resource (absolute path with no starting /)
  @return the inputstream of the dictionary