Code Monkey home page Code Monkey logo

lookup's Introduction

IMPORTANT NOTE:

There is a newer and DBpedia Databus compatible version of the DBpedia Lookup here: https://github.com/dbpedia/dbpedia-lookup. The discussion concerning the transition to the new service can be found here: https://forum.dbpedia.org/t/new-dbpedia-lookup-application/607

DBpedia Lookup

Build Status

DBpedia Lookup is a web service that can be used to look up DBpedia URIs by related keywords. Related means that either the label of a resource matches, or an anchor text that was frequently used in Wikipedia to refer to a specific resource matches (for example the resource http://dbpedia.org/resource/United_States can be looked up by the string "USA"). The results are ranked by the number of inlinks pointing from other Wikipedia pages at a result page.

Web APIs

Two APIs are offered: Keyword Search and Prefix Search. A hosted version of the Lookup service is available on the DBpedia server infrastructure.

Keyword Search

The Keyword Search API can be used to find related DBpedia resources for a given string. The string may consist of a single or multiple words.

Example: Places that have the related keyword "berlin"

http://lookup.dbpedia.org/api/search/KeywordSearch?QueryClass=place&QueryString=berlin

Prefix Search (i.e. Autocomplete)

The Prefix Search API can be used to implement autocomplete input boxes. For a given partial keyword like berl the API returns URIs of related DBpedia resources like http://dbpedia.org/resource/Berlin.

Example: Top five resources for which a keyword starts with "berl"

http://lookup.dbpedia.org/api/search/PrefixSearch?QueryClass=&MaxHits=5&QueryString=berl

Parameters

The query parameters accepted by the endpoints are

  • QueryString: a string for which a DBpedia URI should be found.
  • QueryClass: a DBpedia class from the Ontology that the results should have (for owl#Thing and untyped resource, leave this parameter empty).
  • MaxHits: the maximum number of returned results (default: 5)

JSON support

By default all data is returned as XML, the service also retuns JSON to any request including the Accept: application/json header.

Running a local mirror of the webservice

Clone and build DBpedia Lookup

git clone git://github.com/dbpedia/lookup.git
cd lookup
mvn clean install

Download and configure the index

You can get our indexes from HERE

Run the server

`./run Server [PATH TO THE INDEX]/[VERSION]/`

E.g:

`./run Server /opt/dbpedia-lookup/2015-04`

Note: The index file must be decompressed

Available versions:

  • current - from Latest DBpedia Dump (2015-10)

Available languages (i18n working in progress):

  • en - English

The server should now be running at http://localhost:1111

Rebuilding the index

Rebuilding an index is usually not required, if you only intend on running a local mirror of the service you can donwload a prebuilt index as outlined above.

To re-build the index you will require

Get the following DBpedia datasets

from http://downloads.dbpedia.org/2015-10/core-i18n/en/

  • redirects_en.nt (or .ttl)
  • short_abstracts_en.nt (or .ttl)
  • instance_types_en.nt (or .ttl)
  • article_categories_en.nt (or .ttl)

from http://downloads.dbpedia.org/2015-10/core

  • instance_types_en.ttl
  • instance_types_sdtyped_dbo_en.ttl
  • instance_types_transitive_en.ttl

Concatenate all data and sort by URI

This is necessary because indexing in sorted order is significantly faster.

  cat instance_types_en.nt (or .ttl)  \
      short_abstracts_en.nt (or .ttl) \
      article_categories_en.nt (or .ttl) \
      instance_types_en.ttl  \
      instance_types_sdtyped_dbo_en.ttl \
      instance_types_transitive_en.ttl | sort >all_dbpedia_data.nt (or .ttl)

Get the dataset redirects_en.nt (or .ttl)

Redirects are not indexed, but they are excluded as targets of lookup.

Run Indexer

The indexer has to be run twice:

  1. with the DBpedia data

     ./run Indexer lookup_index_dir redirects_en.nt (or .ttl) all_dbpedia_data.nt (or .ttl)
    
  2. with the wikistatsextractor data

     ./run Indexer lookup_index_dir redirects_en.nt (or .ttl) pairCounts
    

Support and feedback

The best way to get support or give feedback on the Lookup project is via the DBpedia discussion mailing list. More technical queries about the code base should be directed to the DBpedia developers mailing list.

The DBpedia wiki also has useful information on the project.

Maintainers

lookup's People

Contributors

holycrab13 avatar jcsahnwaldt avatar jimkont avatar jj-author avatar jodaiber avatar ktk avatar maxjakob avatar sacoelho avatar sandroacoelho avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

lookup's Issues

Using non DBpedia types as filter

DBpedia index is enriched with types beyond its own ontology, but DBpedia lookup just support queries by DBpedia types.

Is useful to the community enables queries of any kind of type that is indexed?

java.lang.NoSuchMethodError when start the server

Caused by: java.lang.NoSuchMethodError: scala.collection.immutable.$colon$colon.hd$1()Ljava/lang/Object; at scala.xml.NamespaceBinding.fromPrefixList$1(NamespaceBinding.scala:48) at scala.xml.NamespaceBinding.shadowRedefined(NamespaceBinding.scala:53) at scala.xml.NamespaceBinding.buildString(NamespaceBinding.scala:71) at scala.xml.Utility$.serialize(Utility.scala:218) at scala.xml.PrettyPrinter.traverse(PrettyPrinter.scala:151) at scala.xml.PrettyPrinter.format(PrettyPrinter.scala:209) at scala.xml.PrettyPrinter$$anonfun$format$2.apply(PrettyPrinter.scala:244) at scala.xml.PrettyPrinter$$anonfun$format$2.apply(PrettyPrinter.scala:244) at scala.xml.Utility$.sbToString(Utility.scala:33) at scala.xml.PrettyPrinter.format(PrettyPrinter.scala:244) at org.dbpedia.lookup.entities.ResultXmlSerializer.prettyPrint(EntitiesSerialization.scala:37) at org.dbpedia.lookup.server.LookupResource.serialize(LookupResource.scala:58) at org.dbpedia.lookup.server.LookupResource.ok(LookupResource.scala:50) at org.dbpedia.lookup.server.LookupResource.keywordSearch(LookupResource.scala:37) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at com.sun.jersey.server.impl.model.method.dispatch.AbstractResourceMethodDispatchProvider$ResponseOutInvoker._dispatch(AbstractResourceMethodDispatchProvider.java:186) at com.sun.jersey.server.impl.model.method.dispatch.ResourceJavaMethodDispatcher.dispatch(ResourceJavaMethodDispatcher.java:70)

DBpedia lookup service is unavailable

Hi, I've been using the lookup service for the last few weeks with no issues but since this weekend I keep getting a Service Temporarily Unavailable message from both the Keyword Search & Autocomplete.

I'm assuming the service is going through some maintenance but just wanted to check just in case you guys weren't aware of the issue.

Thanks in advance!

How to create refCounts?

I am trying to build an index for Spanish data, but I can't seem to find a way to build refCount information needed to properly sorting the data.

All I found was a page-links_es.nt.bz2 file containing wikiPageWikiLink triples.

Match the Google KG API

DBpedia Lookup currently returns results in XML. We want to keep the same functionality for consistency but also to update to new formats like jsonLD (RDF) and NIF. this will result in breaking the current project in 3 modules, lookup-core, lookup-xml, lookup-rdf.

The goal of the new lookup-rdf module is to match the new Google KG API interface

Cannot build

Hello, I can't build master due to old versions of nxparser no longer being available on google code. Any thoughts?

Intermittent Errors

The jar works perfectly 99.9% of the time, but every now and then it will suddenly throw the following error:

Sep 04, 2017 1:50:12 PM com.sun.jersey.spi.container.ContainerResponse mapMappableContainerException
SEVERE: The exception contained within MappableContainerException could not be mapped to a response, re-throwing to the HTTP container
org.apache.lucene.queryParser.ParseException: Cannot parse '"sta"': Encountered "<EOF>" at line 1, column 0.
Was expecting one of:
    <NOT> ...
    "+" ...
    "-" ...
    <BAREOPER> ...
    "(" ...
    "*" ...
    <QUOTED> ...
    <TERM> ...
    <PREFIXTERM> ...
    <WILDTERM> ...
    "[" ...
    "{" ...
    <NUMBER> ...
    <TERM> ...
    "*" ...

	at org.apache.lucene.queryParser.QueryParser.parse(QueryParser.java:211)
	at org.dbpedia.lookup.lucene.LuceneConfig$PrefixSearchPseudoAnalyzer$.analyze(LuceneConfig.scala:43)
	at org.dbpedia.lookup.lucene.Searcher.getQuery(Searcher.scala:59)
	at org.dbpedia.lookup.lucene.Searcher.prefixSearch(Searcher.scala:39)
	at org.dbpedia.lookup.server.LookupResource.prefixSearch(LookupResource.scala:43)
	at sun.reflect.GeneratedMethodAccessor10.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at com.sun.jersey.spi.container.JavaMethodInvokerFactory$1.invoke(JavaMethodInvokerFactory.java:60)
	at com.sun.jersey.server.impl.model.method.dispatch.AbstractResourceMethodDispatchProvider$ResponseOutInvoker._dispatch(AbstractResourceMethodDispatchProvider.java:205)
	at com.sun.jersey.server.impl.model.method.dispatch.ResourceJavaMethodDispatcher.dispatch(ResourceJavaMethodDispatcher.java:75)
	at com.sun.jersey.server.impl.uri.rules.HttpMethodRule.accept(HttpMethodRule.java:302)
	at com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:147)
	at com.sun.jersey.server.impl.uri.rules.ResourceClassRule.accept(ResourceClassRule.java:108)
	at com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:147)
	at com.sun.jersey.server.impl.uri.rules.RootResourceClassesRule.accept(RootResourceClassesRule.java:84)
	at com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1542)
	at com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1473)
	at com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1419)
	at com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1409)
	at com.sun.jersey.server.impl.container.httpserver.HttpHandlerContainer.handle(HttpHandlerContainer.java:191)
	at com.sun.net.httpserver.Filter$Chain.doFilter(Filter.java:79)
	at sun.net.httpserver.AuthFilter.doFilter(AuthFilter.java:83)
	at com.sun.net.httpserver.Filter$Chain.doFilter(Filter.java:82)
	at sun.net.httpserver.ServerImpl$Exchange$LinkHandler.handle(ServerImpl.java:675)
	at com.sun.net.httpserver.Filter$Chain.doFilter(Filter.java:79)
	at sun.net.httpserver.ServerImpl$Exchange.run(ServerImpl.java:647)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
	at java.lang.Thread.run(Thread.java:745)
