## edu.stanford.nlp.ling
Class CategoryWordTagFactory

    java.lang.Object
      edu.stanford.nlp.ling.CategoryWordTagFactory

All Implemented Interfaces:
  LabelFactory

    public class CategoryWordTagFactory

extends Object
implements LabelFactory

A `CategoryWordTagFactory` is a factory that makes a `Label` which is a `CategoryWordTag` triplet.

Author:
  Christopher Manning

Constructor Summary
`CategoryWordTagFactory()`

Method Summary
`Label` `newLabel(Label oldLabel)` Create a new `CategoryWordTag Label`, where the label is formed from the `Label` object passed in.
`Label` `newLabel(String labelStr)` Make a new label with this `String` as the "name".
`Label` `newLabel(String labelStr, int options)` Make a new label with this `String` as the value.
`Label` `newLabel(String word, String tag, String category)` Create a new CategoryWordTag label, where the label is formed from the various `String` objects passed in.
`Label` `newLabelFromString(String labelStr)` Make a new label with this `String` as the "name".

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### CategoryWordTagFactory

    public CategoryWordTagFactory()

Method Detail

### newLabel

    public Label newLabel(String labelStr)

  Make a new label with this `String` as the "name".

  Specified by:
    `newLabel` in interface `LabelFactory`
  Parameters:
    `labelStr` - The string to use as a label
  Returns:
    The newly created Label

### newLabel

    public Label newLabel(String labelStr,
                          int options)

  Make a new label with this `String` as the value. This implementation ignores the options

  Specified by:
    `newLabel` in interface `LabelFactory`
  Parameters:
    `labelStr` - The String that will be used for balue
    `options` - This argument is ignored
  Returns:
    The newly created Label

### newLabelFromString

    public Label newLabelFromString(String labelStr)

  Make a new label with this `String` as the "name".

  Specified by:
    `newLabelFromString` in interface `LabelFactory`
  Parameters:
    `labelStr` - The string to use as a label
  Returns:
    The newly created Label

### newLabel

    public Label newLabel(String word,
                          String tag,
                          String category)

  Create a new CategoryWordTag label, where the label is formed from the various `String` objects passed in.

  Parameters:
    `word` - The word part of the label
    `tag` - The tag part of the label
    `category` - The category part of the label
  Returns:
    The newly created Label

### newLabel

    public Label newLabel(Label oldLabel)

  Create a new `CategoryWordTag Label`, where the label is formed from the `Label` object passed in. Depending on what fields each label has, other things will be `null`.

  Specified by:
    `newLabel` in interface `LabelFactory`
  Parameters:
    `oldLabel` - The Label that the new label is being created from
  Returns:
    a new label of a particular type

Stanford NLP Group