GithubHelp home page GithubHelp logo

apache / uima-ruta Goto Github PK

View Code? Open in Web Editor NEW
16.0 9.0 5.0 19.98 MB

Apache UIMA Ruta

Home Page: https://uima.apache.org

License: Apache License 2.0

HTML 0.21% Java 95.02% TeX 0.91% GAP 3.74% Lex 0.09% Shell 0.03%
apache uima text-analysis java ruta

uima-ruta's Introduction

Maven Central

Build Status Build Status

What is Apache UIMA Ruta?

Apache UIMA Ruta™ is a rule-based script language supported by Eclipse-based tooling. The language is designed to enable rapid development of text processing applications within Apache UIMA™. A special focus lies on the intuitive and flexible domain specific language for defining patterns of annotations. Writing rules for information extraction or other text processing applications is a tedious process. The Eclipse-based tooling for UIMA Ruta, called the Apache UIMA Ruta Workbench, was created to support the user and to facilitate every step when writing UIMA Ruta rules. Both the Ruta rule language and the UIMA Ruta Workbench integrate smoothly with Apache UIMA.

Rule Language

The UIMA Ruta language is an imperative rule language extended with scripting elements. A rule defines a pattern of annotations with additional conditions. If this pattern applies, then the actions of the rule are performed on the matched annotations. A rule is composed of a sequence of rule elements and a rule element usually consists of four parts: A matching condition, an optional quantifier, a list of conditions and a list of actions. The matching condition is typically a type of an annotation by which the rule element matches on the covered text of one of those annotations. The quantifier specifies, whether it is necessary that the rule element successfully matches and how often the rule element may match. The list of conditions specifies additional constraints that the matched text or annotations need to fulfill. The list of actions defines the consequences of the rule and often creates new annotations or modifies existing annotations.

The following example rule consists of three rule elements. The first one (ANY...) matches on every token, which has a covered text that occurs in a word lists, named MonthsList. The second rule element (PERIOD?) is optional and does not need to be fulfilled, which is indicated by the quantifier ?. The last rule element (NUM...) matches on numbers that fulfill the regular expression REGEXP(".{2,4}") and are therefore at least two characters to a maximum of four characters long. If this rule successfully matches on a text passage, then its three actions are executed: An annotation of the type Month is created for the first rule element, an annotation of the type Year is created for the last rule element and an annotation of the type Date is created for the span of all three rule elements. If the word list contains the correct entries, then this rule matches on strings like Dec. 2004, July 85 or 11.2008 and creates the corresponding annotations.

(ANY{INLIST(MonthsList) -> Month} PERIOD? @NUM{REGEXP(".{2,4}") -> Year}){-> Date};

Here is a short overview of additional features of the rule language:

  • Expressions and variables
  • Import and execution of external components
  • Flexible matching with filtering
  • Modularization in different files or blocks
  • Control structures, e.g., for windowing
  • Score-based extraction
  • Modification
  • Html support
  • Dictionaries
  • Extensible language definition

Workbench

The UIMA Ruta Workbench was created to facilitate all steps in creating Analysis Engines based on the UIMA Ruta language. Here is a short overview of included features:

Editing support: The full-featured editor for the UIMA Ruta language provides syntax and semantic highlighting, syntax checking, context-sensitive auto-completion, template-based completion, open declaration and more.

Rule Explanation: Each step in the matching process can be explained: This includes how often a rule was applied, which condition was not fulfilled, or by which rule a specific annotation was created. Additionally, profile information about the runtime performance can be accessed.

Automatic Validation: UIMA Ruta scripts can automatically validated against a set of annotated documents (F1 score, test-driven development) and even against unlabeled documents (constraint-driven evaluation).

Rule learning: The supervised learning algorithms of the included TextRuler framework are able to induce rules and, therefore, enable semi-automatic development of rule-based components.

Query: Rules can be used as query statements in order to investigate annotated documents.

The UIMA Ruta Workbench can be installed via Eclipse update site https://downloads.apache.org/uima/eclipse-update-site-v3.

