Code Monkey home page Code Monkey logo

grafa's Introduction

GraFa

Faceted Browsing over Wikidata triples

Use the system

The system is currently running on: http://grafa.dcc.uchile.cl

Installation

Required libraries:

  • Lucene 6.5
  • Tomcat 7
  • RDF4J 2.2

Config file

The file facet.properties contains the following options:

  • languages: list of supported languages (using the same language tag from the dataset)
  • entityIRI: prefix for entities
  • propertyIRI: prefix for properties
  • labelIRI: predicate of the triple containing the label
  • descriptionIRI: predicate of the triple containing the description
  • alt_labelIRI: predicate of the triples containing alt labels or aliases
  • instanceOf: IRI (with no prefix) of the type or instance of predicate
  • image: IRI (with no prefix) of the image predicate
  • entityPrefix: prefix of all entities (excluding the domain prefix)

Binaries

The included build.xml generates several jar files. These are the most important:

  • index.jar: Creates an index from all entities based on an NT file
  • rank.jar: Computes the graph and the Page Rank value of each entity
  • boosts.jar: Copies the index from index.jar but adding the ranks from rank.jar
  • cache.jar: Generates a list of all queries with a large results set that need caching.
  • instances.jar: Creates an index of all instances/types of the main index and also caches the results from the list of cache.jar
  • values.jar: Creates the cache for values for every property of every query that needs caching. This process may take a couple of days.
  • grafa.war: Tomcat Webapp's war file. The config file need the directory of the indexes.
  • The other jar files are for debugging and generate statistics (there may also be unused classes)

grafa's People

Contributors

aidhog avatar joseignm avatar

Stargazers

 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

grafa's Issues

Search by name - wildcards

Search by name is I assume about label property. It is not clear, if I can use wildcards (and how) or if I can search for partial matches. If I start with wildcard, it throws:
Error while performing query! org.apache.lucene.queryparser.classic.ParseException: Cannot parse 'Titanic': '' or '?' not allowed as first character in WildcardQuery at org.apache.lucene.queryparser.classic.QueryParserBase.parse(QueryParserBase.java:116) at cl.uchile.dcc.facet.web.SearchServlet.doGet(SearchServlet.java:95) at javax.servlet.http.HttpServlet.service(HttpServlet.java:624) at javax.servlet.http.HttpServlet.service(HttpServlet.java:731) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208) at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:218) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:110) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:506) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:169) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103) at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:962) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:452) at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1087) at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:637) at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:316) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) at java.lang.Thread.run(Thread.java:745) Caused by: org.apache.lucene.queryparser.classic.ParseException: '*' or '?' not allowed as first character in WildcardQuery at org.apache.lucene.queryparser.classic.QueryParserBase.getWildcardQuery(QueryParserBase.java:743) at org.apache.lucene.queryparser.classic.MultiFieldQueryParser.getWildcardQuery(MultiFieldQueryParser.java:245) at org.apache.lucene.queryparser.classic.MultiFieldQueryParser.getWildcardQuery(MultiFieldQueryParser.java:241) at org.apache.lucene.queryparser.classic.QueryParserBase.handleBareTokenQuery(QueryParserBase.java:841) at org.apache.lucene.queryparser.classic.QueryParser.Term(QueryParser.java:469) at org.apache.lucene.queryparser.classic.QueryParser.Clause(QueryParser.java:355) at org.apache.lucene.queryparser.classic.QueryParser.Query(QueryParser.java:244) at org.apache.lucene.queryparser.classic.QueryParser.TopLevelQuery(QueryParser.java:215) at org.apache.lucene.queryparser.classic.QueryParserBase.parse(QueryParserBase.java:111) ... 23 more

Placeholder in input field

Arriving at the main interface, one is presented with an input field titled "select a type". Well, there's nothing to really select here, so one has to write something in, but there's no indication of what kind of input is expected here. Perhaps a placeholder attribute to the input field with two or three examples would help bootstrap usage of the tool.

Existental values for properties

Per the discussion on the Wikidata mailing list with Joachim Neubert, it would be useful to restrict results by entities having any value for a property (including datatype/external properties).

This would require revisiting the caching assumptions and how some of the fields are indexed.

Allow searching for classes

I wanted to search for types of cheese (camembert, bleu, etc).

Obviously camembert is a subclass of cheese, not an instance of cheese.

I haven't found a way to search for this.

Cannot filter by label

On the page where the prop filters are on the left, I cannot filter by label. It should be some wildcard input rather than a dropdown.

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.