Caused by: org.apache.lucene.queryParser.ParseException: Encountered "<EOF>" at line 1, column 0.
Was expecting one of:
    <NOT> ...
    "+" ...
    "-" ...
    <BAREOPER> ...
    "(" ...
    "*" ...
    <QUOTED> ...
    <TERM> ...
    <PREFIXTERM> ...
    <WILDTERM> ...
    "[" ...
    "{" ...
    <NUMBER> ...
    <TERM> ...
    "*" ...

	at org.apache.lucene.queryParser.QueryParser.generateParseException(QueryParser.java:1849)
	at org.apache.lucene.queryParser.QueryParser.jj_consume_token(QueryParser.java:1731)
	at org.apache.lucene.queryParser.QueryParser.Clause(QueryParser.java:1337)
	at org.apache.lucene.queryParser.QueryParser.Query(QueryParser.java:1245)
	at org.apache.lucene.queryParser.QueryParser.TopLevelQuery(QueryParser.java:1234)
	at org.apache.lucene.queryParser.QueryParser.parse(QueryParser.java:206)
	... 29 more

org.dbpedia.lookup.server.Server: do not open a site

If the server is started via the run script it seems to try to open a URI with an example search query. While this might make sense during testing this is not really useful in production environment as we neither have an X11 server nor a web browser installed so it ends in an error message.

