manifoldcf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kwri...@apache.org
Subject svn commit: r1727211 - /manifoldcf/branches/CONNECTORS-1270/connectors/opennlp/connector/src/main/java/org/apache/manifoldcf/agents/transformation/opennlp/OpenNlpExtractorConfig.java
Date Wed, 27 Jan 2016 22:40:44 GMT
Author: kwright
Date: Wed Jan 27 22:40:44 2016
New Revision: 1727211

URL: http://svn.apache.org/viewvc?rev=1727211&view=rev
Log:
Fix build error

Modified:
    manifoldcf/branches/CONNECTORS-1270/connectors/opennlp/connector/src/main/java/org/apache/manifoldcf/agents/transformation/opennlp/OpenNlpExtractorConfig.java

Modified: manifoldcf/branches/CONNECTORS-1270/connectors/opennlp/connector/src/main/java/org/apache/manifoldcf/agents/transformation/opennlp/OpenNlpExtractorConfig.java
URL: http://svn.apache.org/viewvc/manifoldcf/branches/CONNECTORS-1270/connectors/opennlp/connector/src/main/java/org/apache/manifoldcf/agents/transformation/opennlp/OpenNlpExtractorConfig.java?rev=1727211&r1=1727210&r2=1727211&view=diff
==============================================================================
--- manifoldcf/branches/CONNECTORS-1270/connectors/opennlp/connector/src/main/java/org/apache/manifoldcf/agents/transformation/opennlp/OpenNlpExtractorConfig.java
(original)
+++ manifoldcf/branches/CONNECTORS-1270/connectors/opennlp/connector/src/main/java/org/apache/manifoldcf/agents/transformation/opennlp/OpenNlpExtractorConfig.java
Wed Jan 27 22:40:44 2016
@@ -19,6 +19,7 @@ package org.apache.manifoldcf.agents.tra
 import java.io.FileInputStream;
 import java.io.FileNotFoundException;
 import java.io.IOException;
+import java.io.File;
 
 import opennlp.tools.namefind.NameFinderME;
 import opennlp.tools.namefind.TokenNameFinderModel;
@@ -51,7 +52,7 @@ public class OpenNlpExtractorConfig
   private static TokenNameFinderModel lModel = null;
   private static TokenNameFinderModel oModel = null;
     
-  private static synchronized void initializeModel(MODEL m, String path) throws InvalidFormatException,
FileNotFoundException, IOException{
+  private static synchronized void initializeModel(MODEL m, File path) throws InvalidFormatException,
FileNotFoundException, IOException{
     if(sModel == null && m == MODEL.SENTENCE)
       sModel = new SentenceModel(new FileInputStream(path));
     if(tModel == null && m == MODEL.TOKENIZER)
@@ -64,31 +65,31 @@ public class OpenNlpExtractorConfig
       oModel = new TokenNameFinderModel(new FileInputStream(path));
   }
     
-  public static final SentenceDetector sentenceDetector(String path) throws InvalidFormatException,
FileNotFoundException, IOException{
+  public static final SentenceDetector sentenceDetector(File path) throws InvalidFormatException,
FileNotFoundException, IOException{
     if(sModel == null)
       initializeModel(MODEL.SENTENCE, path);
     return new SentenceDetectorME(sModel);
   }
     
-  public static final Tokenizer tokenizer(String path) throws InvalidFormatException, FileNotFoundException,
IOException{
+  public static final Tokenizer tokenizer(File path) throws InvalidFormatException, FileNotFoundException,
IOException{
     if(tModel == null)
       initializeModel(MODEL.TOKENIZER, path);
     return new TokenizerME(tModel);
   }
     
-  public static final NameFinderME peopleFinder(String path) throws InvalidFormatException,
FileNotFoundException, IOException{
+  public static final NameFinderME peopleFinder(File path) throws InvalidFormatException,
FileNotFoundException, IOException{
     if(pModel == null)
       initializeModel(MODEL.PEOPLE, path);
     return new NameFinderME(pModel);
   }
     
-  public static final NameFinderME locationFinder(String path) throws InvalidFormatException,
FileNotFoundException, IOException{
+  public static final NameFinderME locationFinder(File path) throws InvalidFormatException,
FileNotFoundException, IOException{
     if(lModel == null)
       initializeModel(MODEL.LOCATIONS, path);
     return new NameFinderME(lModel);
   }
     
-  public static final NameFinderME organizationFinder(String path) throws InvalidFormatException,
FileNotFoundException, IOException{
+  public static final NameFinderME organizationFinder(File path) throws InvalidFormatException,
FileNotFoundException, IOException{
     if(oModel == null)
       initializeModel(MODEL.ORGANIZATIONS, path);
     return new NameFinderME(oModel);



Mime
View raw message