accurator/commit

Made field source api more robust.

authorChris Dijkshoorn
Mon Mar 28 20:48:58 2016 +0200
committerChris Dijkshoorn
Mon Mar 28 20:48:58 2016 +0200
commitd8a139149238eba7d4fbd532cbcada37f5d9db62
tree0571f4cd91e967221da279cb6ad42390276513ca
parentd89f787bd3c33c97d2adcf9578a635ae5f68f235
Diff style: patch stat
diff --git a/lib/accurator/annotation.pl b/lib/accurator/annotation.pl
index 60fe9d1..a66f639 100644
--- a/lib/accurator/annotation.pl
+++ b/lib/accurator/annotation.pl
@@ -114,7 +114,8 @@ get_source(Uri, _Locale, Source) :-
 
 extract_literal(Locale, literal(lang(Locale, Literal)), Literal) :- !.
 extract_literal(_Locale, literal(lang(en, Literal)), Literal) :- !.
-extract_literal(_Locale, literal(Literal), Literal) :- !.
+extract_literal(_Locale, literal(Literal), Literal) :-
+	atom(Literal), !. % check if not lang(Literal)
 
 %%	annotations(+Type, +Uri, -Metadata)
 %