A Tcl Annotator is a UIMA annotator component written in Tcl that can be used within the UIMA SDK framework.
The Tclator is the linkage between the UIMA framework and a Tcl Annotator. The Tclator is actually a UIMA C++ annotator which can be referenced by primitive annotator or CAS consumer descriptors. The descriptor must define one configuration parameter, a second is optional:
SourceFile
(mandatory) - a string holding the name of the Tcl module to run, andDebugLevel
(optional) - an integer value that specifies the debug level for tracing. Default value is 0. A value of 101 turns on Tclator tracing. Values 1-100 are reserved for annotator developer use.
The Tclator also provides a Tcl library implementing an interface between Tcl and the UIMA APIs of the UIMA C++ framework.
The Tclator has been tested with Tcl version 8.4 on Linux and with ActiveTcl8.4.13.0.261555-win32-ix86-threaded.exe on Windows XP.
The Tclator uses SWIG (http://www.swig.org/) to implement the Tcl library interface to UIMA. SWIG version 1.3.29 or later is required.
The UIMA C++ framework is required.
Tclator code is distributed in source form and must be built on the target platform.
Tclator source and sample code is located in the $UIMACPP_HOME/scriptators directory.
The Tclator requires the standard environment for UIMA C++ components.
Check that you have the required Tcl and Swig packages installed
make
Modify winmake.cmd to set the paths for your Tcl and Swig installs
winmake
Build results are the C++ annotator, tclator.so on Linux or tclator.dll on Windows.
If you have write access to UIMA C++ distribution tree, on Linux copy tclator.so to $UIMACPP_HOME/lib, and on Windows copy tclator.dll to $UIMACPP_HOME/bin.
If you don't have write access, make sure that tclator.so|.dll is in the LD_LIBRARY_PATH or PATH, as appropriate.
sample.tcl
with descriptor TclSample.xml
is included in the distribution. Use the descriptor as with any other UIMA annotator descriptor. Note that the Tcl script specified by the descriptor must be explicitly located, either with an absolute path or a path relative to the current directory of the running process.