<commit_before>:- module(
  rdf_image,
  [
    rdf_image/3, % ?Subject, ?Predicate, ?Object
    rdf_image/4 %?Subject:or([bnode,iri])
                % ?Predicate:iri
                % ?Image:iri
                % ?Graph:atom
  ]
).

/** <module> RDF image

@author <NAME>
@version 2015/07-2015/08
*/

:- use_module(library(owl/owl_read)).
:- use_module(library(rdf/rdf_prefix)).
:- use_module(library(rdf/rdf_read)).
:- use_module(library(rdfs/rdfs_read)).

:- rdf_register_prefix(dbo, 'http://dbpedia.org/ontology/').
:- rdf_register_prefix(dcmit, 'http://purl.org/dc/dcmitype/').
:- rdf_register_prefix(foaf, 'http://xmlns.com/foaf/0.1/').

:- rdf_meta(rdf_image(r,r,o)).
:- rdf_meta(rdf_image(r,r,o,?)).





%! rdf_image(?Subject:or([bnode,iri]), ?Predicate:iri, ?Image:iri) is nondet.

rdf_image(S, P, O):-
  rdf_image(S, P, O, _).


%! rdf_image(
%!   ?Subject:or([bnode,iri]),
%!   ?Predicate:iri,
%!   ?Image:iri,
%!   ?Graph:atom
%! ) is nondet.

rdf_image(S, P, O, G):-
  owl_id(S, S0),
  (   rdf_member(P, [dbo:thumbnail,foaf:depiction]),
      rdf2(S0, P, O, G)
  ;   rdf2(S0, P, O, G),
      rdfs_instance(O, dcmit:'Image')
  ).
<commit_msg>FIXED: Missing module import.<commit_after>:- module(
  rdf_image,
  [
    rdf_image/3, % ?Subject, ?Predicate, ?Object
    rdf_image/4 %?Subject:or([bnode,iri])
                % ?Predicate:iri
                % ?Image:iri
                % ?Graph:atom
  ]
).

/** <module> RDF image

@author <NAME>
@version 2015/07-2015/08
*/

:- use_module(library(owl/owl_read)).
:- use_module(library(rdf/rdf_prefix)).
:- use_module(library(rdf/rdf_read)).
:- use_module(library(rdfs/rdfs_read)).
:- use_module(library(semweb/rdf_db)).

:- rdf_register_prefix(dbo, 'http://dbpedia.org/ontology/').
:- rdf_register_prefix(dcmit, 'http://purl.org/dc/dcmitype/').
:- rdf_register_prefix(foaf, 'http://xmlns.com/foaf/0.1/').

:- rdf_meta(rdf_image(r,r,o)).
:- rdf_meta(rdf_image(r,r,o,?)).





%! rdf_image(?Subject:or([bnode,iri]), ?Predicate:iri, ?Image:iri) is nondet.

rdf_image(S, P, O):-
  rdf_image(S, P, O, _).


%! rdf_image(
%!   ?Subject:or([bnode,iri]),
%!   ?Predicate:iri,
%!   ?Image:iri,
%!   ?Graph:atom
%! ) is nondet.

rdf_image(S, P, O, G):-
  owl_id(S, S0),
  (   rdf_member(P, [dbo:thumbnail,foaf:depiction]),
      rdf2(S0, P, O, G)
  ;   rdf2(S0, P, O, G),
      rdfs_instance(O, dcmit:'Image')
  ).

{'fraction_non_alphanumeric': 0.2156448202959831, 'fraction_numerical': 0.017758985200845664, 'mean_word_length': 3.4307116104868913, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 2}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '777107', 'n_tokens_mistral': 1109, 'n_tokens_neox': 1059, 'n_words': 138}