Building from the Source Distribution

We use Maven 3.8.1 and Java 17 or later for building; download this if needed, and set the environment variable MAVEN_OPTS to -Xmx800m.

Then do the build by going into the UIMA Ruta directory, and issuing the command

mvn clean install

This builds everything except the ...source-release.zip file. If you want that, change the command to

mvn clean install -Papache-release

For more details, please see https://uima.apache.org/building-uima.html.

How to Get Involved

The Apache UIMA project really needs and appreciates any contributions, including documentation help, source code and feedback. If you are interested in contributing, please visit http://uima.apache.org/get-involved.html.

How to Report Issues

The Apache UIMA project uses GitHub for issue tracking. Please report any issues you find at our issue tracker.

Useful tips

This product was originally released as Apache UIMA TextMarker. The UIMA Ruta Workbench provides a command for updating old projects. Please right-click on a project and select UIMA Ruta -> Update Project.

The UIMA Ruta analysis engine requires type priorities for the correct execution of rules. If a CAS is created using the CasCreationUtils, please provide the type priorities, e.g., by:

URL tpUrl = this.getClass().getResource("/org/apache/uima/ruta/engine/TypePriorities.xml");
TypePriorities typePriorities = UIMAFramework.getXMLParser().parseTypePriorities(
    new XMLInputSource(tpUrl));
CAS cas = CasCreationUtils.createCas(descriptor, typePriorities, new FsIndexDescription[0]);

Using the jcasgen-maven-plugin may cause problems if it creates duplicate classes for the internal UIMA Ruta types (overwriting the implementation of RutaBasic). Depending on the location of the type system descriptors, the plugin should be configured to be limited on the project, or the UIMA Ruta type system descriptors should explicitly be excluded:

<configuration>
  <typeSystemExcludes>
    <typeSystemExclude>/**/BasicTypeSystem.xml</typeSystemExclude>
    <typeSystemExclude>/**/InternalTypeSystem.xml</typeSystemExclude>
  </typeSystemExcludes>
</configuration>

Useful links

Reference

If you use UIMA Ruta to support academic research, then please consider citing the following paper as appropriate:

