ctakes-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tm...@apache.org
Subject svn commit: r1590295 - /ctakes/trunk/ctakes-lvg/src/main/java/org/apache/ctakes/lvg/ae/LvgAnnotator.java
Date Sat, 26 Apr 2014 20:44:10 GMT
Author: tmill
Date: Sat Apr 26 20:44:10 2014
New Revision: 1590295

URL: http://svn.apache.org/r1590295
Log:
CTAKES-297: Standardized Lvg static factory method by catching URI exception.

Modified:
    ctakes/trunk/ctakes-lvg/src/main/java/org/apache/ctakes/lvg/ae/LvgAnnotator.java

Modified: ctakes/trunk/ctakes-lvg/src/main/java/org/apache/ctakes/lvg/ae/LvgAnnotator.java
URL: http://svn.apache.org/viewvc/ctakes/trunk/ctakes-lvg/src/main/java/org/apache/ctakes/lvg/ae/LvgAnnotator.java?rev=1590295&r1=1590294&r2=1590295&view=diff
==============================================================================
--- ctakes/trunk/ctakes-lvg/src/main/java/org/apache/ctakes/lvg/ae/LvgAnnotator.java (original)
+++ ctakes/trunk/ctakes-lvg/src/main/java/org/apache/ctakes/lvg/ae/LvgAnnotator.java Sat Apr
26 20:44:10 2014
@@ -560,26 +560,30 @@ public class LvgAnnotator extends JCasAn
 		}
 	}
 
-	public static AnalysisEngineDescription createAnnotatorDescription() throws ResourceInitializationException,
URISyntaxException{
-	  return AnalysisEngineFactory.createPrimitiveDescription(LvgAnnotator.class,
-        LvgAnnotator.PARAM_USE_CMD_CACHE,
-        false,
-        LvgAnnotator.PARAM_USE_LEMMA_CACHE,
-        false,
-        LvgAnnotator.PARAM_USE_SEGMENTS,
-        false,
-	      LvgAnnotator.PARAM_LEMMA_CACHE_FREQUENCY_CUTOFF,
-	      20,
-	      LvgAnnotator.PARAM_LEMMA_FREQ_CUTOFF,
-	      20,
-	      LvgAnnotator.PARAM_POST_LEMMAS,
-	      false,
-	      LvgAnnotator.PARAM_LVGCMDAPI_RESRC_KEY,
-	      ExternalResourceFactory.createExternalResourceDescription(
-            LvgCmdApiResourceImpl.class,
-            new File(LvgCmdApiResourceImpl.class.getResource(
-                "/org/apache/ctakes/lvg/data/config/lvg.properties").toURI()))
-	      );
+	public static AnalysisEngineDescription createAnnotatorDescription() throws ResourceInitializationException
{
+	  try {
+      return AnalysisEngineFactory.createPrimitiveDescription(LvgAnnotator.class,
+          LvgAnnotator.PARAM_USE_CMD_CACHE,
+          false,
+          LvgAnnotator.PARAM_USE_LEMMA_CACHE,
+          false,
+          LvgAnnotator.PARAM_USE_SEGMENTS,
+          false,
+          LvgAnnotator.PARAM_LEMMA_CACHE_FREQUENCY_CUTOFF,
+          20,
+          LvgAnnotator.PARAM_LEMMA_FREQ_CUTOFF,
+          20,
+          LvgAnnotator.PARAM_POST_LEMMAS,
+          false,
+          LvgAnnotator.PARAM_LVGCMDAPI_RESRC_KEY,
+          ExternalResourceFactory.createExternalResourceDescription(
+              LvgCmdApiResourceImpl.class,
+              new File(LvgCmdApiResourceImpl.class.getResource(
+                  "/org/apache/ctakes/lvg/data/config/lvg.properties").toURI()))
+          );
+    } catch (URISyntaxException e) {
+      throw new ResourceInitializationException(e);
+    }
 	}
 	
 	/**



Mime
View raw message