|Magic Markup||Comment | Log in | Print | Subscribe to this page|
Magic Markup is designed to be a simple, fast aid to creating flat markup in text documents. It is also useful for inspecting and searching large numbers of textual reports with defined start and stop lines that exist togther in a single file. It does not currently manage nested (tags within tags) or overlapping markup and is meant primarily to aid in annotating separate text sequences within documents. It is designed to work with many small-to-medium sized documents that are contained within a single text file (e.g., a set of reports or chapters in a single text file). It is also a testbed for a simple XML editor. The program is written in REALbasic and cross-compiled for Windows and Macintosh from the same code base. A classic Mac OS version is available on request.
Note: version 0.6 fixes a bug that prevented creation of new markup tags.
Add comments to this page, if desired: MagicMarkupComments
Preferences in the File or Program menu. Shows a dialog that allows setting the text delimiters between documents in a file and specifying the default font, font size, font color and background color in the document display. These settings are saved in the MM.config file (a tab-delimited text file).
File Menu. Allows importing a text file containing documents for annotation, opening a previously-saved annotated XML file containing documents, or saving an annotated XML file. Imported text files are broken into documents based on the delimiters specified in Preferences. Magic Markup doesn't contain a complete XML parser, so it reads only XML files that it has saved. Editing these files separately with a text or XML editor may render them unreadable by the program (unless you understand the format MM is using) because the position of linebreaks, whitespace, etc., is significant.
Markup of a large corpus can extend over many work sessions, with the text imported initially and then the partial results saved into an XML file. The XML file can then be re-opened later for further annotation.
Edit Menu. Allows copying and pasting text from editable text areas. Also allows copying text from the report display.
Find and Find Again are also under the Edit Menu. Find displays the Find Window, which allows searching an individual document or all the documents and displaying the results incrementally or as a list of documents, see below. Find Again re-executes the same search with the current location as the starting point.
Windows Menu. Allows opening a document display window (if the default one is closed) or a window that allows entry of markup for annotations, see below.
Startup. This window displays the name of the program and allows an annotator to enter a name or other identifying string that will be saved with the annotated XML file. Any text, or no entry, is OK in this entry box.
Document Display. When text is imported or an XML file is opened, the individual documents are shown numbered in the list on the left. Clicking a document on the list displays its text on the right side of the window (the font, size, color, and background color of the document display are settable in Preferences, above). Text in the document display can be selected or copied, but not edited. The Previous and Next buttons at the upper right can be used to move to the next or previous document in the list. The Markup Palette button displays a floating palette containing annotation controls, see below. Markup that is added to a report is retained within the user session automatically, but needs to be explicity saved in an XML file on disk to be stored between sessions. Frequent saving to disk is a good idea. When markup changes are made that have not been saved to disk, a "Not saved" notation will appear in the upper left corner of the Document Display window. Documents that contain markup (or are indicated as having been reviewed but not containing markup) are shown in bold in the left-side document list.
Find Window. The Find Window is opened from the Edit/Find menu command. The text entry box at the top is used to enter a text string for case-insensitive searching, or if the Regex checkbox is checked, regular expressions may be entered as search strings. The search may be carried out against a single document or across all documents in the corpus. The popup menus allow the search to be directed to text in the document, text in document comments, or text in other annotations. Searching in annotations can be carried out for a specific annotation name (leave the text box blank for this and just choose the annotation from the popup menu), text enclosed by the annotation, text in any annotation attribute, or text in a specific annotation attribute.
The default mode is display of found text highlighted in the report and, if appropriate, on the markup palette. Instances of found text may be displayed in sequence by repeatedly choosing Find Again (or using the appropriate key sequence). If Batch Find at the bottom of the Find window is checked, a new window will show, above the list of reports, which contains all the found documents. Clicking on documents in this window will display the reports in the main window (found text is not highlighted in this case), and the next and previous buttons on the main display will move among the found documents as long as the batch find window is displayed.
Markup Palette. The Markup Palette provides tools for markup. There is a list of markup elements at the top that can be inserted into documents. To add markup, select text in the document display and click the desired markup element in the palette. The selected text will change to bold, underlined and the color of the clicked markup tag. If attributes have been specified for this tag, they can be revealed by clicking the triangle before the Annotation Attributes label at the bottom of the palette. The list that is revealed will contain the attribute names on the left side and cells for direct entry and editing of attribute values on the right side (Click a cell to enter or edit values). Comments about the overall report can be added by clicking the triangle in front of the Report Comment label and entering text in the field that appears.
If a report does not contain text requiring annotation, it can be explicitly identified as such by clicking the No markup button on the Markup Palette.
If previously-annotated text is clicked in the document display, the full annotation will be selected and it's features displayed in the Markup Palette. These features can be edited, or the annotation can be removed using the Remove selected markup button on the Markup Palette.
Markup Entry. The annotation elements and their attributes that are displayed in the Markup Palette can be created and edited in the Markup Entry Window. To create an element, enter a label for display in the Markup Palette, a name token to be used in the XML file, and a color (click the box) at the top of the window and click the Add button to add it to the list. Select an element of the list and use the delete button to delete it. When a list element is selected, any attributes defined for it are displayed in the attributes list at the bottom. To add an attribute, click the New button at the bottom of the window and type directly into the cells that appear. The label will be used in the Markup Palette and the NmToken? will be used in the XML file. Attributes can be edited or deleted by directly typing into the appropriate cells in the list. Changes in the attribute list must be saved by clicking the Update Attributes button at the bottom of the window. Markup elements and their attributes are saved to the MM.config file.
Notes on Magic Markup's XML format
All documents are saved together in a single XML file. The root element
The annotations tags represent "stand-off" markup of text sequences in the report (one annotation tag per annotated sequence). Attributes of the annotations tags define the type (the NameToken? defined in the Markup Entry window for that element), start line, start character, end line and end character of each annotation. Any attributes defined in the Markup Entry window for an element, and their specific values in this annotation, then appear as additional attribute-value pairs. The content of the attribute tag is the text sequence that was originally selected (repeated from the document) with any line ends or extra whitespace removed. Within the program, id and ref attributes are also defined for annotation tags but are currently unused. In the future, these may allow referencing between specific annotated sequences.
|This page was last edited 13 years ago.||View page history|