public class SGMLProcessor extends Object
| Modifier and Type | Field and Description |
|---|---|
static boolean |
allTags
if true, all tags will be converted to Annotations.
|
static String[] |
emptyTags
a list of tags which do not have corresponding close tags and so are
to be converted to empty Annotations.
|
static boolean |
includeWhitespace
if true, whitespace following end tag is included as part of
span assigned to annotation.
|
| Constructor and Description |
|---|
SGMLProcessor() |
| Modifier and Type | Method and Description |
|---|---|
static void |
dereference(Document doc)
convert all references to Annotations appearing as features of
other annotations from their string form ("#nnnn", where nnnn
is the id of the Annotation being references) to actual pointers
to Annotations.
|
static Document |
sgmlToDoc(Document doc,
String tag)
Takes a
Document doc whose text contains
SGML markup; deletes all existing annotations and returns the
doc with tag tags removed from the text and tag
annotations added to the document. |
static Document |
sgmlToDoc(Document doc,
String[] tags) |
static Document |
sgmlToDoc(Document doc,
String sgmlText,
String tag) |
static Document |
sgmlToDoc(Document doc,
String sgmlText,
String[] tags) |
static Document |
sgmlToDoc(String sgmlText,
String tag)
Converts an SGML-marked String sgmlText to a
Document
instance with tag tags removed from the text and tag
annotations added to the document. |
static Document |
sgmlToDoc(String sgmlText,
String[] tags)
Converts an SGML-marked String sgmlText to a
Document
instance with tags tags removed from the text and tags
annotations added to the document. |
public static boolean includeWhitespace
public static boolean allTags
public static String[] emptyTags
public static Document sgmlToDoc(String sgmlText, String tag)
Document
instance with tag tags removed from the text and tag
annotations added to the document.Tags should have the exact form of <type [feature=value]*> or </type>.
tag - type of tagpublic static Document sgmlToDoc(Document doc, String tag)
Document doc whose text contains
SGML markup; deletes all existing annotations and returns the
doc with tag tags removed from the text and tag
annotations added to the document.Tags should have the exact form of <type [feature=value]*> or </type>.
tag - type of tagpublic static Document sgmlToDoc(String sgmlText, String[] tags)
Document
instance with tags tags removed from the text and tags
annotations added to the document.Tags should have the exact form of <type [feature=value]*> or </type>.
tags - array of types of tagpublic static void dereference(Document doc)
Copyright © 2016 New York University. All rights reserved.