Tutorial 4: View the web demo

In Tutorial 3, you saw how having a default model in your task enabled you to do automated tagging in the UI after you build a model. In this tutorial, we're going to explore, briefly, the Web demo capability which sometimes also depends on the default model.

In this tutorial, we're going to make use of the models we build in Tutorial 2.

Step 1: Start up the Web server and UI

See the section on starting the UI in Tutorial 1.

Step 2: Open the Web demo

When you define a task, you can also define a file called demo.xml which describes a demo of your task. In addition to the default URL for the annotation desktop, for each task which has a demo.xml file the Web server makes available the URL http://localhost:7801/tasks/<lastpathcomponent>/demo, where <lastpathcomponent> is the last path component of the path to your task. That is, if your task is located in the /path/to/mytask directory, <lastpathcomponent> will be mytask.

For the sample task, found in MAT_PKG_HOME/sample/ne, you'll surf to http://localhost:7801/tasks/ne/demo. You'll see a window like this:

This demo gives you the option of selecting a file to tag from a list, or of typing in some text.

Step 3: Tag a document

From the "Choose a document" menu, select "Sample news article #1 (editable)". This is just the file voa1.txt, that we've seen before. Press "go!". The document will be tagged, and the display will switch to the "Output" tab:

Toggle between the "Input" and "Output" panes to compare the raw and tagged documents.

Step 4: Tag some arbitrary text

You can also tag arbitrary text in the demo. Select "Blank document (editable)" from the "Choose a document" menu. Copy or paste some text into the "Input" tab which contains named entities, for instance, the sentence "President Barack Obama visited Atlanta, Georgia". Press "go!", and compare the results with the original as before.

Step 5: Clean up (optional)

If you're not planning on doing any other tutorials, and you don't want the "Named Entity" task hanging around, remove it as shown in the final step of Tutorial 1.

This concludes Tutorial 4.