Package opennlp.tools.formats.ad
Klasse ADSentenceStream.SentenceParser
java.lang.Object
opennlp.tools.formats.ad.ADSentenceStream.SentenceParser
- Umschließende Klasse:
ADSentenceStream
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).
-
Verschachtelte Klassen - Übersicht
Verschachtelte KlassenModifizierer und TypKlasseBeschreibungstatic class
Represents the AD leafstatic class
Represents the AD nodestatic class
Represents a tree element, Node or Leaf -
Konstruktorübersicht
Konstruktoren -
Methodenübersicht
Modifizierer und TypMethodeBeschreibunggetElement
(String line) Parse a tree element from a AD lineParses a sentence string into aADSentenceStream.Sentence
.
-
Konstruktordetails
-
SentenceParser
public SentenceParser()
-
-
Methodendetails
-
parse
public ADSentenceStream.Sentence parse(String sentenceString, int para, boolean isTitle, boolean isBox) Parses a sentence string into aADSentenceStream.Sentence
.- Parameter:
sentenceString
- The input string to parse.para
- The parameter number.isTitle
-true
if it represents a title element,false
otherwise.isBox
-true
if it represents a box element,false
otherwise.- Gibt zurück:
- A
ADSentenceStream.Sentence
instance parsed fromsentenceString
.
-
getElement
Parse a tree element from a AD line- Parameter:
line
- the AD line- Gibt zurück:
- the tree element
-