質問

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.

役に立ちましたか?

解決

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

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

Or from Freebase.

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top