code: @Override
    public void writeData(PrintWriter out) throws IOException {
      // all lines have one rule per line
  
      for (IntDependency dependency : argCounter.keySet()) {
        if (dependency.head != wildTW && dependency.arg != wildTW &&
                dependency.head.word != -1 && dependency.arg.word != -1) {
          double count = argCounter.getCount(dependency);
          out.println(dependency.toString(wordIndex, tagIndex) + " " + count);
        }
      }
  
      out.println("BEGIN_STOP");
  
      for (IntDependency dependency : stopCounter.keySet()) {
        if (dependency.head.word != -1) {
          double count = stopCounter.getCount(dependency);
          out.println(dependency.toString(wordIndex, tagIndex) + " " + count);
        }
      }
  
      out.flush();
    }
docs: Writes out data from this Object to the Writer w.