code: public static void main(final String[] args) throws IOException, InterruptedException {
          final NamedEntityAnalyser nea = new NamedEntityAnalyser(new Configuration());
          if (args.length >= 1) {
              final String content = new String(Files.readAllBytes(Paths.get(args[0])));
              System.out.println(nea.process(content));
          }
          else {
              try (final Scanner in = new Scanner(System.in)) {
                  while (true) {
                      System.out.println("Type in texts, -q for quit.");
                      System.out.print("> ");
                      final String processString = in.nextLine();
                      if ("-q".equalsIgnoreCase(processString)) break;
                      System.out.println(nea.process(processString).getMappedResult());
                  }
              }
          }
      }
docs: The main() method takes a file as input and output the
  process result on the screen.