4.5 library(semweb/rdf_litindex): Indexing words in literals
AllApplicationManualNameSummaryHelp

  • Documentation
    • Reference manual
    • Packages
      • SWI-Prolog Semantic Web Library 3.0
        • Plugin modules for rdf_db
          • library(semweb/rdf_litindex): Indexing words in literals
            • rdf_find_literals/2
            • rdf_token_expansions/2
            • rdf_tokenize_literal/2
            • Literal maps: Creating additional indices on literals
Availability::- use_module(library(semweb/rdf_litindex)).
Sourcerdf_find_literals(+Spec, -ListOfLiterals)
Find literals (without type or language specification) that satisfy Spec. The required indices are created as needed and kept up-to-date using hooks registered with rdf_monitor/2. Numerical indexing is currently limited to integers in the range ±2^30 (±2^62 on 64-bit platforms). Spec is defined as:
and(Spec1, Spec2)
Intersection of both specifications.
or(Spec1, Spec2)
Union of both specifications.
not(Spec)
Negation of Spec. After translation of the full specification to Disjunctive Normal Form (DNF), negations are only allowed inside a conjunction with at least one positive literal.
case(Word)
Matches all literals containing the word Word, doing the match case insensitive and after removing diacritics.
stem(Like)
Matches all literals containing at least one word that has the same stem as Like using the Porter stem algorithm. See NLP package for details.
sounds(Like)
Matches all literals containing at least one word that‘sounds like' Like using the double metaphone algorithm. See NLP package for details.
prefix(Prefix)
Matches all literals containing at least one word that starts with Prefix, discarding diacritics and case.
between(Low, High)
Matches all literals containing an integer token in the range Low..High, including the boundaries.
ge(Low)
Matches all literals containing an integer token with value Low or higher.
le(High)
Matches all literals containing an integer token with value High or lower.
Token
Matches all literals containing the given token. See tokenize_atom/2 of the NLP package for details.