svn commit: r1492445 - /uima/uima-as/trunk/uimaj-as-core/src/main/java/org/apache/uima/aae/controller/AggregateAnalysisEngineController_impl.java
Author: cwiklik Date: Wed Jun 12 22:00:56 2013 New Revision: 1492445 URL: http://svn.apache.org/r1492445 Log: UIMA-2668 Modified sendExceptionToClient to prevent NPE Modified: uima/uima-as/trunk/uimaj-as-core/src/main/java/org/apache/uima/aae/controller/AggregateAnalysisEngineController_impl.java Modified: uima/uima-as/trunk/uimaj-as-core/src/main/java/org/apache/uima/aae/controller/AggregateAnalysisEngineController_impl.java URL: http://svn.apache.org/viewvc/uima/uima-as/trunk/uimaj-as-core/src/main/java/org/apache/uima/aae/controller/AggregateAnalysisEngineController_impl.java?rev=1492445&r1=1492444&r2=1492445&view=diff == --- uima/uima-as/trunk/uimaj-as-core/src/main/java/org/apache/uima/aae/controller/AggregateAnalysisEngineController_impl.java (original) +++ uima/uima-as/trunk/uimaj-as-core/src/main/java/org/apache/uima/aae/controller/AggregateAnalysisEngineController_impl.java Wed Jun 12 22:00:56 2013 @@ -2013,7 +2013,11 @@ public class AggregateAnalysisEngineCont private boolean sendExceptionToClient(CacheEntry cacheEntry, CasStateEntry casStateEntry, Endpoint replyEndpoint) throws Exception { -// Dont send CASes to the client if the input CAS is in failed state. One + + if ( casStateEntry == null ) { + return false; + } + // Dont send CASes to the client if the input CAS is in failed state. One // of the descendant CASes may have failed in one of the delegates. Any // exception on descendant CAS causes the input CAS to be returned to the // client with an exception but only when all its descendant CASes are
svn commit: r1492433 - /uima/uima-as/trunk/uimaj-as-core/src/main/java/org/apache/uima/aae/monitor/statistics/AnalysisEnginePerformanceMetrics.java
Author: cwiklik Date: Wed Jun 12 21:25:19 2013 New Revision: 1492433 URL: http://svn.apache.org/r1492433 Log: UIMA-2492 Revert attribute name back to uniqueName Modified: uima/uima-as/trunk/uimaj-as-core/src/main/java/org/apache/uima/aae/monitor/statistics/AnalysisEnginePerformanceMetrics.java Modified: uima/uima-as/trunk/uimaj-as-core/src/main/java/org/apache/uima/aae/monitor/statistics/AnalysisEnginePerformanceMetrics.java URL: http://svn.apache.org/viewvc/uima/uima-as/trunk/uimaj-as-core/src/main/java/org/apache/uima/aae/monitor/statistics/AnalysisEnginePerformanceMetrics.java?rev=1492433&r1=1492432&r2=1492433&view=diff == --- uima/uima-as/trunk/uimaj-as-core/src/main/java/org/apache/uima/aae/monitor/statistics/AnalysisEnginePerformanceMetrics.java (original) +++ uima/uima-as/trunk/uimaj-as-core/src/main/java/org/apache/uima/aae/monitor/statistics/AnalysisEnginePerformanceMetrics.java Wed Jun 12 21:25:19 2013 @@ -29,7 +29,7 @@ public class AnalysisEnginePerformanceMe private static final long serialVersionUID = 2355340461481671501L; private String name; - private String uimaContextPath; + private String uniqueName; private long analysisTime; private long numProcessed; @@ -39,7 +39,7 @@ public class AnalysisEnginePerformanceMe */ public AnalysisEnginePerformanceMetrics(String name, String uimaContextPath, long analysisTime, long numProcessed ) { this.name = name; -this.uimaContextPath = uimaContextPath; +this.uniqueName = uimaContextPath; this.analysisTime = analysisTime; this.numProcessed = numProcessed; } @@ -59,11 +59,11 @@ public class AnalysisEnginePerformanceMe * @return the unique name */ public String getUniqueName() { -if ( uimaContextPath != null && uimaContextPath.trim().length() > 0 && !uimaContextPath.trim().equals("Components")) { +if ( uniqueName != null && uniqueName.trim().length() > 0 && !uniqueName.trim().equals("Components")) { // if ( !uimaContextPath.endsWith(getName())) { // return uimaContextPath+"/"+getName(); // } - return uimaContextPath; + return uniqueName; } else { return getName(); }
svn commit: r1492421 - in /uima/site/trunk/uima-website: docs/eclipse-update-site.html xdocs/eclipse-update-site.xml
Author: schor Date: Wed Jun 12 20:53:33 2013 New Revision: 1492421 URL: http://svn.apache.org/r1492421 Log: [UIMA-2988] add doc for building composite update site Modified: uima/site/trunk/uima-website/docs/eclipse-update-site.html uima/site/trunk/uima-website/xdocs/eclipse-update-site.xml Modified: uima/site/trunk/uima-website/docs/eclipse-update-site.html URL: http://svn.apache.org/viewvc/uima/site/trunk/uima-website/docs/eclipse-update-site.html?rev=1492421&r1=1492420&r2=1492421&view=diff == --- uima/site/trunk/uima-website/docs/eclipse-update-site.html (original) +++ uima/site/trunk/uima-website/docs/eclipse-update-site.html Wed Jun 12 20:53:33 2013 @@ -484,9 +484,21 @@ releases will take up extra space in the If the update consists of just new versions of the the existing features and plugins, -it should not be necessary to update the POM for the update-site generation (other than +it may not be necessary to update the POM for the update-site generation (other than to insure its version information is what you want the feature/plugin versions to be). +Releasing a new Composite Update Site +Normally, the composite update site doesn't change. It changes when new sub-sites +are created, usually for new projects having Eclipse components. +To change the Composite site, update the POM to a new version number (it's numbered +like build artifacts, with a simple incrementing integer). Then update the buildCompositeRepository.xml +file at the top level to reflect the changes. +The build is done using the same techniques as the other update site: the dist .../release/... part is +copied to the .../dev/... and that's svn-checked-out. Then the build runs the special ant tasks to generate +the composite Jars from the buildCompositeRepository.xml. If you use the -Papache-release parameter on the mvn +command line, the build will generate the checksums and do the gpg signing of the artifacts. The results +are left in the tartet/eclipse-update-site for this project, ready to be svn-switched back to the dist .../release/... +point and the changes committed. Modified: uima/site/trunk/uima-website/xdocs/eclipse-update-site.xml URL: http://svn.apache.org/viewvc/uima/site/trunk/uima-website/xdocs/eclipse-update-site.xml?rev=1492421&r1=1492420&r2=1492421&view=diff == --- uima/site/trunk/uima-website/xdocs/eclipse-update-site.xml (original) +++ uima/site/trunk/uima-website/xdocs/eclipse-update-site.xml Wed Jun 12 20:53:33 2013 @@ -257,10 +257,23 @@ releases will take up extra space in the If the update consists of just new versions of the the existing features and plugins, -it should not be necessary to update the POM for the update-site generation (other than +it may not be necessary to update the POM for the update-site generation (other than to insure its version information is what you want the feature/plugin versions to be). +Releasing a new Composite Update Site +Normally, the composite update site doesn't change. It changes when new sub-sites +are created, usually for new projects having Eclipse components. +To change the Composite site, update the POM to a new version number (it's numbered +like build artifacts, with a simple incrementing integer). Then update the buildCompositeRepository.xml +file at the top level to reflect the changes. + +The build is done using the same techniques as the other update site: the dist .../release/... part is +copied to the .../dev/... and that's svn-checked-out. Then the build runs the special ant tasks to generate +the composite Jars from the buildCompositeRepository.xml. If you use the -Papache-release parameter on the mvn +command line, the build will generate the checksums and do the gpg signing of the artifacts. The results +are left in the tartet/eclipse-update-site for this project, ready to be svn-switched back to the dist .../release/... +point and the changes committed.
svn commit: r1492419 - /uima/build/trunk/uima-eclipse-composite-update-site/pom.xml
Author: schor Date: Wed Jun 12 20:51:19 2013 New Revision: 1492419 URL: http://svn.apache.org/r1492419 Log: [UIMA-2988] Modified: uima/build/trunk/uima-eclipse-composite-update-site/pom.xml Modified: uima/build/trunk/uima-eclipse-composite-update-site/pom.xml URL: http://svn.apache.org/viewvc/uima/build/trunk/uima-eclipse-composite-update-site/pom.xml?rev=1492419&r1=1492418&r2=1492419&view=diff == --- uima/build/trunk/uima-eclipse-composite-update-site/pom.xml (original) +++ uima/build/trunk/uima-eclipse-composite-update-site/pom.xml Wed Jun 12 20:51:19 2013 @@ -24,7 +24,7 @@ org.apache.uima parent-pom -4 +5-SNAPSHOT ../parent-pom @@ -52,11 +52,11 @@ uimaj ${project.artifactId} ${project.build.directory}/eclipse-update-site +https://dist.apache.org/ + + - - @@ -68,6 +68,8 @@ package + + @@ -83,12 +85,87 @@ +! + + + + + +copying svn dist release to dev for eclipse composite update site version ${project.version} + + + + + + + + + + + + + + + + + +checking out eclipse composite update site from dist ...dev... + + + + + + + + + + + - --> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
svn commit: r1492381 - in /uima/sandbox/uima-ducc/trunk/uima-ducc-duccdocs/src/site/tex/duccbook/part2: cli/ducc-services.tex ducc-api.tex job-logs.tex services.tex webserver/job-details.tex webserver
Author: challngr Date: Wed Jun 12 19:18:00 2013 New Revision: 1492381 URL: http://svn.apache.org/r1492381 Log: UIMA-2682 Duccbook updates. Modified: uima/sandbox/uima-ducc/trunk/uima-ducc-duccdocs/src/site/tex/duccbook/part2/cli/ducc-services.tex uima/sandbox/uima-ducc/trunk/uima-ducc-duccdocs/src/site/tex/duccbook/part2/ducc-api.tex uima/sandbox/uima-ducc/trunk/uima-ducc-duccdocs/src/site/tex/duccbook/part2/job-logs.tex uima/sandbox/uima-ducc/trunk/uima-ducc-duccdocs/src/site/tex/duccbook/part2/services.tex uima/sandbox/uima-ducc/trunk/uima-ducc-duccdocs/src/site/tex/duccbook/part2/webserver/job-details.tex uima/sandbox/uima-ducc/trunk/uima-ducc-duccdocs/src/site/tex/duccbook/part2/webserver/services.tex Modified: uima/sandbox/uima-ducc/trunk/uima-ducc-duccdocs/src/site/tex/duccbook/part2/cli/ducc-services.tex URL: http://svn.apache.org/viewvc/uima/sandbox/uima-ducc/trunk/uima-ducc-duccdocs/src/site/tex/duccbook/part2/cli/ducc-services.tex?rev=1492381&r1=1492380&r2=1492381&view=diff == --- uima/sandbox/uima-ducc/trunk/uima-ducc-duccdocs/src/site/tex/duccbook/part2/cli/ducc-services.tex (original) +++ uima/sandbox/uima-ducc/trunk/uima-ducc-duccdocs/src/site/tex/duccbook/part2/cli/ducc-services.tex Wed Jun 12 19:18:00 2013 @@ -66,7 +66,7 @@ Prints the usage text to the console. \end{description} -\subsection{ducc\_services $--$register Options} +\subsection{ducc\_services --register Options} \label{subsec:cli.ducc-services.register} The {\em register} function submits a service specification to DUCC. DUCC stores this information until it is {\em unregistered}. Once registered, a service may be @@ -89,7 +89,7 @@ \end{description} -\subsection{ducc\_services $--$start Options} +\subsection{ducc\_services --start Options} The start function instructs DUCC to allocate resources for a service and to start it in those resources. The service remains running until explicitly stopped. DUCC will attempt to keep the @@ -129,7 +129,7 @@ ducc_services --start UIMA-AS:Service23: \end{verbatim} \end{description} -\subsection{ducc\_services $--$stop Options} +\subsection{ducc\_services --stop Options} The stop function instructs DUCC to stop some number of service instances. If no specific number is specified, all instances are stopped. This is used only for registered services. Use \hyperref[sec:cli.service-cancel]{{\em ducc\_service\_cancel}} command to stop submitted services. @@ -170,7 +170,7 @@ ducc_services --stop UIMA-AS:Service23:t \end{description} -\subsection{ducc\_services $--$modify Options} +\subsection{ducc\_services --modify Options} The modify function dynamically updates some of the attributes of a registered service. \begin{description} @@ -217,7 +217,7 @@ ducc_services --stop UIMA-AS:Service23:t \end{verbatim} \end{description} -\subsection{ducc\_services $--$query Options} +\subsection{ducc\_services --query Options} The query function returns details about all known services of all types and classes, including the DUCC ids of the service instances (for submitted and registered services), the DUCC ids of the jobs using each service, and a summary of each service's queue and performance statistics, @@ -225,7 +225,7 @@ ducc_services --stop UIMA-AS:Service23:t All information returned by {\em ducc\_services $--$query} is also available via the \hyperref[ws:services-page]{Services Page} of the Web Server as well as the DUCC Service API (see -the \href{apidocs/index.html}{JavaDoc}). +the JavaDoc). \begin{description} \item[$--$query {[service-id or endpoint]}] This indicates that a service is to be stopped. The Modified: uima/sandbox/uima-ducc/trunk/uima-ducc-duccdocs/src/site/tex/duccbook/part2/ducc-api.tex URL: http://svn.apache.org/viewvc/uima/sandbox/uima-ducc/trunk/uima-ducc-duccdocs/src/site/tex/duccbook/part2/ducc-api.tex?rev=1492381&r1=1492380&r2=1492381&view=diff == --- uima/sandbox/uima-ducc/trunk/uima-ducc-duccdocs/src/site/tex/duccbook/part2/ducc-api.tex (original) +++ uima/sandbox/uima-ducc/trunk/uima-ducc-duccdocs/src/site/tex/duccbook/part2/ducc-api.tex Wed Jun 12 19:18:00 2013 @@ -1,8 +1,8 @@ \section{Overview Of The DUCC API} - The DUCC API provides a simple programatic interface to DUCC for submission and - cancelation of work. The DUCC CLI is implemented using the API and provides a - model for how to use the API. + The DUCC API provides a simple programmatic (Java) interface to DUCC for submission and + cancellation of work. (Note that the DUCC CLI is implemented using the API and provides a + model for how to use the API.
svn commit: r1492341 - /uima/build/trunk/uima-build-resources/pom.xml
Author: schor Date: Wed Jun 12 18:37:03 2013 New Revision: 1492341 URL: http://svn.apache.org/r1492341 Log: no Jira - cleanup POM: Now that this pom is inheriting from the uima-wide pom it doesn't need it's own plugin-management section for the maven-changes-plugin - that section was "duplicating" the one in the parent, and was also out of date. Removed it. Modified: uima/build/trunk/uima-build-resources/pom.xml Modified: uima/build/trunk/uima-build-resources/pom.xml URL: http://svn.apache.org/viewvc/uima/build/trunk/uima-build-resources/pom.xml?rev=1492341&r1=1492340&r2=1492341&view=diff == --- uima/build/trunk/uima-build-resources/pom.xml (original) +++ uima/build/trunk/uima-build-resources/pom.xml Wed Jun 12 18:37:03 2013 @@ -57,44 +57,6 @@ - - - - - - - - org.apache.maven.plugins - maven-changes-plugin - 2.3 - - - default-cli - jira-report - - generate-resources - -${jiraVersion} -Type,Key,Status,Summary -Fixed -Closed,Resolved -Type,Key,Status -${basedir}/issuesFixed/ -1000 - - - - - - - -
svn commit: r1492296 - in /uima/sandbox/uima-ducc/trunk/uima-ducc-duccdocs/src/site/tex/duccbook/part2/cli: ducc-process-cancel.tex ducc-services.tex ducc-unreserve.tex
Author: challngr Date: Wed Jun 12 17:21:24 2013 New Revision: 1492296 URL: http://svn.apache.org/r1492296 Log: UIMA-2682 Duccbook updates. Modified: uima/sandbox/uima-ducc/trunk/uima-ducc-duccdocs/src/site/tex/duccbook/part2/cli/ducc-process-cancel.tex uima/sandbox/uima-ducc/trunk/uima-ducc-duccdocs/src/site/tex/duccbook/part2/cli/ducc-services.tex uima/sandbox/uima-ducc/trunk/uima-ducc-duccdocs/src/site/tex/duccbook/part2/cli/ducc-unreserve.tex Modified: uima/sandbox/uima-ducc/trunk/uima-ducc-duccdocs/src/site/tex/duccbook/part2/cli/ducc-process-cancel.tex URL: http://svn.apache.org/viewvc/uima/sandbox/uima-ducc/trunk/uima-ducc-duccdocs/src/site/tex/duccbook/part2/cli/ducc-process-cancel.tex?rev=1492296&r1=1492295&r2=1492296&view=diff == --- uima/sandbox/uima-ducc/trunk/uima-ducc-duccdocs/src/site/tex/duccbook/part2/cli/ducc-process-cancel.tex (original) +++ uima/sandbox/uima-ducc/trunk/uima-ducc-duccdocs/src/site/tex/duccbook/part2/cli/ducc-process-cancel.tex Wed Jun 12 17:21:24 2013 @@ -28,7 +28,7 @@ Optional. This specifies the reason the process is canceled, for display in the web server. \item[$--$role\_administrator] The command is being issued in the role of a DUCC administrator. If the user is not also a registered administrator this flag is ignored. (This helps to - protect administrators from inadvertantly canceling work they do not own.) + protect administrators from inadvertently canceling work they do not own.) \end{description} \paragraph{Notes:} Modified: uima/sandbox/uima-ducc/trunk/uima-ducc-duccdocs/src/site/tex/duccbook/part2/cli/ducc-services.tex URL: http://svn.apache.org/viewvc/uima/sandbox/uima-ducc/trunk/uima-ducc-duccdocs/src/site/tex/duccbook/part2/cli/ducc-services.tex?rev=1492296&r1=1492295&r2=1492296&view=diff == --- uima/sandbox/uima-ducc/trunk/uima-ducc-duccdocs/src/site/tex/duccbook/part2/cli/ducc-services.tex (original) +++ uima/sandbox/uima-ducc/trunk/uima-ducc-duccdocs/src/site/tex/duccbook/part2/cli/ducc-services.tex Wed Jun 12 17:21:24 2013 @@ -29,17 +29,17 @@ unregistered DUCC optionally stops the service instance, if any, and discard the saved specification. -\item[Start] The start function instructs DUCC to alllocate resources for a service and to - start it in those resources. The service remains running until explictly stopped. DUCC +\item[Start] The start function instructs DUCC to allocate resources for a service and to + start it in those resources. The service remains running until explicitly stopped. DUCC will attempt to keep the service instances running if they should fail. The start function is also used to increase the number of running service instances if desired. \item[Stop] The stop function stops some or all service instances. \item[Query] The query function returns detailed information about all known services, both - registerd and otherwise. + registered and otherwise. -\item[Modify] The modify function allows some aspectes of a registered service to be updated +\item[Modify] The modify function allows some aspects of a registered service to be updated without reregistereing the service. It optionally alters the running service instances to conform with the updates. \end{description} @@ -76,7 +76,7 @@ \item[$--$register {[specification file] [options]}] The specification file is optional. If specified, it has the same contents as described for the \hyperref[sec:cli.service-submit]{{\em ducc\_service\_submit}} command. As with {\em ducc\_service\_submit}, any of the - keywords in the specification may be overriden on the command line. + keywords in the specification may be overridden on the command line. \item[$--$autostart {[true or false]}] This indicates whether to register the service as an autostarted service. If not specified, the default is {\em false}. @@ -91,8 +91,8 @@ \subsection{ducc\_services $--$start Options} -The start function instructs DUCC to alllocate resources for a service and to start it in those -resources. The service remains running until explictly stopped. DUCC will attempt to keep the +The start function instructs DUCC to allocate resources for a service and to start it in those +resources. The service remains running until explicitly stopped. DUCC will attempt to keep the service instances running if they should fail. The start fun
svn commit: r1492293 - in /uima/sandbox/uima-ducc/trunk/uima-ducc-duccdocs/src/site/tex/duccbook/part2/cli: ducc-monitor.tex ducc-perf-stats.tex ducc-services.tex ducc-unreserve.tex
Author: challngr Date: Wed Jun 12 17:16:43 2013 New Revision: 1492293 URL: http://svn.apache.org/r1492293 Log: UIMA-2682 Duccbook updates. Modified: uima/sandbox/uima-ducc/trunk/uima-ducc-duccdocs/src/site/tex/duccbook/part2/cli/ducc-monitor.tex uima/sandbox/uima-ducc/trunk/uima-ducc-duccdocs/src/site/tex/duccbook/part2/cli/ducc-perf-stats.tex uima/sandbox/uima-ducc/trunk/uima-ducc-duccdocs/src/site/tex/duccbook/part2/cli/ducc-services.tex uima/sandbox/uima-ducc/trunk/uima-ducc-duccdocs/src/site/tex/duccbook/part2/cli/ducc-unreserve.tex Modified: uima/sandbox/uima-ducc/trunk/uima-ducc-duccdocs/src/site/tex/duccbook/part2/cli/ducc-monitor.tex URL: http://svn.apache.org/viewvc/uima/sandbox/uima-ducc/trunk/uima-ducc-duccdocs/src/site/tex/duccbook/part2/cli/ducc-monitor.tex?rev=1492293&r1=1492292&r2=1492293&view=diff == --- uima/sandbox/uima-ducc/trunk/uima-ducc-duccdocs/src/site/tex/duccbook/part2/cli/ducc-monitor.tex (original) +++ uima/sandbox/uima-ducc/trunk/uima-ducc-duccdocs/src/site/tex/duccbook/part2/cli/ducc-monitor.tex Wed Jun 12 17:16:43 2013 @@ -1,3 +1,8 @@ +%% +%% ducc_monitor is currently unsupported. Perhaps it will come back after +%% release 1. So the doc skeleton is preserved. +%% + % Create well-known link to this spot for HTML version \ifpdf \else @@ -14,21 +19,21 @@ \paragraph{Usage:} \begin{description} \item[Executable Jar] java -jar \ducchome/lib/uima-ducc-monitor.jar {\em options} -\item[Script wrapper] java -jar \ducchome/bin/ducc-monitor {\em options} +\item[Script wrapper] \ducchome/bin/ducc-monitor {\em options} \item[Java Main] java -cp \ducchome/lib/uima-ducc-monitor.jar org.apache.uima.ducc.cli.DuccJobMonitor {\em options} \end{description} \paragraph{Options:} \begin{description} -\item[--debug ] +\item[$--$debug ] Prints internal debugging information, intended for DUCC developers or extended problem determination. -\item[--id {[jobid]}] +\item[$--$id {[jobid]}] The ID is the id of the job to monitor. -\item[--help] +\item[$--$help] Prints the usage text to the console. -\item[--quiet] +\item[$--$quiet] Disable CLI informational miessages; -\item[timestamp] +\item[--timestamp] Enables timestamps on the monitor messages. \end{description} Modified: uima/sandbox/uima-ducc/trunk/uima-ducc-duccdocs/src/site/tex/duccbook/part2/cli/ducc-perf-stats.tex URL: http://svn.apache.org/viewvc/uima/sandbox/uima-ducc/trunk/uima-ducc-duccdocs/src/site/tex/duccbook/part2/cli/ducc-perf-stats.tex?rev=1492293&r1=1492292&r2=1492293&view=diff == --- uima/sandbox/uima-ducc/trunk/uima-ducc-duccdocs/src/site/tex/duccbook/part2/cli/ducc-perf-stats.tex (original) +++ uima/sandbox/uima-ducc/trunk/uima-ducc-duccdocs/src/site/tex/duccbook/part2/cli/ducc-perf-stats.tex Wed Jun 12 17:16:43 2013 @@ -20,10 +20,10 @@ \paragraph{Options:} \begin{description} -\item[--job id] This specifies the job to report on. -\item[--directory dir] This specifies the job's log directory. (DUCC writes usage information into this - directory.) -\item[--report {[summary or workitems or processes]}] +\item[$--$job id] This specifies the job to report on. +\item[$--$directory dir] This specifies the job's log directory. (DUCC writes usage information into this + directory as the job is running.) +\item[$--$report {[summary or workitems or processes]}] This specifies the type of report: \begin{description} \item[summary] This produces a per-AE summary of the performance of that AE, including @@ -37,7 +37,7 @@ maximum memory usage, page faults, swap space in use, maximum swap used, \%CPU, garbage collection statistics, and work item statistics (processed, errors, retried, etc.). \end{description} -\item[--help] Prints the usage text to the console. +\item[$--$help] Prints the usage text to the console. \end{description} \paragraph{Notes:} Modified: uima/sandbox/uima-ducc/trunk/uima-ducc-duccdocs/src/site/tex/duccbook/part2/cli/ducc-services.tex URL: http://svn.apache.org/viewvc/uima/sandbox/uima-ducc/trunk/uima-ducc-duccdocs/src/site/tex/duccbook/part2/cli/ducc-services.tex?rev=1492293&r1=1492292&r2=1492293&view=diff == --- uima/sandbox/uima-ducc/trunk/uima-ducc-duccdocs/src/site/tex/duccbook/part2/cli/ducc-services.tex (original) +++ uima/sandbox/uima-ducc/trunk/uima-ducc-duccdocs/src/site/tex/duccbook/part2/cli/ducc-services.tex Wed Jun 12
svn commit: r1492287 - /uima/uimaj/trunk/jcasgen-maven-plugin/pom.xml
Author: schor Date: Wed Jun 12 17:05:36 2013 New Revision: 1492287 URL: http://svn.apache.org/r1492287 Log: [UIMA-2987] back out the changes done to get it to build on Jenkins - problem traced to needing to deploy more recent snapshot of uima-wide parent pom. Modified: uima/uimaj/trunk/jcasgen-maven-plugin/pom.xml Modified: uima/uimaj/trunk/jcasgen-maven-plugin/pom.xml URL: http://svn.apache.org/viewvc/uima/uimaj/trunk/jcasgen-maven-plugin/pom.xml?rev=1492287&r1=1492286&r2=1492287&view=diff == --- uima/uimaj/trunk/jcasgen-maven-plugin/pom.xml (original) +++ uima/uimaj/trunk/jcasgen-maven-plugin/pom.xml Wed Jun 12 17:05:36 2013 @@ -105,7 +105,6 @@ org.apache.maven.plugins maven-plugin-plugin - 3.2 true @@ -116,10 +115,6 @@ descriptor - - true - - @@ -127,9 +122,6 @@ helpmojo - - true -
svn commit: r1492270 - in /uima/sandbox/uima-ducc/trunk/uima-ducc-duccdocs/src/site/tex/duccbook/part2/cli: ducc-cancel.tex ducc-process-cancel.tex ducc-process-submit.tex ducc-reserve.tex ducc-servic
Author: challngr Date: Wed Jun 12 16:34:16 2013 New Revision: 1492270 URL: http://svn.apache.org/r1492270 Log: UIMA-2682 Duccbook updates. Modified: uima/sandbox/uima-ducc/trunk/uima-ducc-duccdocs/src/site/tex/duccbook/part2/cli/ducc-cancel.tex uima/sandbox/uima-ducc/trunk/uima-ducc-duccdocs/src/site/tex/duccbook/part2/cli/ducc-process-cancel.tex uima/sandbox/uima-ducc/trunk/uima-ducc-duccdocs/src/site/tex/duccbook/part2/cli/ducc-process-submit.tex uima/sandbox/uima-ducc/trunk/uima-ducc-duccdocs/src/site/tex/duccbook/part2/cli/ducc-reserve.tex uima/sandbox/uima-ducc/trunk/uima-ducc-duccdocs/src/site/tex/duccbook/part2/cli/ducc-service-cancel.tex uima/sandbox/uima-ducc/trunk/uima-ducc-duccdocs/src/site/tex/duccbook/part2/cli/ducc-service-submit.tex Modified: uima/sandbox/uima-ducc/trunk/uima-ducc-duccdocs/src/site/tex/duccbook/part2/cli/ducc-cancel.tex URL: http://svn.apache.org/viewvc/uima/sandbox/uima-ducc/trunk/uima-ducc-duccdocs/src/site/tex/duccbook/part2/cli/ducc-cancel.tex?rev=1492270&r1=1492269&r2=1492270&view=diff == --- uima/sandbox/uima-ducc/trunk/uima-ducc-duccdocs/src/site/tex/duccbook/part2/cli/ducc-cancel.tex (original) +++ uima/sandbox/uima-ducc/trunk/uima-ducc-duccdocs/src/site/tex/duccbook/part2/cli/ducc-cancel.tex Wed Jun 12 16:34:16 2013 @@ -19,24 +19,24 @@ \paragraph{Options:} \begin{description} -\item[--debug ] +\item[$--$debug ] Prints internal debugging information, intended for DUCC developers or extended problem determination. -\item[--id {[jobid]}] +\item[$--$id {[jobid]}] The ID is the id of the job to cancel. -\item[--reason {[quoted string]}] +\item[$--$reason {[quoted string]}] Optional. This specifies the reason the job is canceled for display in the web server. Note that the shell requires a quoted string. Example: \begin{verbatim} ducc_cancel --id 12 --reason "This is a pretty good reason." \end{verbatim} -\item[-dpid {[pid]}] +\item[$--$dpid {[pid]}] If specified only this DUCC process will be canceled. If not specified, then entire job will be canceled. The {\em pid} is the DUCC-assigned process ID of the process to cancel. This is the ID in the first column of the Web Server's job details page, under the column labeled ``Id''. -\item[--help] +\item[$--$help] Prints the usage text to the console. -\item[--role\_administrator] The command is being issued in the role of a DUCC administrator. +\item[$--$role\_administrator] The command is being issued in the role of a DUCC administrator. If the user is not also a registered administrator this flag is ignored. (This helps to protect administrators from accidentally canceling jobs they do not own.) \end{description} Modified: uima/sandbox/uima-ducc/trunk/uima-ducc-duccdocs/src/site/tex/duccbook/part2/cli/ducc-process-cancel.tex URL: http://svn.apache.org/viewvc/uima/sandbox/uima-ducc/trunk/uima-ducc-duccdocs/src/site/tex/duccbook/part2/cli/ducc-process-cancel.tex?rev=1492270&r1=1492269&r2=1492270&view=diff == --- uima/sandbox/uima-ducc/trunk/uima-ducc-duccdocs/src/site/tex/duccbook/part2/cli/ducc-process-cancel.tex (original) +++ uima/sandbox/uima-ducc/trunk/uima-ducc-duccdocs/src/site/tex/duccbook/part2/cli/ducc-process-cancel.tex Wed Jun 12 16:34:16 2013 @@ -6,6 +6,8 @@ \section{ducc\_process\_cancel} \paragraph{Description:} +The cancel CLI is used to cancel a process that has previously been submitted but which has not yet +completed. \paragraph{Usage:} \begin{description} @@ -16,15 +18,15 @@ \paragraph{Options:} \begin{description} -\item[--debug ] +\item[$--$debug ] Prints internal debugging information, intended for DUCC developers or extended problem determination. -\item[--id {[jobid]}] +\item[$--$id {[jobid]}] The DUCC ID is the id of the process to cancel. -\item[--help] +\item[$--$help] Prints the usage text to the console. -\item[--reason] +\item[$--$reason] Optional. This specifies the reason the process is canceled, for display in the web server. -\item[--role\_administrator] The command is being issued in the role of a DUCC administrator. +\item[$--$role\_administrator] The command is being issued in the role of a DUCC administrator. If the user is not also a registered administrator this flag is ignored. (This helps to protect administrators from inadvertantly canceling work they do not own.) \en
svn commit: r1492258 - /uima/uimaj/trunk/jcasgen-maven-plugin/pom.xml
Author: schor Date: Wed Jun 12 16:01:56 2013 New Revision: 1492258 URL: http://svn.apache.org/r1492258 Log: [UIMA-2987] trying some things to get it to build on Jenkins (builds locally) Modified: uima/uimaj/trunk/jcasgen-maven-plugin/pom.xml Modified: uima/uimaj/trunk/jcasgen-maven-plugin/pom.xml URL: http://svn.apache.org/viewvc/uima/uimaj/trunk/jcasgen-maven-plugin/pom.xml?rev=1492258&r1=1492257&r2=1492258&view=diff == --- uima/uimaj/trunk/jcasgen-maven-plugin/pom.xml (original) +++ uima/uimaj/trunk/jcasgen-maven-plugin/pom.xml Wed Jun 12 16:01:56 2013 @@ -105,6 +105,7 @@ org.apache.maven.plugins maven-plugin-plugin + 3.2 true @@ -115,6 +116,10 @@ descriptor + + true + + @@ -122,6 +127,9 @@ helpmojo + + true +
svn commit: r1492240 - in /uima/uimaj/trunk/jcasgen-maven-plugin: pom.xml src/it/m2e/pom.xml
Author: schor Date: Wed Jun 12 15:30:53 2013 New Revision: 1492240 URL: http://svn.apache.org/r1492240 Log: [UIMA-2987] disable m2e test in a manner where it's easy to re-enable Modified: uima/uimaj/trunk/jcasgen-maven-plugin/pom.xml uima/uimaj/trunk/jcasgen-maven-plugin/src/it/m2e/pom.xml Modified: uima/uimaj/trunk/jcasgen-maven-plugin/pom.xml URL: http://svn.apache.org/viewvc/uima/uimaj/trunk/jcasgen-maven-plugin/pom.xml?rev=1492240&r1=1492239&r2=1492240&view=diff == --- uima/uimaj/trunk/jcasgen-maven-plugin/pom.xml (original) +++ uima/uimaj/trunk/jcasgen-maven-plugin/pom.xml Wed Jun 12 15:30:53 2013 @@ -88,6 +88,9 @@ package integration-test + + classpath,multimodule,simple,!m2e Modified: uima/uimaj/trunk/jcasgen-maven-plugin/src/it/m2e/pom.xml URL: http://svn.apache.org/viewvc/uima/uimaj/trunk/jcasgen-maven-plugin/src/it/m2e/pom.xml?rev=1492240&r1=1492239&r2=1492240&view=diff == --- uima/uimaj/trunk/jcasgen-maven-plugin/src/it/m2e/pom.xml (original) +++ uima/uimaj/trunk/jcasgen-maven-plugin/src/it/m2e/pom.xml Wed Jun 12 15:30:53 2013 @@ -24,8 +24,7 @@ org.apache.uima org.apache.uima.tools.jcasgen.maven.tests.m2e 0.9.2-SNAPSHOT - - + eclipse-test-plugin JCasGen Maven plugin Eclipse tests The tests for the JCasGen Maven plugin when used in Eclipse @@ -47,54 +46,53 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + org.eclipse.tycho + tycho-maven-plugin + ${tycho-version} + true + + + org.eclipse.tycho + target-platform-configuration + ${tycho-version} + + p2 + true + + + + org.apache.maven.plugins + maven-antrun-plugin + 1.7 + + + copy-projects + generate-test-resources + + run + + false + + - - - - - - + + + + + + - - - - - - - - - - + + + + + + + + + +
svn commit: r1492229 - /uima/sandbox/ruta/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/testing/ui/handlers/RerunActionHandler.java
Author: pkluegl Date: Wed Jun 12 14:46:31 2013 New Revision: 1492229 URL: http://svn.apache.org/r1492229 Log: UIMA-2986 - remove only test annotations Modified: uima/sandbox/ruta/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/testing/ui/handlers/RerunActionHandler.java Modified: uima/sandbox/ruta/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/testing/ui/handlers/RerunActionHandler.java URL: http://svn.apache.org/viewvc/uima/sandbox/ruta/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/testing/ui/handlers/RerunActionHandler.java?rev=1492229&r1=1492228&r2=1492229&view=diff == --- uima/sandbox/ruta/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/testing/ui/handlers/RerunActionHandler.java (original) +++ uima/sandbox/ruta/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/testing/ui/handlers/RerunActionHandler.java Wed Jun 12 14:46:31 2013 @@ -185,15 +185,15 @@ public class RerunActionHandler implemen } } - if (excludedTypes != null && !excludedTypes.isEmpty()) { List toRemove = new LinkedList(); -for (String eachType : excludedTypes) { - Type type = runCas.getTypeSystem().getType(eachType); - if (type != null && runCas.getTypeSystem().subsumes(runCas.getAnnotationType(), type)) { -AnnotationIndex annotationIndex = runCas.getAnnotationIndex(type); -for (AnnotationFS annotationFS : annotationIndex) { - toRemove.add(annotationFS); +AnnotationIndex annotationIndex = runCas.getAnnotationIndex(); +for (AnnotationFS annotationFS : annotationIndex) { + Type type = annotationFS.getType(); + String typeName = type.getName(); + if(includedTypes.contains(typeName)|| !excludedTypes.contains(typeName)) { +if (type != null && runCas.getTypeSystem().subsumes(runCas.getAnnotationType(), type)) { +toRemove.add(annotationFS); } } }
svn commit: r1492227 - in /uima/uimaj/trunk/jcasgen-maven-plugin/src: it/m2e/pom.xml main/java/org/apache/uima/tools/jcasgen/maven/JCasGenMojo.java
Author: schor Date: Wed Jun 12 14:43:46 2013 New Revision: 1492227 URL: http://svn.apache.org/r1492227 Log: [UIMA-2983] make import setLocation argument be a proper form for a URL to an absolute file location. Also, disable m2e integration test. Modified: uima/uimaj/trunk/jcasgen-maven-plugin/src/it/m2e/pom.xml uima/uimaj/trunk/jcasgen-maven-plugin/src/main/java/org/apache/uima/tools/jcasgen/maven/JCasGenMojo.java Modified: uima/uimaj/trunk/jcasgen-maven-plugin/src/it/m2e/pom.xml URL: http://svn.apache.org/viewvc/uima/uimaj/trunk/jcasgen-maven-plugin/src/it/m2e/pom.xml?rev=1492227&r1=1492226&r2=1492227&view=diff == --- uima/uimaj/trunk/jcasgen-maven-plugin/src/it/m2e/pom.xml (original) +++ uima/uimaj/trunk/jcasgen-maven-plugin/src/it/m2e/pom.xml Wed Jun 12 14:43:46 2013 @@ -24,7 +24,8 @@ org.apache.uima org.apache.uima.tools.jcasgen.maven.tests.m2e 0.9.2-SNAPSHOT - eclipse-test-plugin + + JCasGen Maven plugin Eclipse tests The tests for the JCasGen Maven plugin when used in Eclipse @@ -46,53 +47,54 @@ - - org.eclipse.tycho - tycho-maven-plugin - ${tycho-version} - true - - - org.eclipse.tycho - target-platform-configuration - ${tycho-version} - - p2 - true - - - - org.apache.maven.plugins - maven-antrun-plugin - 1.7 - - - copy-projects - generate-test-resources - - run - - false - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - + + + + + + - - - - - - - - - - + + + + + + + + + + Modified: uima/uimaj/trunk/jcasgen-maven-plugin/src/main/java/org/apache/uima/tools/jcasgen/maven/JCasGenMojo.java URL: http://svn.apache.org/viewvc/uima/uimaj/trunk/jcasgen-maven-plugin/src/main/java/org/apache/uima/tools/jcasgen/maven/JCasGenMojo.java?rev=1492227&r1=1492226&r2=1492227&view=diff == --- uima/uimaj/trunk/jcasgen-maven-plugin/src/main/java/org/apache/uima/tools/jcasgen/maven/JCasGenMojo.java (original) +++ uima/uimaj/trunk/jcasgen-maven-plugin/src/main/java/org/apache/uima/tools/jcasgen/maven/JCasGenMojo.java Wed Jun 12 14:43:46 2013 @@ -134,7 +134,14 @@ public class JCasGenMojo boolean contextDelta = false; for (String descriptorLocation : ds.getIncludedFiles()) { Import imp = new Import_impl(); -imp.setLocation("file:///" + (new File(ds.getBasedir(), descriptorLocation)).getAbsolutePath()); +// setLocation takes a string which must be a URL https://issues.apache.org/jira/browse/UIMA-2983 +URL url; +try { + url = (new File(ds.getBasedir(), descriptorLocation)).toURI().toURL(); +
svn commit: r1492221 - in /uima/sandbox/ruta/trunk/ruta-ep-addons: ./ icons/ src/main/java/org/apache/uima/ruta/testing/ui/handlers/ src/main/java/org/apache/uima/ruta/testing/ui/views/
Author: pkluegl Date: Wed Jun 12 14:27:51 2013 New Revision: 1492221 URL: http://svn.apache.org/r1492221 Log: UIMA-2986 - added select included types - removed other buttons (not working or not used) Added: uima/sandbox/ruta/trunk/ruta-ep-addons/icons/thumb_down.png (with props) uima/sandbox/ruta/trunk/ruta-ep-addons/icons/thumb_up.png (with props) uima/sandbox/ruta/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/testing/ui/handlers/SelectedIncludedTypesHandler.java Modified: uima/sandbox/ruta/trunk/ruta-ep-addons/plugin.xml uima/sandbox/ruta/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/testing/ui/handlers/RerunActionHandler.java uima/sandbox/ruta/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/testing/ui/handlers/SelectTypesDialog.java uima/sandbox/ruta/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/testing/ui/handlers/SelectedExcludedTypesHandler.java uima/sandbox/ruta/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/testing/ui/views/TestViewPage.java Added: uima/sandbox/ruta/trunk/ruta-ep-addons/icons/thumb_down.png URL: http://svn.apache.org/viewvc/uima/sandbox/ruta/trunk/ruta-ep-addons/icons/thumb_down.png?rev=1492221&view=auto == Binary file - no diff available. Propchange: uima/sandbox/ruta/trunk/ruta-ep-addons/icons/thumb_down.png -- svn:mime-type = application/octet-stream Added: uima/sandbox/ruta/trunk/ruta-ep-addons/icons/thumb_up.png URL: http://svn.apache.org/viewvc/uima/sandbox/ruta/trunk/ruta-ep-addons/icons/thumb_up.png?rev=1492221&view=auto == Binary file - no diff available. Propchange: uima/sandbox/ruta/trunk/ruta-ep-addons/icons/thumb_up.png -- svn:mime-type = application/octet-stream Modified: uima/sandbox/ruta/trunk/ruta-ep-addons/plugin.xml URL: http://svn.apache.org/viewvc/uima/sandbox/ruta/trunk/ruta-ep-addons/plugin.xml?rev=1492221&r1=1492220&r2=1492221&view=diff == --- uima/sandbox/ruta/trunk/ruta-ep-addons/plugin.xml (original) +++ uima/sandbox/ruta/trunk/ruta-ep-addons/plugin.xml Wed Jun 12 14:27:51 2013 @@ -109,43 +109,28 @@ under the License. commandId="org.apache.uima.ruta.testing.rerun" icon="icons/13555.actionengine_play.gif" label="Rerun Tests" - style="push"> - - - - - - - - + style="push" + tooltip="Rerun Tests"> + commandId="org.apache.uima.ruta.testing.excludeTypes" + icon="icons/thumb_down.png" + label="Select excluded types" + style="push" + tooltip="Select excluded types"> + commandId="org.apache.uima.ruta.testing.includeTypes" + icon="icons/thumb_up.png" + label="Select included types" + style="push" + tooltip="Select included types"> @@ -154,7 +139,8 @@ under the License. commandId="org.apache.uima.ruta.testing.selectEvaluator" icon="icons/evaluator.gif" label="Select Evaluator" - style="push"> + style="push" + tooltip="Select evaluator"> @@ -162,6 +148,7 @@ under the License. @@ -207,6 +194,11 @@ under the License. name="Select excluded types"> + + Modified: uima/sandbox/ruta/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/testing/ui/handlers/RerunActionHandler.java URL: http://svn.apache.org/viewvc/uima/sandbox/ruta/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/testing/ui/handlers/RerunActionHandler.java?rev=1492221&r1=1492220&r2=1492221&view=diff == --- uima/sandbox/ruta/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/testing/ui/handlers/RerunActionHandler.java (original) +++ uima/sandbox/ruta/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/testing/ui/handlers/RerunActionHandler.java Wed Jun 12 14:27:51 2013 @@ -25,7 +25,6 @@ import java.io.FileOutputStream; import java.io.IOException; import java.util.ArrayList; import java.util.HashMap; -import java.util.Iterator; import java.util.LinkedList; import java.util.List; @@ -107,14 +106,17 @@ public class RerunActionHandler implemen private final String viewCasName; -private final List exclude
svn commit: r1492213 - /uima/site/trunk/uima-website/docs/board-reports/2013-06.txt
Author: schor Date: Wed Jun 12 14:05:52 2013 New Revision: 1492213 URL: http://svn.apache.org/r1492213 Log: no Jira - correct release number of Ruta release in board report from 2.0.2 -> 2.0.1 Modified: uima/site/trunk/uima-website/docs/board-reports/2013-06.txt Modified: uima/site/trunk/uima-website/docs/board-reports/2013-06.txt URL: http://svn.apache.org/viewvc/uima/site/trunk/uima-website/docs/board-reports/2013-06.txt?rev=1492213&r1=1492212&r2=1492213&view=diff == --- uima/site/trunk/uima-website/docs/board-reports/2013-06.txt (original) +++ uima/site/trunk/uima-website/docs/board-reports/2013-06.txt Wed Jun 12 14:05:52 2013 @@ -5,7 +5,7 @@ software related to the analysis of unst UIMA Oasis Standard. Releases: -We released a component, Apache UIMA Ruta r 2.0.2, on 29 May 2013 +We released a component, Apache UIMA Ruta r 2.0.1, on 29 May 2013 http://uima.apache.org/news.html#29 Other Activity:
svn commit: r1492212 - in /uima/sandbox/ruta/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/testing/ui/handlers: RerunActionHandler.java SelectTypesDialog.java
Author: pkluegl Date: Wed Jun 12 14:03:11 2013 New Revision: 1492212 URL: http://svn.apache.org/r1492212 Log: UIMA-2985 - fixed exclude types in testing view Modified: uima/sandbox/ruta/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/testing/ui/handlers/RerunActionHandler.java uima/sandbox/ruta/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/testing/ui/handlers/SelectTypesDialog.java Modified: uima/sandbox/ruta/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/testing/ui/handlers/RerunActionHandler.java URL: http://svn.apache.org/viewvc/uima/sandbox/ruta/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/testing/ui/handlers/RerunActionHandler.java?rev=1492212&r1=1492211&r2=1492212&view=diff == --- uima/sandbox/ruta/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/testing/ui/handlers/RerunActionHandler.java (original) +++ uima/sandbox/ruta/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/testing/ui/handlers/RerunActionHandler.java Wed Jun 12 14:03:11 2013 @@ -26,6 +26,8 @@ import java.io.IOException; import java.util.ArrayList; import java.util.HashMap; import java.util.Iterator; +import java.util.LinkedList; +import java.util.List; import org.apache.uima.UIMAFramework; import org.apache.uima.analysis_engine.AnalysisEngine; @@ -103,12 +105,16 @@ public class RerunActionHandler implemen private class RerunHandlerJob extends Job { ExecutionEvent event; -String viewCasName; +private final String viewCasName; -RerunHandlerJob(ExecutionEvent event, String scriptName, String viewCasName) { +private final List excludedTypes; + +RerunHandlerJob(ExecutionEvent event, String scriptName, String viewCasName, +List excludedTypes) { super("Testing " + scriptName + "..."); this.event = event; this.viewCasName = viewCasName; + this.excludedTypes = excludedTypes; setUser(true); } @@ -133,10 +139,12 @@ public class RerunActionHandler implemen desc = engineDescriptorPath.toPortableString(); XMLInputSource in2 = new XMLInputSource(desc); Object descriptor = UIMAFramework.getXMLParser().parse(in2); -CAS runCas = ae.newCAS(); +CAS runCas = getEmptyCas(descriptor); +CAS testCas = getEmptyCas(descriptor); for (TestCasData td : testCasData) { runCas.reset(); + testCas.reset(); String elementName = r.getLocation().lastSegment(); monitor.setTaskName("Evaluating " + td.getPath().lastSegment()); int lastIndexOf = elementName.lastIndexOf(RutaEngine.SCRIPT_FILE_EXTENSION); @@ -144,39 +152,50 @@ public class RerunActionHandler implemen elementName = elementName.substring(0, lastIndexOf); } - CAS testCas = getTestCas(descriptor); - FileInputStream inputStream = null; + FileInputStream inputStreamTest = null; try { -inputStream = new FileInputStream(new File(td.getPath().toPortableString())); -XmiCasDeserializer.deserialize(inputStream, testCas, true); +inputStreamTest = new FileInputStream(new File(td.getPath().toPortableString())); +XmiCasDeserializer.deserialize(inputStreamTest, testCas, true); } finally { -if (inputStream != null) { - inputStream.close(); +if (inputStreamTest != null) { + inputStreamTest.close(); } } - - for (Iterator iterator = testCas.getViewIterator(); iterator.hasNext();) { -CAS each = iterator.next(); -String viewName = each.getViewName(); -try { - CAS view = runCas.getView(viewName); - view.setDocumentText(each.getDocumentText()); - -} catch (Exception e) { - RutaAddonsPlugin.error(e); + FileInputStream inputStreamRun = null; + try { +inputStreamRun = new FileInputStream(new File(td.getPath().toPortableString())); +XmiCasDeserializer.deserialize(inputStreamRun, runCas, true); + } finally { +if (inputStreamRun != null) { + inputStreamRun.close(); } } - testCas = testCas.getView(viewCasName); runCas = runCas.getView(viewCasName); + if (excludedTypes != null && !excludedTypes.isEmpty()) { +List toRemove = new LinkedList(); +for (String eachType : excludedTypes) { + Type type = runCas.getTypeSystem().getType(eachType); + if (type != null && runCas.getTypeSystem().subsumes(runCas.getAnnotationType(), type)) { +AnnotationIndex annotationIndex = runCas.getAnnotationIndex(type); +for (AnnotationFS annotationFS : annotationIndex) { + toRemove.add(annotationFS); +
svn commit: r1492177 - in /uima/sandbox/ruta/trunk/ruta-docbook/src/docbook: images/tools/ruta/workbench/cde/ images/tools/ruta/workbench/cde/cde.png tools.ruta.workbench.cde.xml tools.ruta.workbench.
Author: pkluegl Date: Wed Jun 12 12:57:24 2013 New Revision: 1492177 URL: http://svn.apache.org/r1492177 Log: UIMA-2859 - added section about constraint driven evaluation Added: uima/sandbox/ruta/trunk/ruta-docbook/src/docbook/images/tools/ruta/workbench/cde/ uima/sandbox/ruta/trunk/ruta-docbook/src/docbook/images/tools/ruta/workbench/cde/cde.png (with props) uima/sandbox/ruta/trunk/ruta-docbook/src/docbook/tools.ruta.workbench.cde.xml Modified: uima/sandbox/ruta/trunk/ruta-docbook/src/docbook/tools.ruta.workbench.xml Added: uima/sandbox/ruta/trunk/ruta-docbook/src/docbook/images/tools/ruta/workbench/cde/cde.png URL: http://svn.apache.org/viewvc/uima/sandbox/ruta/trunk/ruta-docbook/src/docbook/images/tools/ruta/workbench/cde/cde.png?rev=1492177&view=auto == Binary file - no diff available. Propchange: uima/sandbox/ruta/trunk/ruta-docbook/src/docbook/images/tools/ruta/workbench/cde/cde.png -- svn:mime-type = application/octet-stream Added: uima/sandbox/ruta/trunk/ruta-docbook/src/docbook/tools.ruta.workbench.cde.xml URL: http://svn.apache.org/viewvc/uima/sandbox/ruta/trunk/ruta-docbook/src/docbook/tools.ruta.workbench.cde.xml?rev=1492177&view=auto == --- uima/sandbox/ruta/trunk/ruta-docbook/src/docbook/tools.ruta.workbench.cde.xml (added) +++ uima/sandbox/ruta/trunk/ruta-docbook/src/docbook/tools.ruta.workbench.cde.xml Wed Jun 12 12:57:24 2013 @@ -0,0 +1,90 @@ + +http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd";[ + + +%uimaents; +]> + + + + UIMA Ruta CDE perspective + +The UIMA Ruta CDE (Constraint-Driven Evaluation) provides some views and functionality to investigate and evaluate a set +of annotated documents using domain and background knowledge formalized as constraints and UIMA Ruta rules. + provides an overview of the perspective. Its views are described in the following. + + + The UIMA Ruta cde framework + + + + + + + + + + UIMA Ruta CDE perspective + + + + + CDE Documents view + + This view provides the general functionality to specify, which set of documents should be evaluated. The green start button in the toolbar + starts the evaluation process with the given configuration specified in the different views. + The text field Documents specifies the set of documents that have been annotated by an arbitrary model or set of rules. + These xmiCAS documents can contain additional annotations, which are used by the simple rule-based constraints. The text field Test Data + specifies an optional folder with gold standard documents. These documents can be applied for comparing the resulting CDE value to an F1 score. + The text field Type System refers to a type system descriptor, which defines all types that are needed for the evaluation. + Each text field is sensitive to drag and drop. The use can select a folder in the script explorer and drag and drop it on the text field. + Directly below the text fields, the values of different evaluation measures are given comparing the resulting CDE value to the F1 score. + These values are of course only available, if annotated gold standard data is specified in the text field Test Data. + + +The table at the bottom of the view contains all documents that are inspected. +The intervals specifying the color of the icon of each documents dependent of the CDE result can be set in the preference page. +If the evaluation has finished, then the CDE value is displayed and additionally the F1 score, if available. The table is sortable. +A double-click on a documents opens it in the CAS Editor. + + + + CDE Constraints view + This view specifies the currently applied constraints and their weights. This list is used to calculate the overall CDE value + of one document: the average of the weighted sum. The buttons in the toolbar of the view export and import the constraint using a simple xml format. + The buttons in the right part of the view can modify the list of the constraints. Currently, three types of constraints are supported: + Simple UIMA Ruta rules, a list of simple UIMA Ruta rules and word distribution constraints. All constraints return a value between 0 and 1. + The constraints based on UIMA Ruta rules return the ratio how often the rule was applied to how often the rules tried to apply. The rule + Author{STARTSWITH(Reference)};, for example, returns 1, if all author annotations start with a reference annotation. The word distribution + constraints refer to a txt file in which each line has the format "Proceedings":Booktitle 0.95, Journal 0.05 specifying + the distribution of the word proceedin
svn commit: r1492144 - /uima/sandbox/ruta/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/cde/ui/DocumentSelectComposite.java
Author: pkluegl Date: Wed Jun 12 11:14:35 2013 New Revision: 1492144 URL: http://svn.apache.org/r1492144 Log: UIMA-2859 - update documents on drop event Modified: uima/sandbox/ruta/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/cde/ui/DocumentSelectComposite.java Modified: uima/sandbox/ruta/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/cde/ui/DocumentSelectComposite.java URL: http://svn.apache.org/viewvc/uima/sandbox/ruta/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/cde/ui/DocumentSelectComposite.java?rev=1492144&r1=1492143&r2=1492144&view=diff == --- uima/sandbox/ruta/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/cde/ui/DocumentSelectComposite.java (original) +++ uima/sandbox/ruta/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/cde/ui/DocumentSelectComposite.java Wed Jun 12 11:14:35 2013 @@ -482,6 +482,7 @@ public class DocumentSelectComposite ext if (fileList.length == 1) { String string = fileList[0]; inputDirectoryText.setText(string); + setDocumentsByDir(); } } });
svn commit: r1492123 - in /uima/sandbox/ruta/trunk/ruta-docbook/src/docbook: tools.ruta.language.xml tools.ruta.overview.xml tools.ruta.workbench.install.xml
Author: pkluegl Date: Wed Jun 12 09:20:49 2013 New Revision: 1492123 URL: http://svn.apache.org/r1492123 Log: UIMA-2973 - svn -> source release for example projects Modified: uima/sandbox/ruta/trunk/ruta-docbook/src/docbook/tools.ruta.language.xml uima/sandbox/ruta/trunk/ruta-docbook/src/docbook/tools.ruta.overview.xml uima/sandbox/ruta/trunk/ruta-docbook/src/docbook/tools.ruta.workbench.install.xml Modified: uima/sandbox/ruta/trunk/ruta-docbook/src/docbook/tools.ruta.language.xml URL: http://svn.apache.org/viewvc/uima/sandbox/ruta/trunk/ruta-docbook/src/docbook/tools.ruta.language.xml?rev=1492123&r1=1492122&r2=1492123&view=diff == --- uima/sandbox/ruta/trunk/ruta-docbook/src/docbook/tools.ruta.language.xml (original) +++ uima/sandbox/ruta/trunk/ruta-docbook/src/docbook/tools.ruta.language.xml Wed Jun 12 09:20:49 2013 @@ -601,13 +601,8 @@ FeatureAssignment -> "(" StringExpressio The UIMA Ruta language can be extended with external actions, conditions, type functions, boolean functions, string functions and number functions. An exemplary implementation of each kind of extension can be found in the project - - https://svn.apache.org/repos/asf/uima/sandbox/ruta/trunk/example-projects/ruta-ep-example-extensions - - and a simple UIMA Ruta project, which uses these extensions, is located at - - https://svn.apache.org/repos/asf/uima/sandbox/ruta/trunk/example-projects/ExtensionsExample - + ruta-ep-example-extensions and a simple UIMA Ruta project, which uses these extensions, is located at + ExtensionsExample. Both projects are part of the source release of UIMA ruta and are located in the example-projects folder. \ No newline at end of file Modified: uima/sandbox/ruta/trunk/ruta-docbook/src/docbook/tools.ruta.overview.xml URL: http://svn.apache.org/viewvc/uima/sandbox/ruta/trunk/ruta-docbook/src/docbook/tools.ruta.overview.xml?rev=1492123&r1=1492122&r2=1492123&view=diff == --- uima/sandbox/ruta/trunk/ruta-docbook/src/docbook/tools.ruta.overview.xml (original) +++ uima/sandbox/ruta/trunk/ruta-docbook/src/docbook/tools.ruta.overview.xml Wed Jun 12 09:20:49 2013 @@ -69,8 +69,8 @@ under the License. UIMA Ruta rules can also be applied on CAS without using the UIMA Ruta Workbench. contains examples how to execute UIMA Ruta rules in plain java. A good way to get started with UIMA Ruta is to play around with an exemplary UIMA Ruta project, e.g., - https://svn.apache.org/repos/asf/uima/sandbox/ruta/trunk/example-projects/ExampleProject. This UIMA Ruta project - contains some simple rules for processing citation metadata. + ExampleProject in the example-projects of the UIMA Ruta source release. + This UIMA Ruta project contains some simple rules for processing citation metadata. and provide Modified: uima/sandbox/ruta/trunk/ruta-docbook/src/docbook/tools.ruta.workbench.install.xml URL: http://svn.apache.org/viewvc/uima/sandbox/ruta/trunk/ruta-docbook/src/docbook/tools.ruta.workbench.install.xml?rev=1492123&r1=1492122&r2=1492123&view=diff == --- uima/sandbox/ruta/trunk/ruta-docbook/src/docbook/tools.ruta.workbench.install.xml (original) +++ uima/sandbox/ruta/trunk/ruta-docbook/src/docbook/tools.ruta.workbench.install.xml Wed Jun 12 09:20:49 2013 @@ -120,14 +120,7 @@ under the License. Several times within this chapter we use a UIMA Ruta example project to illustrate the use of the UIMA Ruta Workbench. -The example project -can be downloaded per -svn -from -https://svn.apache.org/repos/asf/uima/sandbox/ruta/trunk/example-projects/ExampleProject";>https://svn.apache.org/repos/asf/uima/sandbox/ruta/trunk/example-projects/ExampleProject - -. +The ExampleProject project is part of the source release of UIMA Ruta (example-projects folder). To import this project into the workbench do
svn commit: r1492122 - /uima/sandbox/uima-ducc/trunk/uima-ducc-web/src/main/java/org/apache/uima/ducc/ws/server/DuccHandlerUserAuthentication.java
Author: degenaro Date: Wed Jun 12 09:20:13 2013 New Revision: 1492122 URL: http://svn.apache.org/r1492122 Log: UIMA-2984 DUCC webserver (WS) employs wrong class for Authentication Modified: uima/sandbox/uima-ducc/trunk/uima-ducc-web/src/main/java/org/apache/uima/ducc/ws/server/DuccHandlerUserAuthentication.java Modified: uima/sandbox/uima-ducc/trunk/uima-ducc-web/src/main/java/org/apache/uima/ducc/ws/server/DuccHandlerUserAuthentication.java URL: http://svn.apache.org/viewvc/uima/sandbox/uima-ducc/trunk/uima-ducc-web/src/main/java/org/apache/uima/ducc/ws/server/DuccHandlerUserAuthentication.java?rev=1492122&r1=1492121&r2=1492122&view=diff == --- uima/sandbox/uima-ducc/trunk/uima-ducc-web/src/main/java/org/apache/uima/ducc/ws/server/DuccHandlerUserAuthentication.java (original) +++ uima/sandbox/uima-ducc/trunk/uima-ducc-web/src/main/java/org/apache/uima/ducc/ws/server/DuccHandlerUserAuthentication.java Wed Jun 12 09:20:13 2013 @@ -19,6 +19,7 @@ package org.apache.uima.ducc.ws.server; import java.io.IOException; +import java.util.Properties; import javax.servlet.ServletException; import javax.servlet.http.HttpServletRequest; @@ -48,6 +49,26 @@ public class DuccHandlerUserAuthenticati private static DuccWebSessionManager duccWebSessionManager = DuccWebSessionManager.getInstance(); + public DuccHandlerUserAuthentication() { + initializeAuthenticator(); + } + + private void initializeAuthenticator() { + String methodName = "initializeAuthenticator"; + try { + Properties properties = DuccWebProperties.get(); + String key = "ducc.authentication.implementer"; + if(properties.containsKey(key)) { + String value = properties.getProperty(key); + Class authenticationImplementer = Class.forName(value); + iAuthenticationManager = (IAuthenticationManager)authenticationImplementer.newInstance(); + } + } + catch(Exception e) { + duccLogger.error(methodName, jobid, e); + } + } + protected boolean isAuthenticated(HttpServletRequest request,HttpServletResponse response) { String methodName = "isAuthenticated"; boolean retVal = false;
svn commit: r1492121 - /uima/sandbox/ruta/trunk/ruta-docbook/src/docbook/tools.ruta.workbench.textruler.xml
Author: pkluegl Date: Wed Jun 12 09:14:01 2013 New Revision: 1492121 URL: http://svn.apache.org/r1492121 Log: UIMA-2704 - added section about textruler usage Modified: uima/sandbox/ruta/trunk/ruta-docbook/src/docbook/tools.ruta.workbench.textruler.xml Modified: uima/sandbox/ruta/trunk/ruta-docbook/src/docbook/tools.ruta.workbench.textruler.xml URL: http://svn.apache.org/viewvc/uima/sandbox/ruta/trunk/ruta-docbook/src/docbook/tools.ruta.workbench.textruler.xml?rev=1492121&r1=1492120&r2=1492121&view=diff == --- uima/sandbox/ruta/trunk/ruta-docbook/src/docbook/tools.ruta.workbench.textruler.xml (original) +++ uima/sandbox/ruta/trunk/ruta-docbook/src/docbook/tools.ruta.workbench.textruler.xml Wed Jun 12 09:14:01 2013 @@ -38,7 +38,8 @@ under the License. This section gives a short introduction about the included features and learners, and how to use the framework to learn UIMA Ruta rules. First, the available rule learning algorithms are introduced in . Then, -the user interface and the usage is explained in using an exemplary UIMA Ruat project. +the user interface and the usage is explained in and + illustrates the usage with an exemplary UIMA Ruta project. Included rule learning algorithms @@ -176,10 +177,10 @@ under the License. The name of the rule learner KEP (knowledge engineering patterns) is derived from the idea that humans use different engineering patterns to write annotation rules. This algorithms implements simple rule induction methods for some patterns, such as boundary detection -or annotation-based restriction of the window. The results are then combined in order to take adavantage of the combination of +or annotation-based restriction of the window. The results are then combined in order to take advantage of the combination of the different kinds of induced rules. Since the single rules are constructed according to how humans engineer the annotations rules, the resulting rule set should resemble more a handcrafted rule set. Furthermore, by exploiting the synergy of the patterns, solutions for -some annotation are much simplier. The following parameters are available. For a more detailed description of the parameters, +some annotation are much simpler. The following parameters are available. For a more detailed description of the parameters, please refer to the implementation. @@ -197,6 +198,23 @@ under the License. The TextRuler view +The TextRuler view is normally located in the lower center of the UIMA Ruta perspective and is the main +user interface to configure and start the rule learning algorithms. The view consists of four parts (cf. ): +The toolbar contains buttons for starting (green button) and stopping (red button) the learning process, +and one button that opening the preference page (blue gears) for configuring the rule induction algorithms cf. . +The upper part of the view contains text fields for defining the set of utilized documents. Training Data +points to the absolute location of the folder containing the gold standard documents. Additional Data points +to the absolute location of documents that can be additionally used by the algorithms. These documents are currently only needed +by the TraBal algorithm, which tries to learn correction rules for the error in those documents. Test Data is not yet available. +Finally, Preprocess Script points to the absolute location of a UIMA Ruta script, which contains all necessary types and can be applied +on the documents before the algorithms start in order to add additional annotations as learning features. The preprocessing can be skipped. +All text fields support drag and drop: the user can drag a file in the script explorer and drop it in the respective text field. +In the center of the view, the target types, for which rule should be induced, can be specified in the Information Types list. +The list Featured Feature Types specify the filtering settings, but it is discourage to change these settings. The user is able to drop +a simple text file, which contains a type with complete namespace in each line, to the Information Types list in order to add all those types. +The lower part of the view contains the list of available algorithms. All checked algorithms will be started, if the start button in the toolbar of the view is pressed. +When the algorithms are started, they display their current action after their name, and a result view with the currently induced rules is displayed +in the right part of the perspective. The UIMA Ruta TextRuler framework @@ -232,6 +250,40 @@ under the Li
svn commit: r1492115 - /uima/sandbox/ruta/trunk/ruta-ep-textruler/src/main/java/org/apache/uima/ruta/textruler/ui/TextRulerViewComposite.java
Author: pkluegl Date: Wed Jun 12 08:36:11 2013 New Revision: 1492115 URL: http://svn.apache.org/r1492115 Log: UIMA-2777 - do not activate test folder Modified: uima/sandbox/ruta/trunk/ruta-ep-textruler/src/main/java/org/apache/uima/ruta/textruler/ui/TextRulerViewComposite.java Modified: uima/sandbox/ruta/trunk/ruta-ep-textruler/src/main/java/org/apache/uima/ruta/textruler/ui/TextRulerViewComposite.java URL: http://svn.apache.org/viewvc/uima/sandbox/ruta/trunk/ruta-ep-textruler/src/main/java/org/apache/uima/ruta/textruler/ui/TextRulerViewComposite.java?rev=1492115&r1=1492114&r2=1492115&view=diff == --- uima/sandbox/ruta/trunk/ruta-ep-textruler/src/main/java/org/apache/uima/ruta/textruler/ui/TextRulerViewComposite.java (original) +++ uima/sandbox/ruta/trunk/ruta-ep-textruler/src/main/java/org/apache/uima/ruta/textruler/ui/TextRulerViewComposite.java Wed Jun 12 08:36:11 2013 @@ -867,8 +867,8 @@ public class TextRulerViewComposite exte inputDirectoryText.setEnabled(flag); additionalDirectoryText.setEnabled(flag); additionalButton.setEnabled(flag); -testDirectoryText.setEnabled(flag); -testButton.setEnabled(flag); +//testDirectoryText.setEnabled(flag); +//testButton.setEnabled(flag); } public static String getScriptPath() {
svn commit: r1492107 - in /uima/sandbox/ruta/trunk/ruta-docbook/src/docbook/images/tools/ruta/workbench/textruler: textruler.png textruler_pref.png
Author: pkluegl Date: Wed Jun 12 08:12:31 2013 New Revision: 1492107 URL: http://svn.apache.org/r1492107 Log: UIMA-2777 - replaced screenshot Modified: uima/sandbox/ruta/trunk/ruta-docbook/src/docbook/images/tools/ruta/workbench/textruler/textruler.png uima/sandbox/ruta/trunk/ruta-docbook/src/docbook/images/tools/ruta/workbench/textruler/textruler_pref.png Modified: uima/sandbox/ruta/trunk/ruta-docbook/src/docbook/images/tools/ruta/workbench/textruler/textruler.png URL: http://svn.apache.org/viewvc/uima/sandbox/ruta/trunk/ruta-docbook/src/docbook/images/tools/ruta/workbench/textruler/textruler.png?rev=1492107&r1=1492106&r2=1492107&view=diff == Binary files - no diff available. Modified: uima/sandbox/ruta/trunk/ruta-docbook/src/docbook/images/tools/ruta/workbench/textruler/textruler_pref.png URL: http://svn.apache.org/viewvc/uima/sandbox/ruta/trunk/ruta-docbook/src/docbook/images/tools/ruta/workbench/textruler/textruler_pref.png?rev=1492107&r1=1492106&r2=1492107&view=diff == Binary files - no diff available.
svn commit: r1492106 - in /uima/sandbox/ruta/trunk/ruta-ep-textruler/src/main/java/org/apache/uima/ruta/textruler: learner/trabal/TrabalLearner.java ui/TextRulerViewComposite.java
Author: pkluegl Date: Wed Jun 12 08:11:50 2013 New Revision: 1492106 URL: http://svn.apache.org/r1492106 Log: UIMA-2777 - deactivated testing documents since testing in textruler isn't implemented yet - trabal: todo comment added commented method removed Modified: uima/sandbox/ruta/trunk/ruta-ep-textruler/src/main/java/org/apache/uima/ruta/textruler/learner/trabal/TrabalLearner.java uima/sandbox/ruta/trunk/ruta-ep-textruler/src/main/java/org/apache/uima/ruta/textruler/ui/TextRulerViewComposite.java Modified: uima/sandbox/ruta/trunk/ruta-ep-textruler/src/main/java/org/apache/uima/ruta/textruler/learner/trabal/TrabalLearner.java URL: http://svn.apache.org/viewvc/uima/sandbox/ruta/trunk/ruta-ep-textruler/src/main/java/org/apache/uima/ruta/textruler/learner/trabal/TrabalLearner.java?rev=1492106&r1=1492105&r2=1492106&view=diff == --- uima/sandbox/ruta/trunk/ruta-ep-textruler/src/main/java/org/apache/uima/ruta/textruler/learner/trabal/TrabalLearner.java (original) +++ uima/sandbox/ruta/trunk/ruta-ep-textruler/src/main/java/org/apache/uima/ruta/textruler/learner/trabal/TrabalLearner.java Wed Jun 12 08:11:50 2013 @@ -618,6 +618,7 @@ public class TrabalLearner extends TextR conditions = createConditions(learntRules); for (int i = 0; i < learntRules.size(); i++) { rules.add(learntRules.get(i)); +//TODO amount of conditions? parameter for 50! for (int j = 0; j < conditions.size() && j < 50; j++) { TrabalRule newRule = learntRules.get(i).copy(); if (!newRule.getConditions().contains(conditions.get(j))) { @@ -632,114 +633,12 @@ public class TrabalLearner extends TextR return learntRules; } - // private List getBestConditions(List negExampleConditions, - // List posExampleConditions) { - // List result = new ArrayList(); - // RankedList negExampleCounter = new RankedList(); - // RankedList posExampleCounter = new RankedList(); - // Map conditionValues = new HashMap(); - // negExampleCounter.addAll(negExampleConditions); - // posExampleCounter.addAll(posExampleConditions); - // for (Condition c : negExampleConditions) { - // int p = 1; - // if (posExampleCounter.containsKey(c)) { - // p += posExampleCounter.get(c).intValue(); - // } - // conditionValues.put(c, new Double(negExampleCounter.get(c).doubleValue() / p)); - // } - // while (conditionValues.size() > 0) { - // Double max = 0.0; - // Condition c = null; - // for (int i = 0; i < conditionValues.size(); i++) { - // if (conditionValues.get(i) > max) { - // max = conditionValues.get(i); - // c = (Condition) conditionValues.keySet().toArray()[i]; - // } - // } - // if (max < 1 || c == null) - // break; - // result.add(c); - // conditionValues.remove(c); - // } - // return result; - // } - - // /** - // * Takes a list of rules with conditions and chooses those, which are expected to create the - // best - // * results. - // * - // * @param rules - // * @return - // */ - // private List getBestConditions(List rules) { - // sendStatusUpdateToDelegate("Choosing conditions... ", TextRulerLearnerState.ML_RUNNING, false); - // if (rules.size() < maxNumberOfRules) - // return rules; - // List result = new ArrayList(); - // Map distribution = new HashMap(); - // for (TrabalRule rule : rules) { - // String key = ""; - // List conditions = rule.getConditions(); - // Collections.sort(conditions); - // for (Condition c : conditions) { - // key += c; - // } - // if (distribution.containsKey(key)) { - // distribution.put(key, new Integer(distribution.get(key).intValue() + 1)); - // } else { - // distribution.put(key, new Integer(1)); - // } - // } - // List newRules; - // while (result.size() < maxNumberOfRules && distribution.size() > 0) { - // if (shouldAbort()) - // break; - // int max = 0; - // String maxKey = ""; - // for (String key : distribution.keySet()) { - // if (distribution.get(key).intValue() > max) { - // max = distribution.get(key).intValue(); - // maxKey = key; - // } - // } - // distribution.remove(maxKey); - // newRules = new ArrayList(); - // TrabalRule example = null; - // for (TrabalRule rule : rules) { - // String key = ""; - // List conditions = rule.getConditions(); - // Collections.sort(conditions); - // for (Condition c : conditions) { - // key += c; - // } - // if (distribution.containsKey(key)) { - // if (distribution.get(key).intValue() == max) { - // result.add(rule); - // if (example == null) - // example = rule; - // } - // } - // } - // if (example != null) { - // for (TrabalRule rule : rules) { - // if (!rule.hasSameBasicRule(example)) { - // newRules.add(rule); - // } - // } - // } - // rules = newRules; - // } - // if (result.size() > maxNumberOfRules) - // return result.subList(0, maxNumberOfRules); - // return result; - // } + /** * Chooses the best final rules from