Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update dependencies and remove unused ones #19

Open
wants to merge 11 commits into
base: master
Choose a base branch
from
56 changes: 7 additions & 49 deletions core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -50,24 +50,8 @@
</dependency>

<dependency>
<groupId>jcs</groupId>
<artifactId>jcs</artifactId>
<exclusions>
<exclusion>
<groupId>xerces</groupId>
<artifactId>xerces</artifactId>
</exclusion>
</exclusions>
</dependency>

<dependency>
<groupId>xerces</groupId>
<artifactId>xercesImpl</artifactId>
</dependency>

<dependency>
<groupId>org.apache.solr</groupId>
<artifactId>solr-analysis-extras</artifactId>
<groupId>org.apache.lucene</groupId>
<artifactId>lucene-analyzers-common</artifactId>
</dependency>

<dependency>
Expand All @@ -76,12 +60,12 @@
</dependency>

<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
<groupId>commons-collections</groupId>
<artifactId>commons-collections</artifactId>
</dependency>

<dependency>
<groupId>nekohtml</groupId>
<groupId>net.sourceforge.nekohtml</groupId>
<artifactId>nekohtml</artifactId>
</dependency>

Expand All @@ -95,11 +79,6 @@
<artifactId>nxparser</artifactId>
</dependency>

<dependency>
<groupId>edu.umd</groupId>
<artifactId>cloud9</artifactId>
</dependency>

<dependency>
<groupId>weka</groupId>
<artifactId>kea-goss-weka</artifactId>
Expand All @@ -110,11 +89,6 @@
<artifactId>weka</artifactId>
</dependency>

<dependency>
<groupId>net.liftweb</groupId>
<artifactId>lift-json_2.10</artifactId>
</dependency>

<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
Expand Down Expand Up @@ -144,8 +118,8 @@
</dependency>

<dependency>
<groupId>opennlp</groupId>
<artifactId>maxent</artifactId>
<groupId>org.apache.opennlp</groupId>
<artifactId>opennlp-maxent</artifactId>
</dependency>

<dependency>
Expand Down Expand Up @@ -179,16 +153,6 @@
<artifactId>jdbm</artifactId>
</dependency>

<dependency>
<groupId>trove</groupId>
<artifactId>trove</artifactId>
</dependency>

<dependency>
<groupId>org.apache.mahout</groupId>
<artifactId>mahout-collections</artifactId>
</dependency>

<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-math</artifactId>
Expand All @@ -204,12 +168,6 @@
<artifactId>scalaz-core_2.10</artifactId>
</dependency>

<dependency>
<groupId>org.scala-lang</groupId>
<artifactId>scala-actors</artifactId>
<version>2.10.5</version>
</dependency>

<dependency>
<groupId>org.scalanlp</groupId>
<artifactId>breeze_2.10</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -292,14 +292,6 @@ public SpotlightConfiguration(String fileName) throws ConfigurationException {
sparqlMainGraph = config.getProperty("org.dbpedia.spotlight.sparql.graph", "http://dbpedia.org").trim();


String maxCacheSizeString = config.getProperty("jcs.default.cacheattributes.MaxObjects", "").trim();
try {
maxCacheSize = new Long(maxCacheSizeString.trim());
} catch (Exception ignored) {
LOG.error(ignored);
}


/**
* These configuration parameters are for an alternative way to load DBpediaResources (from an in-memory database instead of Lucene)
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@
import org.apache.commons.httpclient.HttpStatus;
import org.apache.commons.httpclient.methods.GetMethod;
import org.apache.commons.httpclient.params.HttpMethodParams;
import org.apache.log4j.Logger;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.dbpedia.spotlight.exceptions.OutputException;
import org.dbpedia.spotlight.exceptions.SparqlExecutionException;
import org.dbpedia.spotlight.model.DBpediaResource;
Expand All @@ -51,8 +52,7 @@
*/
public class SparqlQueryExecuter {

private final static Logger LOG = Logger.getLogger(SparqlQueryExecuter.class);

Log LOG = LogFactory.getLog(this.getClass());
// Create an instance of HttpClient.
private static HttpClient client = new HttpClient();

Expand All @@ -79,7 +79,6 @@ public List<DBpediaResource> query(String query) throws IOException, OutputExcep
LOG.debug("--SPARQL QUERY: " + query.replace("\n", " "));

URL url = getUrl(query);
//LOG.trace(url);

//FIXME Do some test with the returned results to see if there actually are results.
List<DBpediaResource> uris = null;
Expand All @@ -91,7 +90,7 @@ public List<DBpediaResource> query(String query) throws IOException, OutputExcep
} catch (JSONException e) {
throw new OutputException(e+response);
}
LOG.debug(String.format("-- %s found.", uris.size()));
LOG.debug(String.format("-- %s found.", uris.size()));
return uris;
}

Expand Down Expand Up @@ -119,7 +118,7 @@ public String request(URL url) throws SparqlExecutionException {
int statusCode = client.executeMethod(method);

if (statusCode != HttpStatus.SC_OK) {
LOG.error("SparqlQuery failed: " + method.getStatusLine());
LOG.error("SparqlQuery failed: " + method.getStatusLine());
throw new SparqlExecutionException(String.format("%s (%s). %s",
method.getStatusLine(),
method.getURI(),
Expand Down

This file was deleted.

66 changes: 0 additions & 66 deletions core/src/main/resources/log4j.properties

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
package org.dbpedia.spotlight.io

import com.officedepot.cdap2.collection.CompactHashSet
import org.apache.log4j.Logger
import org.dbpedia.spotlight.log.SpotlightLog

import scala.io.Source

Expand All @@ -30,8 +30,6 @@ import scala.io.Source

object WortschatzParser {

val LOG = Logger.getLogger(this.getClass)

def parse(filename: String) : CompactHashSet[String] = {
parse(filename, count => true);
}
Expand All @@ -45,7 +43,7 @@ object WortschatzParser {
}

def parse(filename: String, condition: Int => Boolean) : CompactHashSet[String] = {
LOG.info(" parsing common words file ")
SpotlightLog.info(this.getClass, " parsing common words file ");
// get lines, split in three fields, get the middle one (word)
val commonWords = new CompactHashSet[String]();

Expand All @@ -57,4 +55,4 @@ object WortschatzParser {
});
commonWords
}
}
}
Loading