From 66f6131af318424520c5647af35dd91e9a08cfc1 Mon Sep 17 00:00:00 2001 From: Vincent Labatut Date: Wed, 4 Mar 2015 15:02:50 +0100 Subject: [PATCH] fixed retrieval --- src/tr/edu/gsu/nerwip/tools/corpus/ArticleRetrieval.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/tr/edu/gsu/nerwip/tools/corpus/ArticleRetrieval.java b/src/tr/edu/gsu/nerwip/tools/corpus/ArticleRetrieval.java index 3195c02..f437129 100644 --- a/src/tr/edu/gsu/nerwip/tools/corpus/ArticleRetrieval.java +++ b/src/tr/edu/gsu/nerwip/tools/corpus/ArticleRetrieval.java @@ -126,7 +126,7 @@ public static void retrieveArticles(String fileName) throws ReaderException, IOE logger.log("Reading file " + file); ArticleRetriever retriever = new ArticleRetriever(); - retriever.setCacheEnabled(false); + retriever.setCacheEnabled(true); logger.increaseOffset(); // boolean pass = true; // used for degbugging purposes @@ -136,19 +136,19 @@ public static void retrieveArticles(String fileName) throws ReaderException, IOE // pass = false; // if(!pass) { logger.log("Processing '" + name + "'"); - URL url; + URL url = null; if(name.startsWith("http")) url = new URL(name); else { String urlStr = "http://en.wikipedia.org/wiki/"+name; try { url = new URL(urlStr); - retriever.process(url); } catch (MalformedURLException e) { e.printStackTrace(); } } + retriever.process(url); } } logger.decreaseOffset();