CuratorConnectionExample.java |
|
---|---|
You can download this file here. This example shows how to connect to the Curator using Edison. While the Curator is stores annotations of text, Edison provides a library to manipulate the annotations and generate features using them. |
|
When we want to annotate raw text |
|
Print the text. This prints the raw text that was used to create the TextAnnotation object. |
|
Print the tokenized text. The tokenized text is obtained from the Curator, which defines a tokenization scheme. All the views in this TextAnnotation will be defined using this tokenization scheme. |
|
Print the de-tokenized text. In addition to the tokenized text, the de-tokenized text can also be used as the key for maps. |
|
Print the tokens |
|
Print the list of views that this text annotation has |
|
Print the sentences. |
|
Add parse trees generated by the stanford parser |
|
Get the parse trees as a TreeView. |
|
Each sentence in the text corresponds to a parse tree. |
|
Add parse trees generated by the stanford parser |
|
Each sentence in the text corresponds to a parse tree. |
|
Add the shallow parse view. |
|
Print all the views that have been added so far. |
|
Get the shallow parse view that was added from the curator as a SpanLabelView. |
|
Get all the shallow parse constituents. In the shallow parse constituent, each chunk will have one constituent. There are no relations between the chunks. |
|
Add the part of speech view. |
|
Print the views that have been added so far. |
|
Get the POS view as a TokenLabelView |
|