This should be removed from the default server configuration.

Unable to execute "./run Server dbpedia-lookup-index-3.8"

After downloading dbpedia-lookup-index and mvn install "./run Server dbpedia-lookup-index-3.8" doesn't works.It gives following error:

[INFO] --- scala-maven-plugin:3.2.2:testCompile (test-compile) @ dbpedia-lookup ---
[WARNING] Expected all dependencies to require Scala version: 2.11.7
[WARNING] org.dbpedia.lookup:dbpedia-lookup:3.1 requires scala version: 2.11.7
[WARNING] org.scala-lang:scala-compiler:2.11.7 requires scala version: 2.11.7
[WARNING] org.scala-lang:scala-reflect:2.11.7 requires scala version: 2.11.7
[WARNING] org.scala-lang.modules:scala-xml_2.11:1.0.4 requires scala version: 2.11.4
[WARNING] Multiple versions of scala libraries detected!
[INFO] Nothing to compile - all classes are up to date
[INFO]
[INFO] <<< scala-maven-plugin:3.2.2:run (default-cli) < test-compile @ dbpedia-lookup <<<
[INFO]
[INFO] --- scala-maven-plugin:3.2.2:run (default-cli) @ dbpedia-lookup ---
[WARNING] Expected all dependencies to require Scala version: 2.11.7
[WARNING] org.dbpedia.lookup:dbpedia-lookup:3.1 requires scala version: 2.11.7
[WARNING] org.scala-lang:scala-compiler:2.11.7 requires scala version: 2.11.7
[WARNING] org.scala-lang:scala-reflect:2.11.7 requires scala version: 2.11.7
[WARNING] org.scala-lang.modules:scala-xml_2.11:1.0.4 requires scala version: 2.11.4
[WARNING] Multiple versions of scala libraries detected!
[INFO] launcher 'Server' selected => org.dbpedia.lookup.server.Server
java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at scala_maven_executions.MainHelper.runMain(MainHelper.java:164)
at scala_maven_executions.MainWithArgsInFile.main(MainWithArgsInFile.java:26)
Caused by: org.apache.lucene.index.IndexNotFoundException: no segments* file found in org.apache.lucene.store.MMapDirectory@/home/abhishek/lookup/dbpedia-lookup-index-3.8 lockFactory=org.apache.lucene.store.NativeFSLockFactory@7a003aca: files: [dbpedia-lookup-index-3.8]
at org.apache.lucene.index.SegmentInfos$FindSegmentsFile.run(SegmentInfos.java:667)
at org.apache.lucene.index.DirectoryReader.open(DirectoryReader.java:72)
at org.apache.lucene.index.IndexReader.open(IndexReader.java:256)
at org.dbpedia.lookup.lucene.Searcher.(Searcher.scala:21)
at org.dbpedia.lookup.server.Server$.main(Server.scala:51)
at org.dbpedia.lookup.server.Server.main(Server.scala)
... 6 more
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 5.877 s
[INFO] Finished at: 2016-02-28T17:10:35+05:30
[INFO] Final Memory: 17M/248M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal net.alchim31.maven:scala-maven-plugin:3.2.2:run (default-cli) on project dbpedia-lookup: wrap: org.apache.commons.exec.ExecuteException: Process exited with an error: 240 (Exit value: 240) -> [Help 1]

