SWI-Prolog Did You Know Did you know? there's a simplex library Search Documentation:
Predicate rdf_find_literal_map/3