All Downloads are FREE. Search and download functionalities are using the official Maven repository.

edu.stanford.nlp.trees.Labeled Maven / Gradle / Ivy

Go to download

Stanford Parser processes raw text in English, Chinese, German, Arabic, and French, and extracts constituency parse trees.

There is a newer version: 3.9.2
Show newest version
package edu.stanford.nlp.trees;

import edu.stanford.nlp.ling.Label;

import java.util.Collection;

/**
 * Interface for Objects which have a Label.
 * For instance, they may be hand-classified with one or more tags.
 * Note that it is for things that possess
 * a label via composition, rather than for things that implement
 * the Label interface.
 * An implementor might choose to be read-only and throw an
 * UnsupportedOperationException on the setLabel(s)() commands, but should
 * minimally implement both commands to return Label(s).
 *
 * @author Sep Kamvar
 * @author Christopher Manning
 * @author Sarah Spikes ([email protected]) - filled in types
 */

public interface Labeled {

  /**
   * Returns the Object's label.
   *
   * @return One of the labels of the object (if there are multiple labels,
   *         preferably the primary label, if it exists).
   *         Returns null if there is no label.
   */

  public Label label();


  /**
   * Sets the label associated with this object.
   *
   * @param label The Label value
   */

  public void setLabel(final Label label);


  /**
   * Gives back all labels for this thing.
   *
   * @return A Collection of the Object's labels.  Returns an empty
   *         Collection if there are no labels.
   */

  public Collection




© 2015 - 2024 Weber Informatics LLC | Privacy Policy