<commit_before>SparqlClient = require 'sparql-client'
endpoint = 'http://dbpedia.org/sparql'
#query = "SELECT * FROM <http://dbpedia.org> WHERE "<commit_msg>need to finish translate dbpedia example into coffeescript<commit_after>SparqlClient = require 'sparql-client'
endpoint = 'http://dbpedia.org/sparql'

module.exports  = (query) ->
    client = new SparqlClient(endpoint)
    console.log "Query to " + endpoint
    console.log "Query: " + query
    client.query(query)
    # rest of the javascript on the github example
    #https://github.com/thomasfr/node-sparql-client
    #    .bind('city', '<http://dbpedia.org/resource/Vienna>')
    #.execute(function(error, results) {
    #process.stdout.write(util.inspect(arguments, null, 20, true)+"\n");
    #});
{'fraction_non_alphanumeric': 0.15223097112860892, 'fraction_numerical': 0.0026246719160104987, 'mean_word_length': 4.086666666666667, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 6, 'https://': 1, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, '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': '5301631', 'n_tokens_mistral': 260, 'n_tokens_neox': 252, 'n_words': 52}