No plugin found for prefix 'scala' error

I'm trying to re-build the index for my own DBpedia lookup service.
I've encountered the following error after execution the indexer :

Picked up JAVA_TOOL_OPTIONS: -javaagent:/usr/share/java/jayatanaag.jar
[INFO] Scanning for projects...
Downloading: http://repo.maven.apache.org/maven2/org/codehaus/mojo/maven-metadata.xml
Downloading: http://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-metadata.xml
Downloaded: http://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-metadata.xml (13 KB at 15.7 KB/sec)
Downloaded: http://repo.maven.apache.org/maven2/org/codehaus/mojo/maven-metadata.xml (22 KB at 10.6 KB/sec)
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 2.912s
[INFO] Finished at: Sat Jun 28 10:37:59 CET 2014
[INFO] Final Memory: 8M/205M
[INFO] ------------------------------------------------------------------------
[ERROR] No plugin found for prefix 'scala' in the current project and in the plugin groups [org.apache.maven.plugins, org.codehaus.mojo] available from the repositories [local (/home/nasreddine/.m2/repository), central (http://repo.maven.apache.org/maven2)] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/NoPluginFoundForPrefixException

Error while compiling

I get following error when compiling (mvn clean install).
@sandroacoelho any idea on the cause of this error? Can you maybe try to compile it? Thanks!

Here is the error I get.

[ERROR] error: scala.reflect.internal.MissingRequirementError: object java.lang.Object in compiler mirror not found.
[ERROR] 	at scala.reflect.internal.MissingRequirementError$.signal(MissingRequirementError.scala:17)
[ERROR] 	at scala.reflect.internal.MissingRequirementError$.notFound(MissingRequirementError.scala:18)
[ERROR] 	at scala.reflect.internal.Mirrors$RootsBase.getModuleOrClass(Mirrors.scala:53)
[ERROR] 	at scala.reflect.internal.Mirrors$RootsBase.getModuleOrClass(Mirrors.scala:45)
[ERROR] 	at scala.reflect.internal.Mirrors$RootsBase.getModuleOrClass(Mirrors.scala:45)
[ERROR] 	at scala.reflect.internal.Mirrors$RootsBase.getModuleOrClass(Mirrors.scala:66)
[ERROR] 	at scala.reflect.internal.Mirrors$RootsBase.getClassByName(Mirrors.scala:102)
[ERROR] 	at scala.reflect.internal.Mirrors$RootsBase.getRequiredClass(Mirrors.scala:105)
[ERROR] 	at scala.reflect.internal.Definitions$DefinitionsClass.ObjectClass$lzycompute(Definitions.scala:257)
[ERROR] 	at scala.reflect.internal.Definitions$DefinitionsClass.ObjectClass(Definitions.scala:257)
[ERROR] 	at scala.reflect.internal.Definitions$DefinitionsClass.init(Definitions.scala:1394)
[ERROR] 	at scala.tools.nsc.Global$Run.<init>(Global.scala:1215)
[ERROR] 	at scala.tools.nsc.Driver.doCompile(Driver.scala:31)
[ERROR] 	at scala.tools.nsc.MainClass.doCompile(Main.scala:23)
[ERROR] 	at scala.tools.nsc.Driver.process(Driver.scala:51)
[ERROR] 	at scala.tools.nsc.Driver.main(Driver.scala:64)
[ERROR] 	at scala.tools.nsc.Main.main(Main.scala)
[ERROR] 	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[ERROR] 	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
[ERROR] 	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[ERROR] 	at java.base/java.lang.reflect.Method.invoke(Method.java:567)
[ERROR] 	at scala_maven_executions.MainHelper.runMain(MainHelper.java:164)
[ERROR] 	at scala_maven_executions.MainWithArgsInFile.main(MainWithArgsInFile.java:26)
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  1.871 s
[INFO] Finished at: 2020-04-06T16:45:40+02:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal net.alchim31.maven:scala-maven-plugin:3.2.2:compile (compile) on project dbpedia-lookup: wrap: org.apache.commons.exec.ExecuteException: Process exited with an error: 1 (Exit value: 1) -> [Help 1]
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException

Docker image not working

Hello,

I downloaded image using
docker pull dbpedia/lookup

however when I run server and try to query it using
curl http://localhost:1111/api/search/KeywordSearch?QueryClass=place&QueryString=berlin
I get the following exception

Apr 22, 2016 9:08:11 AM com.sun.jersey.spi.container.ContainerResponse write
SEVERE: A message body writer for Java class java.lang.String, and Java type class java.lang.String, and MIME media type application/xml was not found
Apr 22, 2016 9:08:11 AM com.sun.jersey.spi.container.ContainerResponse write
SEVERE: The registered message body writers compatible with the MIME media type are:
*/* ->
  com.sun.jersey.server.impl.template.ViewableMessageBodyWriter

Apr 22, 2016 9:08:11 AM com.sun.jersey.spi.container.ContainerResponse logException
SEVERE: Mapped exception to response: 500 (Internal Server Error)
javax.ws.rs.WebApplicationException: com.sun.jersey.api.MessageException: A message body writer for Java class java.lang.String, and Java type class java.lang.String, and MIME media type application/xml was not found
        at com.sun.jersey.spi.container.ContainerResponse.write(ContainerResponse.java:285)
        at com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1316)
        at com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1229)
        at com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1219)
        at com.sun.jersey.server.impl.container.httpserver.HttpHandlerContainer.handle(HttpHandlerContainer.java:191)
        at com.sun.net.httpserver.Filter$Chain.doFilter(Filter.java:79)
        at sun.net.httpserver.AuthFilter.doFilter(AuthFilter.java:83)
        at com.sun.net.httpserver.Filter$Chain.doFilter(Filter.java:82)
        at sun.net.httpserver.ServerImpl$Exchange$LinkHandler.handle(ServerImpl.java:675)
        at com.sun.net.httpserver.Filter$Chain.doFilter(Filter.java:79)
        at sun.net.httpserver.ServerImpl$Exchange.run(ServerImpl.java:647)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
        at java.lang.Thread.run(Thread.java:745)
Caused by: com.sun.jersey.api.MessageException: A message body writer for Java class java.lang.String, and Java type class java.lang.String, and MIME media type application/xml was not found
        ... 14 more

SSL certificates are out of date on public API

Hi, I've been having trouble using the public lookup API programmatically. It appears one of the SSL certificates of domain lookup.dbpedia.org expired 9 days ago. Will this be renewed soon?

Rebuilding the index

Hello everyone,

I am currently rebuilding the index, in order to have the latest data from dbpedia.

I am stuck at the part:
"pignlproc output from nerd-stats.pig"

At first, just to know what it is about, what is this file doing? Can the look-up work without this file?

Then, is the nerd-stats.pig a very intensive script that requires a hadoop cluster of several machines? Or is it ok to run it on a laptop?

Thanks you by advance,
Sam

Issue launching lookup service with java commandline

I try to run the lookup service by using the following command line:

java -cp dbpedia-lookup-3.1-jar-with-dependencies.jar org.dbpedia
.lookup.server.Server dbpedia-lookup-index/en/current/core-i18n

The server starts at the port 1111 and when I send a query I have following error

INFO: Initiating Jersey application, version 'Jersey: 1.5 01/14/2011 12:36 PM'
INFO  - Server started in c:\data\lookup listening on http://localhost:1111/
INFO  - KeywordSearch found 0: MaxHits=5 QueryClass=place QueryString=berlin
Apr 20, 2016 10:59:10 PM com.sun.jersey.spi.container.ContainerResponse write
SEVERE: A message body writer for Java class java.lang.String, and Java type cla
ss java.lang.String, and MIME media type application/xml was not found
Apr 20, 2016 10:59:10 PM com.sun.jersey.spi.container.ContainerResponse write
SEVERE: The registered message body writers compatible with the MIME media type
are:
*/* ->
  com.sun.jersey.server.impl.template.ViewableMessageBodyWriter

Apr 20, 2016 10:59:10 PM com.sun.jersey.spi.container.ContainerResponse logExcep
tion
SEVERE: Mapped exception to response: 500 (Internal Server Error)
javax.ws.rs.WebApplicationException: com.sun.jersey.api.MessageException: A mess
age body writer for Java class java.lang.String, and Java type class java.lang.S
tring, and MIME media type application/xml was not found
        at com.sun.jersey.spi.container.ContainerResponse.write(ContainerRespons
e.java:285)
        at com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequ
est(WebApplicationImpl.java:1316)
        at com.sun.jersey.server.impl.application.WebApplicationImpl.handleReque
st(WebApplicationImpl.java:1229)
        at com.sun.jersey.server.impl.application.WebApplicationImpl.handleReque
st(WebApplicationImpl.java:1219)
        at com.sun.jersey.server.impl.container.httpserver.HttpHandlerContainer.
handle(HttpHandlerContainer.java:191)
        at com.sun.net.httpserver.Filter$Chain.doFilter(Filter.java:79)
        at sun.net.httpserver.AuthFilter.doFilter(AuthFilter.java:83)
        at com.sun.net.httpserver.Filter$Chain.doFilter(Filter.java:82)
        at sun.net.httpserver.ServerImpl$Exchange$LinkHandler.handle(ServerImpl.
java:675)
        at com.sun.net.httpserver.Filter$Chain.doFilter(Filter.java:79)
        at sun.net.httpserver.ServerImpl$Exchange.run(ServerImpl.java:647)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.
java:1142)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor
.java:617)
        at java.lang.Thread.run(Thread.java:745)
