developerguide

  Previous: Developer Guide Index: Developer Guide Next: Command Line Mode without

Sections:

Using Third Party UIMA Components in U-Compare

This section describes how to use UIMA components in general in the U-Compare system. Basic knowledge about the Java classpath and UIMA descriptors is assumed in this section.

Common Requirements

UIMA descriptors (type system, analysis engine, collection reader, etc.) should use <import name="...">, not <import location>, at least for the descriptors visible from U-Compare. Children in an aggregate component could have <import location> tag, but we cannot assure that it works or not.

Register Components Menu

Custom Classpath Setting

In the Library menu of the U-Compare workflow manager (the startup window), there is Register Components menu item. When you open this menu, a classpath setting dialog will appear. You can add your custom classpath entries, *.jar or any directory as Java normally allows, during runtime via this dialog. Due to the Java class loading mechanism, you may have to restart U-Compare to apply your changes, especially in cases some of your resources already loaded should be masked by the new classpath entries (or vice versa). Pay attension that such a masking may cause unexpected behaviours.

Registering Custom Components

Then check your custom classpath enries on, which includes your component descriptors, and click Search Component button at the buttom of the dialog. A list of component descriptors will appear if any, in another dialog window. U-Compare validates your descriptors whether the xml syntax is valid, file depedencies are not missing, etc., and shows errors if any. Please select the check boxes of your components, click Add to Library button. You will see your selected components in the Custom category of the Component Library on the right of the workflow manager. You can drag to change the category which your custom components belong to, or right click to show the delete menu, etc. Please refer to the User Guide for details.

Now you can use your custom components in the drag-and-drop way together with the predefined U-Compare components. However, please note that the mixture of components with different type systems would not work properly in most cases.

Both of the classpath setting and the component library setting are automatically saved. U-Compare checks the classpath enries when startup and shows a warning dialog, if any entry or any descriptor is missing in your file system.

U-Compare Import/Export Package

U-Compare provides a special importable archive format with .ucz file extension. We considered to use the UIMA PEAR package, but unfortunately concluded that PEAR is not proper for our case. One of the core aims of U-Compare is to provide the highest interoperability, which allows users just to drag-and-drop to use components. On the other hand, PEAR is intended to be more generic purpose including native tools which might require manual, complex installation process, sometimes not OS independent.

Export Workflow, Components and Resources

You can export workflow descriptor, component descriptors, resources (*.jar and all files under the directory of the specified classpath enries). Because it is impossible for U-Compare to detect which resources are required to run your current workflow, you should select the classpath entries by yourself.

The primary use case is to export the current workflow with necessary component descriptors and resources. Component descriptors which are predefined and provided by U-Compare are not included in the exported .ucz archive.

It is also possible to use this export function to create a custom component package. When you check the workflow descriptor checkbox off, the archive will contain component descriptors included in the current workflow and specified resources if any.

You can distribute the generated .ucz archive to any U-Compare users, if the licenses of the contained resources allow. We recommend the U-Compare distributable package, but it is also happy for us to host your .ucz file in our U-Compare website. Please contact us or report the created package in the U-Compare Forum.

Previous: Developer Guide Index: Developer Guide Next: Command Line Mode without