You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ctakes.apache.org by ja...@apache.org on 2017/03/14 17:13:22 UTC

svn commit: r1786932 - /ctakes/trunk/ctakes-dependency-parser/src/main/java/org/apache/ctakes/dependency/parser/ae/ClearNLPSemanticRoleLabelerAE.java

Author: james-masanz
Date: Tue Mar 14 17:13:22 2017
New Revision: 1786932

URL: http://svn.apache.org/viewvc?rev=1786932&view=rev
Log:
CTAKES-299 - ClearNLPSemanticRoleLabelerAE was not using the configuration parameters for the model files

Modified:
    ctakes/trunk/ctakes-dependency-parser/src/main/java/org/apache/ctakes/dependency/parser/ae/ClearNLPSemanticRoleLabelerAE.java

Modified: ctakes/trunk/ctakes-dependency-parser/src/main/java/org/apache/ctakes/dependency/parser/ae/ClearNLPSemanticRoleLabelerAE.java
URL: http://svn.apache.org/viewvc/ctakes/trunk/ctakes-dependency-parser/src/main/java/org/apache/ctakes/dependency/parser/ae/ClearNLPSemanticRoleLabelerAE.java?rev=1786932&r1=1786931&r2=1786932&view=diff
==============================================================================
--- ctakes/trunk/ctakes-dependency-parser/src/main/java/org/apache/ctakes/dependency/parser/ae/ClearNLPSemanticRoleLabelerAE.java (original)
+++ ctakes/trunk/ctakes-dependency-parser/src/main/java/org/apache/ctakes/dependency/parser/ae/ClearNLPSemanticRoleLabelerAE.java Tue Mar 14 17:13:22 2017
@@ -104,13 +104,13 @@ public class ClearNLPSemanticRoleLabeler
 
    @ConfigurationParameter(
          name = PARAM_PRED_MODEL_FILE_NAME,
-         description = "This parameter provides the file name of the semantic role labeler model required by the factory method provided by ClearNLPUtil.",
+         description = "This parameter provides the file name of the pred model required by the factory method provided by ClearNLPUtil.",
          defaultValue = DEFAULT_PRED_MODEL_FILE_NAME )
    private String parserPredFileName;
 
    @ConfigurationParameter(
          name = PARAM_ROLE_MODEL_FILE_NAME,
-         description = "This parameter provides the file name of the semantic role labeler model required by the factory method provided by ClearNLPUtil.",
+         description = "This parameter provides the file name of the role model required by the factory method provided by ClearNLPUtil.",
          defaultValue = DEFAULT_ROLE_MODEL_FILE_NAME )
    private String parserRoleFileName;
 
@@ -128,17 +128,17 @@ public class ClearNLPSemanticRoleLabeler
 
          InputStream srlPred = (this.srlPredUri == null)
                                ? FileLocator.getAsStream( DEFAULT_PRED_MODEL_FILE_NAME )
-                               : FileLocator.getAsStream( this.srlPredUri.getPath() );
+                               : FileLocator.getAsStream( parserPredFileName );
          this.identifier = EngineGetter.getComponent( srlPred, this.language, NLPLib.MODE_PRED );
 
          InputStream srlRole = (this.srlRoleUri == null)
                                ? FileLocator.getAsStream( DEFAULT_ROLE_MODEL_FILE_NAME )
-                               : FileLocator.getAsStream( this.srlRoleUri.getPath() );
+                               : FileLocator.getAsStream( parserRoleFileName );
          this.classifier = EngineGetter.getComponent( srlRole, this.language, NLPLib.MODE_ROLE );
 
          InputStream srlModel = (this.srlModelUri == null)
                                 ? FileLocator.getAsStream( DEFAULT_SRL_MODEL_FILE_NAME )
-                                : FileLocator.getAsStream( this.srlModelUri.getPath() );
+                                : FileLocator.getAsStream( parserModelFileName );
          this.srlabeler = EngineGetter.getComponent( srlModel, this.language, NLPLib.MODE_SRL );
 
       } catch ( Exception e ) {