Caused by: com.sun.jersey.api.MessageException: A message body writer for Java c
lass java.lang.String, and Java type class java.lang.String, and MIME media type
 application/xml was not found
        ... 14 more

When running the same program using the shell script run.bat, the service behaves normally. I suspect that the uberjar file is not properly formed (resources describing message body writers are not set properly in the jar file?)

Empty Result Set

I am using the code for the lookup-service but it seems that it returns an empty result set even for cases it should return results e.g. http://lookup.dbpedia.org/api/search.asmx/KeywordSearch?QueryString=photography
I noticed that in the line sax.parse(ins,this) keeps giving me zero.
Nevertheless, I am not sure how I should use the methods startelement(), endlement() etc. Could you please help me to figure tout what is happening and how should I use the abovementioned methods?

Thank you in advance.

Cannot start Server without maven

I try to figure out how to start the server without maven, as maven is not really useful in a headless server environment with a service management framework for starting/stopping the process.

The current run script does not really help as it just triggers maven and I couldn't figure out how to launch it manually.

I tried multiple things, for example:

java  -Xmx512m -Dlogback.configurationFile=logback.xml -Dhttp.port=1111 -jar target/dbpedia-lookup-3.1.jar  org.dbpedia.lookup.server.Server

But it complains about missing main manifest and does not seem to execute org.dbpedia.lookup.server.Server:

