edu.stanford.nlp.util.logging.VisibilityHandler Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of stanford-corenlp Show documentation
Show all versions of stanford-corenlp Show documentation
Stanford CoreNLP provides a set of natural language analysis tools which can take raw English language text input and give the base forms of words, their parts of speech, whether they are names of companies, people, etc., normalize dates, times, and numeric quantities, mark up the structure of sentences in terms of phrases and word dependencies, and indicate which noun phrases refer to the same entities. It provides the foundational building blocks for higher level text understanding applications.
package edu.stanford.nlp.util.logging;
import edu.stanford.nlp.util.logging.Redwood.Record;
import java.util.Collections;
import java.util.HashSet;
import java.util.Set;
import java.util.List;
/**
* A filter for selecting which channels are visible. This class
* behaves as an "or" filter; that is, if any of the filters are considered
* valid, it allows the Record to proceed to the next handler.
*
* @author Gabor Angeli (angeli at cs.stanford)
*/
public class VisibilityHandler extends LogRecordHandler {
private enum State { SHOW_ALL, HIDE_ALL }
private VisibilityHandler.State defaultState = State.SHOW_ALL;
private final Set