protected static ParserData getParserDataFromTextFile(String textFileOrUrl, Options op) {
    try {
      Timing tim = new Timing();
      System.err.print("Loading parser from text file " + textFileOrUrl + ' ');
      BufferedReader in = IOUtils.readReaderFromString(textFileOrUrl);
      Timing.startTime();
      String line = in.readLine();
      confirmBeginBlock(textFileOrUrl, line);
      op.readData(in);
      System.err.print(".");
      line = in.readLine();
      confirmBeginBlock(textFileOrUrl, line);
      Lexicon lex = op.tlpParams.lex(op.lexOptions);
      lex.readData(in);
      System.err.print(".");
      line = in.readLine();
      confirmBeginBlock(textFileOrUrl, line);
      UnaryGrammar ug = new UnaryGrammar(op.numStates);
      ug.readData(in);
      System.err.print(".");
      line = in.readLine();
      confirmBeginBlock(textFileOrUrl, line);
      BinaryGrammar bg = new BinaryGrammar(op.numStates);
      bg.readData(in);
      System.err.print(".");
      line = in.readLine();
      confirmBeginBlock(textFileOrUrl, line);
      DependencyGrammar dg = new MLEDependencyGrammar(op.tlpParams, op.directional, op.distance, op.coarseDistance);
      dg.readData(in);
      System.err.print(".");
      Map<String,Numberer> numbs = Numberer.getNumberers();
      in.close();
      System.err.println(" done [" + tim.toSecondsString() + " sec].");
      return new ParserData(lex, bg, ug, dg, numbs, op);
    } catch (IOException e) {
      e.printStackTrace();
    }
    return null;
  }