Package opennlp.tools.formats.ad

## Class ADSentenceStream.SentenceParser

- java.lang.Object
- - opennlp.tools.formats.ad.ADSentenceStream.SentenceParser

- Enclosing class:
    ADSentenceStream

      public static class ADSentenceStream.SentenceParser
      extends Object

  Parses a sample of AD corpus. A sentence in AD corpus is represented by a Tree. In this class we declare some types to represent that tree. Today we get only the first alternative (A1).

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class | Description
    --- | --- | ---
    `class` | `ADSentenceStream.SentenceParser.Leaf` | Represents the AD leaf
    `class` | `ADSentenceStream.SentenceParser.Node` | Represents the AD node
    `class` | `ADSentenceStream.SentenceParser.TreeElement` | Represents a tree element, Node or Leaf

  - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `SentenceParser()` |

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `ADSentenceStream.SentenceParser.TreeElement` | `getElement​(String line)` | Parse a tree element from a AD line
    `ADSentenceStream.Sentence` | `parse​(String sentenceString, int para, boolean isTitle, boolean isBox)` | Parse the sentence

    - ### Methods inherited from class java.lang.Object

      `equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### SentenceParser

          public SentenceParser()

  - ### Method Detail

    - #### parse

          public ADSentenceStream.Sentence parse​(String sentenceString,
                                                 int para,
                                                 boolean isTitle,
                                                 boolean isBox)

      Parse the sentence

    - #### getElement

          public ADSentenceStream.SentenceParser.TreeElement getElement​(String line)

      Parse a tree element from a AD line
      Parameters:
        `line` - the AD line
      Returns:
        the tree element