no main manifest attribute, in target/dbpedia-lookup-3.1.jar

HTTPS connection does not terminate

I'm not sure if it's the right place to report,
because it is a problem on lookup.dbpedia.org deployed service, probably not on source code.

wget 'https://lookup.dbpedia.org/api/search/PrefixSearch?MaxHits=15&QueryClass=&QueryString=soil'
--2017-09-28 12:08:23--  https://lookup.dbpedia.org/api/search/PrefixSearch?MaxHits=15&QueryClass=&QueryString=soil
Résolution de lookup.dbpedia.org (lookup.dbpedia.org)… 134.155.95.15
Connexion à lookup.dbpedia.org (lookup.dbpedia.org)|134.155.95.15|:443… 

return Turtle instead of XML from the API

After all, it's a semantic web project !

To distinguish betwen the actual URI matches and other URI's,
the actual URI match could be typed lookup:Result , like this :

dbpedia:Berlin a lookup:Result ;
rdfs:label "Berlin" ;
dbo:abstract """
Berlin is the capital city of Germany and one of the 16 states of Germany. 
With a population of 3.5 million people, Berlin is Germany's largest city and is the second most 
populous city proper and the eighth most populous urban area in the European Union. 
Located in northeastern Germany, it is the center of the Berlin-Brandenburg Metropolitan Region, 
which has 5.9 million residents from over 190 nations. Located in the European Plains, 
Berlin is influenced by a temperate seasonal climate.
""" ;
a dbo:Settlement .
 dbo:Settlement rdfs:label "settlement"@en .
