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

Limit number of results that are returned from knowledge bases #269

Open
JanVana opened this issue Dec 28, 2016 · 5 comments
Open

Limit number of results that are returned from knowledge bases #269

JanVana opened this issue Dec 28, 2016 · 5 comments

Comments

@JanVana
Copy link
Member

JanVana commented Dec 28, 2016

Sometimes there are too many results returned from the knowledge base. In these situations, it could be better to limit the number returned results and add warning that the value is too vague.

@tomas-knap
Copy link
Member

I would suggest to have in the config file an (optional) param "max number of suggestions". If available, this should cause that only such number of suggestions is returned per each case (those with highest score). By default, this should not be restricted.

@JanVana
Copy link
Member Author

JanVana commented Jan 5, 2017

@tomas-knap I agree that it should be an optional parameter. But returning a limited number of results based on score would defeat the purpose of this improvement. The main motivation is to handle situations, where there are so many results returned from the knowledge base, that processing them would take impractically long.

For this reason I propose to limit the number of results in main SPARQL search queries (exact match and fulltext search) and display a warning for the user when this limit is reached.

@JanVana
Copy link
Member Author

JanVana commented Jan 5, 2017

An example of query, that returns quite a lot of results:

SELECT DISTINCT ?subject ?object
WHERE
  { { SELECT ?subject ?object
      WHERE
        {   { ?subject <http://xmlns.com/foaf/0.1/name> ?object .
              ?object <bif:contains> "\"Book\""
            }
          UNION
            { ?subject  <http://www.w3.org/2000/01/rdf-schema#label> ?object .
              ?object <bif:contains> "\"Book\""
            }
        }
    }
    ?subject a ?class
    { SELECT ?class
      WHERE
        {   { ?class a <http://www.w3.org/2000/01/rdf-schema#class> }
          UNION
            { ?class a <http://www.w3.org/2002/07/owl#Class> }
        }
    }
  }

@tomas-knap
Copy link
Member

Ok, but still I would prefer to have config.param - which may be turned on by default (which is a difference from what I proposed above)

@tomas-knap
Copy link
Member

(so that I can easily switch that off when testing/playing with the algorithm, without the need to remove all limits etc. )

@brodecva brodecva added ready and removed ready labels Jan 10, 2017
@tomas-knap tomas-knap modified the milestones: 6th iteration - bugfixing, 5th Iteration Jan 20, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants