1

I want to store serialized code and in what programming language this code is written as RDF. For example something like that:

@prefix : <http://example.org/mynnamespace#>.
@prefix dc: <http://purl.org/dc/elements/1.1/>.

:algorithm dc:format "application/javascript";
           :code """<script>alert('test');</script>""";
           :language <URI?>.

What would you suggest how to identify the programming language? Do you know any existing vocabulary? If not, what URI would you use for e.g. JavaScript, C#, Python...?

Thanks.

philsch
  • 1,004
  • 11
  • 19

1 Answers1

1

You could use the URIs from DBpedia (which uses Wikipedia as base):

 :language <http://dbpedia.org/resource/Python_(programming_language)>.

Or from Freebase.

unor
  • 92,415
  • 26
  • 211
  • 360