# etc ....

Bordeaux is a SpatialThing but not found as such !

Compare both requests :
http://lookup.dbpedia.org/api/search/PrefixSearch?QueryString=Bordea
==> OK !

http://lookup.dbpedia.org/api/search/PrefixSearch?QueryString=Bordea&QueryClass=SpatialThing
==> empty result !

If you are curious, my use case is the following in https://github.com/jmvanel/semantic_forms :

  • from the rdfs:range of foaf:based_near ( that is geo:SpatialThing ) an input field is generated with dpPedia completion
  • after user typed "Bordea" , the above request is sent by JavaScript

NOTE : that works:
http://lookup.dbpedia.org/api/search/PrefixSearch?QueryString=Bordea&QueryClass=Place

DBPedia Lookup build breaks with Java 8

I tried changing the Scala version in the POM file, to no avail.

I tried building the master branch with Java 8 - worked until the end, with a "error: File name too long" error.

I understand that this is probably a low priority thing to fix, since people installing Java 7 is a good option.

EDIT: building master branch of the required extraction-framework works fine if I use an external non-encrypted drive and Java 8. Apparently having my home drive on Ubuntu encrypted caused the long file name error. I still can't build lookup: nxparser not found.

Server started but not accessible

I'm new at dbpedia lookup, my local server doesn't seems to run.

