public class ChunkSample extends Object implements Serializable
| Constructor and Description | 
|---|
| ChunkSample(List<String> sentence,
           List<String> tags,
           List<String> preds)Initializes the current instance. | 
| ChunkSample(String[] sentence,
           String[] tags,
           String[] preds)Initializes the current instance. | 
| Modifier and Type | Method and Description | 
|---|---|
| boolean | equals(Object obj) | 
| Span[] | getPhrasesAsSpanList()Gets the phrases as an array of spans | 
| String[] | getPreds()Gets the Chunk tags in B-* I-* notation | 
| String[] | getSentence()Gets the training sentence | 
| String[] | getTags()Gets the POS Tags for the sentence | 
| int | hashCode() | 
| String | nicePrint()Creates a nice to read string for the phrases formatted as following:  
 [NP Rockwell_NNP ] [VP said_VBD ] [NP the_DT agreement_NN ] [VP calls_VBZ ] [SBAR for_IN ]
 [NP it_PRP ] [VP to_TO supply_VB ] [NP 200_CD additional_JJ so-called_JJ shipsets_NNS ]
 [PP for_IN ] [NP the_DT planes_NNS ] ._. | 
| static Span[] | phrasesAsSpanList(String[] aSentence,
                 String[] aTags,
                 String[] aPreds)Static method to create arrays of spans of phrases | 
| String | toString() | 
public ChunkSample(String[] sentence, String[] tags, String[] preds)
sentence - training sentencetags - POS Tags for the sentencepreds - Chunk tags in B-* I-* notationpublic String[] getSentence()
public String[] getTags()
public String[] getPreds()
public Span[] getPhrasesAsSpanList()
public static Span[] phrasesAsSpanList(String[] aSentence, String[] aTags, String[] aPreds)
aSentence - training sentenceaTags - POS Tags for the sentenceaPreds - Chunk tags in B-* I-* notationpublic String nicePrint()
 [NP Rockwell_NNP ] [VP said_VBD ] [NP the_DT agreement_NN ] [VP calls_VBZ ] [SBAR for_IN ]
 [NP it_PRP ] [VP to_TO supply_VB ] [NP 200_CD additional_JJ so-called_JJ shipsets_NNS ]
 [PP for_IN ] [NP the_DT planes_NNS ] ._.
 Copyright © 2018 The Apache Software Foundation. All rights reserved.