@article{NLE:10051335,
  author = {Kluegl, Peter and Toepfer, Martin and Beck, Philip-Daniel and Fette, Georg and Puppe, Frank},
  title = {UIMA Ruta: Rapid development of rule-based information extraction applications},
  journal = {Natural Language Engineering},
  volume = {22},
  issue = {01},
  month = {1},
  year = {2016},
  issn = {1469-8110},
  pages = {1--40},
  numpages = {40},
  doi = {10.1017/S1351324914000114},
  URL = {https://journals.cambridge.org/article_S1351324914000114},
}

uima-ruta's People

Contributors

azazali30 avatar kottmann avatar pkluegl avatar reckart avatar renaud avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

uima-ruta's Issues

Usage of labels within macro action definition is broken

Describe the bug
Usage of labels within macro action definition is broken. The macro action overrides the delegated action labels

To Reproduce
Exemplary rule:

ACTION subject(ANNOTATION diag, ANNOTATION ref, STRING value) = diag_subject:CREATE(DiagnosisSubject, 
    "interpretation" = value, "statusReference" = ref), diag.subject=diag_subject;

Expected behavior
Labels should work within macro actions

Apache UIMA Ruta 3.4.0

Preparations

  • Create release issue and release preparation branch
  • Update README.md file
  • Update RELEASE_NOTES.md file
  • Check the LICENSE and NOTICE files for the binary release / Eclipse plugins
  • Make sure to remove all SNAPSHOT repositories and SNAPSHOT dependencies
  • Update API reference version in POM

Building

  • Clean local .m2 repository
  • Commit all changes and check out in a new clean build location
  • Run a trial build locally with -Papache-release
  • Check the issues report in issuesFixed if it looks ok
  • Do the release build (mvn -DautoVersionSubmodules=true release:prepare release:perform)

Staging

Voting

  • Call for a vote on the developer mailing list
  • Close vote and post vote results to the developer mailing list (wait at least for 72 hours, at least 3 +1 votes required for release, sign mail using same GPG key that was used to sign release)

Publishing
Copy the release artifacts from the staging spot to the dist spot in SVN

  • Copy the release artifacts from the staging spot to the dist spot in SVN
    svn mv -m "Move final release candidate to dist spot" https://dist.apache.org/repos/dist/dev/uima/ruta-3.4.0-RC-202401151426-167560c https://dist.apache.org/repos/dist/release/uima/ruta-3.3.0
  • Copy existing Eclipse update site to the archive spot
    svn copy -m "Create eclipse plugin archive for ruta 3.3.0" https://dist.apache.org/repos/dist/release/uima/eclipse-update-site-v3/ruta https://dist.apache.org/repos/dist/release/uima/archive-eclipse-update-site/ruta-3.3.0
  • Delete existing Eclipse update site
    svn rm -m "Removing previous update site to make space for new one" https://dist.apache.org/repos/dist/release/uima/eclipse-update-site-v3/ruta
  • Move the new update site from staging spot to release spot
    svn mv -m "Installing Ruta 3.4.0 update site from accepted RC2" https://dist.apache.org/repos/dist/release/uima/ruta-3.4.0/eclipse-update-site/ https://dist.apache.org/repos/dist/release/uima/eclipse-update-site-v3/ruta
  • Release staging repository at https://repository.apache.org/
  • Create a new git tag e.g. rel/ruta-3.4.0 and remove the one not prefixed with rel
  • Merge the release preparation pull request
  • Archive website: svn copy -m "Creating versioned copy of current release documentation in archive" https://svn.apache.org/repos/asf/uima/site/trunk/uima-website/docs/d/ruta-current https://svn.apache.org/repos/asf/uima/site/archive/docs/d/ruta-3.3.0
  • Update website
  • Register the release in Whimsy
  • Close the release in the issue tracker
  • Post release announcement to [email protected] (Cc: [email protected], [email protected] — once release has arrived at https://repo1.maven.org/maven2/org/apache/uima/ruta-core/  — sign mail using same GPG key that was used to sign release)

Merge type system modules into core module

Describe the refactoring action
Move the contents of the type system modules into the core module and drop the type system modules.

Expected benefit
There is a split package between the core module and the type system modules which causes a problem in OSGI environments. The current OSGI-enabled build already does merge the contents of the type system modules into the core module. This now causes duplicate classes/resources if both the core and the type system modules are on the classpath (which is basically always the case since core has a dependency on them). So on the bottom line, if we just merge those modules into core and remove them otherwise, the world is a nicer place.

Rule applied without all elements matched.

Describe the bug
Matched rule without matched element after wildcard.

To Reproduce
Observed in a rule like
Sentence->{Concept{-> ACTION} # QUESTION} _{-PARTOF(Keyword)};

ACTION is executed in documents without question mark.

Expected behavior
The inner rule should not match successfully.

Screenshots

Please complete the following information:
latest ruta

Additional context
none

Unable to use Ruta Query view in Ruta 3.4.0-RC-1

Describe the bug
When trying to use the Ruta query view in Eclipse, an exception is generated.

To Reproduce
Steps to reproduce the behavior:

  1. Install Ruta 3.4.0 RC 1
  2. Switch to Ruta perspective
  3. Locate the query view in the middle lower part of the screen
  4. Choose an XMI file in the "Query data" input field
  5. Choose a typesystem as well
  6. Press the green "play" button.

Expected behavior
Some kind of result - no error.

Screenshots

java.lang.NoClassDefFoundError: org/apache/uima/ruta/ReindexUpdateMode
	at java.base/java.lang.Class.getDeclaredFields0(Native Method)
	at java.base/java.lang.Class.privateGetDeclaredFields(Class.java:3297)
	at java.base/java.lang.Class.getDeclaredFields(Class.java:2371)
	at org.apache.uima.fit.internal.ReflectionUtil.getFields(ReflectionUtil.java:59)
	at org.apache.uima.fit.internal.ReflectionUtil.getFields(ReflectionUtil.java:45)
	at org.apache.uima.fit.component.initialize.ConfigurationParameterInitializer.initialize(ConfigurationParameterInitializer.java:101)
	at org.apache.uima.fit.component.JCasAnnotator_ImplBase.initialize(JCasAnnotator_ImplBase.java:35)
	at org.apache.uima.ruta.engine.RutaEngine.initialize(RutaEngine.java:639)
	at org.apache.uima.analysis_engine.impl.AnalysisEngineImplBase.lambda$callInitializeMethod$2(AnalysisEngineImplBase.java:658)
	at org.apache.uima.analysis_engine.impl.AnalysisEngineImplBase.withContexts(AnalysisEngineImplBase.java:698)
	at org.apache.uima.analysis_engine.impl.AnalysisEngineImplBase.callInitializeMethod(AnalysisEngineImplBase.java:658)
	at org.apache.uima.analysis_engine.impl.PrimitiveAnalysisEngine_impl.initializeAnalysisComponent(PrimitiveAnalysisEngine_impl.java:243)
	at org.apache.uima.analysis_engine.impl.PrimitiveAnalysisEngine_impl.initialize(PrimitiveAnalysisEngine_impl.java:167)
	at org.apache.uima.impl.AnalysisEngineFactory_impl.produceResource(AnalysisEngineFactory_impl.java:97)
	at org.apache.uima.impl.CompositeResourceFactory_impl.produceResource(CompositeResourceFactory_impl.java:64)
	at org.apache.uima.UIMAFramework.produceResource(UIMAFramework.java:284)
	at org.apache.uima.UIMAFramework.produceResource(UIMAFramework.java:334)
	at org.apache.uima.UIMAFramework.produceAnalysisEngine(UIMAFramework.java:449)
	at org.apache.uima.ruta.query.ui.QueryActionHandler$QueryHandlerJob.run(QueryActionHandler.java:193)
	at org.eclipse.core.internal.jobs.Worker.run(Worker.java:63)
Caused by: java.lang.ClassNotFoundException: org.apache.uima.ruta.ReindexUpdateMode cannot be found by org.apache.uima.ruta.engine_3.4.0
	at org.eclipse.osgi.internal.loader.BundleLoader.generateException(BundleLoader.java:541)
	at org.eclipse.osgi.internal.loader.BundleLoader.findClass0(BundleLoader.java:487)
	at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:416)
	at org.eclipse.osgi.internal.loader.ModuleClassLoader.loadClass(ModuleClassLoader.java:168)
	at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:525)
	... 20 more

Please complete the following information:

  • Version: 3.4.0-RC-1

Better error messages in query view

Is your feature request related to a problem? Please describe.
When providing a bad data location or no type system, unhelpful error messages (usually an NPE error) is generated.

Describe the solution you'd like
Provide helpful error messages.

Assignment of composed number expression is broken

Describe the bug
The recent work on string expression broke some functionality for number expressions.

To Reproduce
Test rules like the following:
image

Expected behavior
Should assign correct values

Screenshots
If applicable, add screenshots to help explain your problem.

Please complete the following information:

  • Version: 3.4.0

Additional context
none

UIMA Core plugins not found when installing Ruta

Describe the bug
When I try installing Ruta 3.4.0-RC-1, the UIMA Core plugin dependencies are not automatically found. Looks like this might be because the Apache downloads have moved to a new URL and the redirection is not working as expected.

Expected behavior
When trying to install Ruta, the UIMA plugins should automatically be found even without me having to pre-install them or having to registering a corresponding update site in Eclipse.

Please complete the following information:

  • Version: 3.4.0-RC-1

Improve initial expansion of tree in applied rules view

Is your feature request related to a problem? Please describe.
If many ruta scripts are applied, then the list of applied scripts and rules become too large since all scripts are expanded to their first level.

Describe the solution you'd like
Expand to the first level, only if few ruta scripts have been applied.

Describe alternatives you've considered
none

Additional context
none

Entity extraction using ruta scripts are not working post upgrading uima and ruta to 3x version.

Entity extraction using ruta scripts are not working post upgrading uima and ruta to 3x version.
It was working fine with 2x versions and only JCas classes are upgraded to 3x version.
I did not find any exceptions but its not detecting any entities.

Any extra steps need to do for ruta scripts during migration.

versions used:
[uimaj-3.4.1]
[uimafit-3.4.0]
[ruta-3.3.0]
[cleartk-3.0.0]

i am expecting any heads up which can help in debugging this and any steps that missed during migration.

Document is ambiguous error on executing ruta script.

I am using below versions:

versions used:
[uimaj-3.4.1]
[uimafit-3.4.0]
[ruta-3.3.0]
[cleartk-3.0.0]

java.lang.IllegalArgumentException: Document is ambiguous, use one of the following instead : org.apache.uima.ruta.type.Document uima.tcas.DocumentAnnotation

ruta-core is unable to access extension from ruta-core-ext in OSGI context

Describe the bug
ruta-core-ext contains some extension functions that need to be enabled e.g. as

createEngineDescription(
    RutaEngine.class,
    RutaEngine.PARAM_ADDITIONAL_EXTENSIONS, StringOperationsExtension.class);

However, the ruta-core bundle has no optional import of the required packages from ruta-core-ext and there is also no alternative such as an SPI which would allow discovery.

To Reproduce
Steps to reproduce the behavior:

  1. Try running a Ruta engine which uses an extension in an OSGI context

Expected behavior
The simplest solution would probably be adding an optional import for the packages of ruta-core-ext to the ruta-core bundle.

Please complete the following information:

  • Version: 3.3.0

Support copy/paste clipboard for feature values in annotation browser view

Is your feature request related to a problem? Please describe.
I have to manually type the values of specific features in order to copy/use them in other contexts.

Describe the solution you'd like
Support copy/paste clipboard for feature values in annotation browser view

Describe alternatives you've considered
none

Additional context
none

Apache UIMA Ruta 3.3.0

Preparations

  • Create release issue and release preparation branch
  • Update README.md file
  • Update RELEASE_NOTES.md file
  • Check the LICENSE and NOTICE files for the binary release / Eclipse plugins
  • Make sure to remove all SNAPSHOT repositories and SNAPSHOT dependencies
  • Update API reference version in POM

Building

  • Clean local .m2 repository
  • Commit all changes and check out in a new clean build location
  • Run a trial build locally with -Papache-release
  • Check the issues report in issuesFixed if it looks ok
  • Do the release build (mvn -DautoVersionSubmodules=true release:prepare release:perform)

Staging

Voting

  • Call for a vote on the developer mailing list
  • Close vote and post vote results to the developer mailing list (wait at least for 72 hours, at least 3 +1 votes required for release, sign mail using same GPG key that was used to sign release)

Publishing
Copy the release artifacts from the staging spot to the dist spot in SVN

  • Copy the release artifacts from the staging spot to the dist spot in SVN
    svn mv -m "Move final release candidate to dist spot" https://dist.apache.org/repos/dist/dev/uima/ruta-3.3.0-RC-202302131513-1df286f https://dist.apache.org/repos/dist/release/uima/ruta-3.3.0
  • Copy existing Eclipse update site to the archive spot
    svn copy -m "Create eclipse plugin archive for ruta 3.2.0" https://dist.apache.org/repos/dist/release/uima/eclipse-update-site-v3/ruta https://dist.apache.org/repos/dist/release/uima/archive-eclipse-update-site/ruta-3.2.0
  • Delete existing Eclipse update site
    svn rm -m "Removing previous update site to make space for new one" https://dist.apache.org/repos/dist/release/uima/eclipse-update-site-v3/ruta
  • Move the new update site from staging spot to release spot
    svn mv -m "Installing Ruta 3.3.0 update site from accepted RC1" https://dist.apache.org/repos/dist/release/uima/ruta-3.3.0/eclipse-update-site/ https://dist.apache.org/repos/dist/release/uima/eclipse-update-site-v3/ruta
  • Release staging repository at https://repository.apache.org/
  • Create a new git tag e.g. rel/ruta-3.3.0 and remove the one not prefixed with rel
  • Merge the release preparation pull request
  • Update website
  • Close the release in the issue tracker
  • Post release announcement to [email protected] (Cc: [email protected], [email protected] — once release has arrived at https://repo1.maven.org/maven2/org/apache/uima/uimaj-core/  — sign mail using same GPG key that was used to sign release)

Switch to GH-based changes generation

Describe the refactoring action
Switch from the Maven changes plugin to a GH-based approach.

Expected benefit
The changes plugin is no longer maintained and fails building a GH report if no issue is open for the specified version.

Resolve split package between ruta-core and ruta-core-ext

Describe the refactoring action
Move the contents of the following packages from ruta-core-ext to ruta-core:

  • org.apache.uima.ruta.action
  • org.apache.uima.ruta.block
  • org.apache.uima.ruta.type

Expected benefit
These packages overlap with packages of the same name in ruta-core (i.e. they are "split packages"). In an OSGI context, split packages are problematic. Moving the classes will resolve this problem.

Improve support for feature assignments

Is your feature request related to a problem? Please describe.
When assigning a numeric value to a string feature, the user requires a workaround like f=""+(number). Boolean assigments are also not directly supported in some use cases.

Describe the solution you'd like
Improve support for different kind of primitive feature assignments with a certainlevel of "auto boxing/conversion".

Describe alternatives you've considered
none

Additional context
none

Convert documentation to Asciidoc

Describe the refactoring action
Convert documentation to Asciidoc.

Expected benefit
Be able to abandon the DocBook XML toolchain.

Enable loading uimaFIT annotators and other classes through the TCCL

Is your feature request related to a problem? Please describe.
In certain environments where Ruta may be deployed, analysis engine implementations may be available via the TCCL instead of via the resource manager's extension classloader or via the system classloader. However, Ruta currently does not consult the TCCL when instantiating extensions or engines.

Describe the solution you'd like
Also consider the TCCL when instantiating extensions or engines.

Enable type system discovery via SPI in OSGI

Is your feature request related to a problem? Please describe.
Ruta built-in type systems can currently not be detected via SPI in OSGI.

Describe the solution you'd like
Use the UIMA-provided SPI mechanism to make JCas classes and type systems discoverable.

Upgrade dependencies (3.3.0)

Describe the refactoring action
Upgrade dependencies:

  • UIMA Parent POM 15 -> 16
  • UIMA Java SDK 3.3.0 -> 3.4.0
  • uimaFIT 3.3.0 -> 3.4.0
  • spring 5.3.21 -> 5.3.25
  • p2-layout-resolver 1.3.0 -> 1.7.0

Expected benefit
Bug fixes and improvements

Update dependencies (3.4.0)

Describe the refactoring action
Update dependencies.

  • Java 1.8 -> 17
  • Apache UIMA Parent POM 16 -> 17
  • uima-uimaj 3.4.0 -> 3.5.0
  • tycho 2.7.5 -> 4.0.4
  • junit4 -> 4.13.2 (needed for Maven plugin test harness...)
  • junit 5.10.0 -> 5.10.1
  • maven-plugin-testing-harness 2.0 -> 3.3.0
  • maven -> 3.2.5
  • maven-plugin-tools-javadoc 2.9 -> 3.5.2
  • plexus-utils -> removed
  • dltk 3.0.0 -> 5.11.0
  • caffeine 2.9.3 -> 3.1.8
  • Test converted to JUnit 5
  • spring 5.3.25 -> 5.3.30
  • maven 3.2.5 -> 3.8.1
  • commons-text 1.10.0 -> 1.11.0
  • commons-lang3 3.13.0 -> 3.14.0
  • commons-io 2.13.0 -> 2.15.1
  • commons-logging 1.1.1 -> 1.3.0
  • Switch to Eclipse 2023-09 baseline
  • Force dependency on DLTK 5.11.0
  • Add Eclipse 2018-12 update site as a reference repository to the Ruta feature so users can get DLTK 5.11.0 which is no longer included in recent Eclipse releases

Expected benefit
Bug fixes and improvements.

RutaResourceLoader should consider TCCL

Is your feature request related to a problem? Please describe.
The RutaResourceLoader currently does not consider the TCCL. This is a problem in some environments where the TCCL provides access to important resources that e.g. the ResourceManager is not able to access.

Describe the solution you'd like
Add a second fallback option to RutaResourceLoader which considers the TCCL.

Describe alternatives you've considered
Feeding in all classloaders via the ResourceManager - which is not always convenient.

Mark Maven Mojos as thread-safe

Describe the refactoring action
Mark Maven Mojos as thread-safe.

Expected benefit
Not get warnings from Maven during parallel builds that the plugins may be incompatible with parallel builds (we believe they are compatible).

Find alternative to HTMLParser library

Describe the refactoring action
The HTMLParser library used by ruta has not been maintained for over 10 years and is compiled with a very old Java version. It should be replaced by a modern and maintained dependency. JSoup would come to mind.

Expected benefit

Apache UIMA Ruta 3.4.1

Preparations

  • Create release issue and release preparation branch
  • Update README.md file
  • Update RELEASE_NOTES.md file
  • Check the LICENSE and NOTICE files for the binary release / Eclipse plugins
  • Make sure to remove all SNAPSHOT repositories and SNAPSHOT dependencies
  • Update API reference version in POM

Building

  • Clean local .m2 repository
  • Commit all changes and check out in a new clean build location
  • Run a trial build locally with -Papache-release
  • Check the issues report in issuesFixed if it looks ok
  • Do the release build (mvn -DautoVersionSubmodules=true release:prepare release:perform)

Staging

Voting

  • Call for a vote on the developer mailing list
  • Close vote and post vote results to the developer mailing list (wait at least for 72 hours, at least 3 +1 votes required for release, sign mail using same GPG key that was used to sign release)

Publishing
Copy the release artifacts from the staging spot to the dist spot in SVN

  • Copy the release artifacts from the staging spot to the dist spot in SVN
    svn mv -m "Move final release candidate to dist spot" https://dist.apache.org/repos/dist/dev/uima/ruta-3.4.1-RC-202402051009-68e2f26/ https://dist.apache.org/repos/dist/release/uima/ruta-3.4.1
  • No need to do this next time because 3.4.1 was already archived Copy existing Eclipse update site to the archive spot
    svn copy -m "svn copy -m "Create eclipse plugin archive for ruta 3.4.0" https://dist.apache.org/repos/dist/release/uima/eclipse-update-site-v3/ruta https://dist.apache.org/repos/dist/release/uima/archive-eclipse-update-site/ruta-3.4.0
  • Delete existing Eclipse update site
    svn rm -m "Removing previous update site to make space for new one" https://dist.apache.org/repos/dist/release/uima/eclipse-update-site-v3/ruta
  • Move the new update site from staging spot to release spot
    svn mv -m "Installing Ruta 3.4.1 update site from accepted RC1" https://dist.apache.org/repos/dist/release/uima/ruta-3.4.1/eclipse-update-site/ https://dist.apache.org/repos/dist/release/uima/eclipse-update-site-v3/ruta
  • Copy existing Eclipse update site to the archive spot
    svn copy -m "Create eclipse plugin archive for ruta 3.4.1" https://dist.apache.org/repos/dist/release/uima/eclipse-update-site-v3/ruta https://dist.apache.org/repos/dist/release/uima/archive-eclipse-update-site/ruta-3.4.1
  • Release staging repository at https://repository.apache.org/
  • Create a new git tag e.g. rel/ruta-3.4.1 and remove the one not prefixed with rel
  • Merge the release preparation pull request
  • No need to do this next time because 3.4.1 was already archived Archive website: svn copy -m "Creating versioned copy of current release documentation in archive" https://svn.apache.org/repos/asf/uima/site/trunk/uima-website/docs/d/ruta-current https://svn.apache.org/repos/asf/uima/site/archive/docs/d/ruta-3.4.0
  • Update website
  • Archive website: svn copy -m "Creating versioned copy of current release documentation in archive" https://svn.apache.org/repos/asf/uima/site/trunk/uima-website/docs/d/ruta-current https://svn.apache.org/repos/asf/uima/site/archive/docs/d/ruta-3.4.1
  • Register the release in Whimsy
  • Post release announcement to [email protected] (Cc: [email protected], [email protected] — once release has arrived at https://repo1.maven.org/maven2/org/apache/uima/ruta-core/  — sign mail using same GPG key that was used to sign release)
  • Close the release in the issue tracker

UIMA SimpleServer is not compatible with the latest Ruta feature (relation annotation)

Describe the bug
SimpleServer does not recognize relation annotation as mentioned in Apache UIMA Ruta™ Guide and Reference. It will throw error when recognizing any such annotation.

HTTP Status 500 - XML output failed
type Exception report
message XML output failed
description The server encountered an internal error that prevented it from fulfilling this request.
exception
java.lang.RuntimeException: XML output failed
	org.apache.uima.simpleserver.output.ResultConverter.getXMLString(ResultConverter.java:88)
	org.apache.uima.simpleserver.servlet.SimpleServerServlet.transformResult(SimpleServerServlet.java:296)
	org.apache.uima.simpleserver.servlet.SimpleServerServlet.analyze(SimpleServerServlet.java:213)
	org.apache.uima.simpleserver.servlet.SimpleServerServlet.doPost(SimpleServerServlet.java:190)
	javax.servlet.http.HttpServlet.service(HttpServlet.java:643)
	javax.servlet.http.HttpServlet.service(HttpServlet.java:723)
root cause
java.lang.NullPointerException: Cannot invoke "org.apache.uima.simpleserver.output.Result.getResultEntries()" because "result" is null
	org.apache.uima.simpleserver.output.ResultConverter.getXMLString(ResultConverter.java:60)
	org.apache.uima.simpleserver.servlet.SimpleServerServlet.transformResult(SimpleServerServlet.java:296)
	org.apache.uima.simpleserver.servlet.SimpleServerServlet.analyze(SimpleServerServlet.java:213)
	org.apache.uima.simpleserver.servlet.SimpleServerServlet.doPost(SimpleServerServlet.java:190)
	javax.servlet.http.HttpServlet.service(HttpServlet.java:643)
	javax.servlet.http.HttpServlet.service(HttpServlet.java:723) 

To Reproduce
Steps to reproduce the behavior:

  1. Clone the repo https://e.coding.net/cvd-bioinformatics/transdifferentiation/reprogramming-uima-tomcat.git in Eclipse
  2. In Eclipse, right click on pom.xml > Run as > maven install (Make sure you have installed M2Eclipse)
  3. Right click on the project root, Run As > Run on Server (Make sure you have installed Eclipse Java EE Developer Tools,Eclipse Java Web Developer Tools,Eclipse Web Developer Tools,Eclipse XML Editors and Tools,JST Server Adapters Extensions and JST Server Adapters Extensions (Apache Tomcat), configured at least one available Tomcat server in Eclipse and add the server runtime into the project classpath.)
  4. In the browser, visit http://localhost:8080/UIMADemo/?mode=form and enter Neurog2 is downstream of Pax6. Click "Submit Query".

Expected behavior
The server should return an xml response about the text analysis result instead of error messages.

Please complete the following information:
Versions:

  • OS: Windows 10 Professional (version: 21H2)
  • Eclipse: 2022-06 (4.24.0) (Build id: 20220609-1112)
  • Java: Eclipse Adoptium jdk-17.0.1.12-hotspot
  • Maven: Eclipse Embedded 3.8.4/1.18.3.20220227-1319
  • Apache Tomcat: 6.0.37
  • org.apache.uima.uimaj-core: 3.3.1
  • org.apache.uima.SimpleServer: 2.3.1

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.