Launching the following command ./run Server ./2015-10/ display the following output : https://pastebin.com/raw/2tQQZQi6

Accessing to http://localhost:1111/ leads to a 404 page.
I've tried to run on another port (9999 for example) as suggested by https://www.mail-archive.com/[email protected]/msg03409.html but this doesn't solve my problem.

Trying the docker image leads to the same result :
docker run -p 1111:1111 -it dbpedia/lookup java -jar /opt/lookup/dbpedia-lookup-3.1-jar-with-dependencies.jar /opt/lookup/2015-10/
Mar 02, 2018 4:18:10 PM com.sun.jersey.server.impl.application.WebApplicationImpl _initiate INFO: Initiating Jersey application, version 'Jersey: 1.19.1 03/11/2016 02:42 PM' INFO - Server started in / listening on http://localhost:1111/
The page at localhost:1111 leads to 404.
I'm running Java 8, Scala 2.11.7, Docker 17.12.1-ce and Debian 9.1

different results in public API and in local server

Hi, when I execute the query:

http://localhost:1111/api/search/KeywordSearch?QueryClass=&QueryString=berlin

in my localhost, I get different results than those on the public server, as shown below (only the URIs of the results are shown here for easier reading).
Is it an issue of different versions? Which one is running on the public server?

  <URI>http://dbpedia.org/resource/Dada</URI>
  <URI>http://dbpedia.org/resource/Central_European_Time</URI>
  <URI>http://dbpedia.org/resource/Kingdom_of_Prussia</URI>
  <URI>http://dbpedia.org/resource/Golden_Bear</URI>
  <URI>http://dbpedia.org/resource/Spandau</URI>

Docker image does not work

I try to understand the docker image for lookup. The Dockerfile itself is already confusing me as it looks like there is no command executed when the container is started, it stops with a rm command and no service executed.

When I tried building it on my own and executed a shell I cannot execute the jar:

admin@myhost:~/lookup/docker$ docker run -ti -p 1111:1111 lookup /bin/bash
root@6c79e06c73de:/# cd /opt/lookup/
root@6c79e06c73de:/opt/lookup# ls
2015-04  dbpedia-lookup-3.1-jar-with-dependencies.jar
root@6c79e06c73de:/opt/lookup# java -jar dbpedia-lookup-3.1-jar-with-dependencies.jar
Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: 0
        at org.dbpedia.lookup.server.Server$.main(Server.scala:48)
        at org.dbpedia.lookup.server.Server.main(Server.scala)

My expectation is that with the docker image I get a lookup service on port 1111 exposed and I can use this to query. Am I missing something here?

Local mirror: Refcount always 0

I successfully mirrorred the web service locally. However, the Refcountis always 0, so the results are not properly sorted, as in the hosted version.

EDIT: I realized now that the field description is also always coming null.

I downloaded the index from the link in README and I'm executing the following command:
mvn scala:run "-Dlauncher=Server" "-DaddArgs=dbpedia-lookup-index/en/2015-04/core-i18n"

Do the previously built indexes contain the redirects included? Or am I missing something?

GSoC - Spanish and Portuguese i18n

@Kunal-Jha says: "For some reasons the lookup is not returning results for Spanish language. I was under the impression that I am not entering the keywords correct and the results is returning null. Also according to a recent conversations, I came to know that we have the same problem for the Portugese index too"

Maintained Question

Hey guys,

I am using this service and loves the ability it gives my application but it seems like PrefixSearch is down and has been last 7 days, I was wondering who maintains that on the actual dbpedia servers? Is it actively maintained?

Thanks and sorry if it has been asked before

Jason

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.