gate.yam.format
Class YamFormatter
java.lang.Object
gate.yam.format.YamFormatter
public class YamFormatter
- extends Object
Format utility for YAM based on JAPE.
- Author:
- Niraj Aswani
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
YamFormatter
public YamFormatter()
setDocumentProcessor
public static void setDocumentProcessor(DocumentProcessor p)
normalise
public static void normalise(gate.Document doc,
StringBuilder content)
- Normalise the spacing in an annotated YAM document.
- Parameters:
doc
- a GATE doc that's annotated with all the YAM constituentscontent
- the content that the GATE doc was built from
wrap
public static void wrap(StringBuilder inputText,
int startOffset,
int endOffset,
int indentLevel,
int textWidth)
- Wrap a range of text.
- Parameters:
inputText
- buffer that contains a range to modifystartOffset
- start offset of the range to wrapendOffset
- end offset of the range to wrapindentLevel
- left margin for the rangetextWidth
- wrap margin