edu.stanford.nlp.io.PrintFile Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of stanford-parser Show documentation
Show all versions of stanford-parser Show documentation
Stanford Parser processes raw text in English, Chinese, German, Arabic, and French, and extracts constituency parse trees.
/**
* Title: StanfordMaxEnt
* Description: A Maximum Entropy Toolkit
* Copyright: Copyright (c) Bruce Eckel
* Company: Stanford University
* @author Bruce Eckel
* @version 1.0
*/
package edu.stanford.nlp.io;
import java.io.*;
/**
* Shorthand class for opening an output file for human-readable output.
* com:bruceeckel:tools:PrintFile.java
*/
public class PrintFile extends PrintStream {
public PrintFile(String filename) throws IOException {
super(new BufferedOutputStream(new FileOutputStream(filename)));
}
public PrintFile(File file) throws IOException {
this(file.getPath());
}
}