• Places
    • Home
    • Graphs
    • Prefixes
  • Admin
    • Users
    • Settings
    • Plugins
    • Statistics
  • CPACK
    • Home
    • List packs
    • Submit pack
  • Repository
    • Load local file
    • Load from HTTP
    • Load from library
    • Remove triples
    • Clear repository
  • Query
    • YASGUI SPARQL Editor
    • Simple Form
    • SWISH Prolog shell
  • Help
    • Documentation
    • Tutorial
    • Roadmap
    • HTTP Services
  • Login

/usr/lib/swipl/library/ext/semweb/semweb/rdf_litindex.pl
All Application Manual Name SummaryHelp

  • semweb
    • semweb
      • rdf_db.pl -- Core RDF database
      • rdf_prefixes.pl -- RDF prefixes management
      • rdfs.pl -- RDFS handling
      • rdf11.pl -- RDF 1.1 API
      • rdf_persistency.pl -- RDF persistency plugin
      • rdf_litindex.pl -- Search literals
        • rdf_set_literal_index_option/1
        • rdf_find_literal/2
        • rdf_find_literals/2
        • rdf_token_expansions/2
        • rdf_delete_literal_index/1
        • rdf_tokenize_literal/2
        • rdf_stopgap_token/1
        • rdf_literal_index/2
      • rdf_ntriples.pl -- Process files in the RDF N-Triples format
      • sparql_client.pl -- SPARQL client library
      • rdf_http_plugin.pl -- RDF HTTP Plugin
      • rdf_turtle_write.pl -- Turtle - Terse RDF Triple Language writer
      • turtle.pl -- Turtle: Terse RDF Triple Language
      • rdf_library.pl -- RDF Library Manager
      • rdf_turtle.pl -- Turtle reader
      • rdf_cache.pl -- Cache RDF triples
      • rdf_sandbox.pl -- Declare RDF API sandbox-safe
      • rdf_zlib_plugin.pl -- RDF compressed-data plugin
 rdf_find_literal(+Spec, -Literal) is nondet
 rdf_find_literals(+Spec, -Literals) is det
Find literals in the RDF database matching Spec. Spec is defined as:
Spec ::= and(Spec,Spec)
Spec ::= or(Spec,Spec)
Spec ::= not(Spec)
Spec ::= sounds(Like)
Spec ::= stem(Like)             % same as stem(Like, en)
Spec ::= stem(Like, Lang)
Spec ::= prefix(Prefix)
Spec ::= between(Low, High)     % Numerical between
Spec ::= ge(High)               % Numerical greater-equal
Spec ::= le(Low)                % Numerical less-equal
Spec ::= Token

sounds(Like) and stem(Like) both map to a disjunction. First we compile the spec to normal form: a disjunction of conjunctions on elementary tokens. Then we execute all the conjunctions and generate the union using ordered-set algorithms.

Stopgaps are ignored. If the final result is only a stopgap, the predicate fails.

To be done
- Exploit ordering of numbers and allow for > N, < N, etc.
ClioPatria (version V3.1.1-51-ga0b30a5)