Skip to content

Repository files navigation

DKPro Meta

Tools to extract metadata from DKPro Core and process it.

DKPro Core is a large collection of UIMA components, and much of what describes them — type systems, component parameters, supported languages, models, tagset mappings, dataset definitions — lives scattered across UIMA descriptors, POM files, and resource files in the source tree. DKPro Meta scans a DKPro Core checkout and aggregates all of that into a single object graph that other tools can work with.

Its main consumer is the DKPro Core documentation build, which uses the aggregated model to generate the component reference documentation. The Galaxy example in this repository shows a second use: generating Galaxy tool wrappers so DKPro Core components can be run from a Galaxy workflow server.

Modules

Module Description
dkpro-meta-core Scans a DKPro Core source tree and builds the metadata model.
dkpro-meta-example-galaxy Example: generates Galaxy tool wrappers from the model. Not published.

Requirements

  • Java 21 or later
  • Maven 3.2.2 or later

Usage

Add the dependency:

<dependency>
  <groupId>org.dkpro.meta</groupId>
  <artifactId>dkpro-meta-core</artifactId>
  <version>0.5.0</version>
</dependency>

Point the aggregator at a DKPro Core checkout:

import org.dkpro.meta.core.MetadataAggregator
import org.dkpro.meta.core.model.MetadataModel

MetadataModel model = new MetadataAggregator().build(new File('/path/to/dkpro-core'))

println "${model.engines.size()} components"
println "${model.formats.size()} formats"

The resulting MetadataModel exposes:

Property Contents
typesystems UIMA type system descriptors
engines Analysis engines, keyed by class name
formats Readers and writers, keyed by format name
models Trained models, linked to the engines that use them
tagsets Tagset mappings read from the .map files
inputOutputTypes Types each component consumes and produces
typesystemMappings Type system mapping table
datasets Dataset descriptions

Running inside a Maven build

The aggregator logs through ContextHolder, which prefers the Maven plugin logger when one is available. When driving DKPro Meta from groovy-maven-plugin, hand it the script binding so that output and project / basedir resolve against the surrounding build:

import org.dkpro.meta.core.maven.ContextHolder

ContextHolder.setBinding(binding)

Without a binding, ContextHolder falls back to an SLF4J logger. DKPro Meta declares only slf4j-api; pick and configure a logging backend in the application that uses it.

Building

mvn clean install

Contributing

See the DKPro Contribution Guidelines.

License

Licensed under the Apache License, Version 2.0.

About

Collect metadata about DKPro Core and put it to use, e.g. to automatically generate documentation or wrappers for integration with other tools and frameworks.

Resources

Contributing

Stars

0 stars

Watchers

8 watching

Forks

Releases

Packages

Used by

Contributors

Languages