LoginSignup
0
0

More than 3 years have passed since last update.

dbpediaの研究 その23

Posted at

概要

dbpediaが難解なので、手出してみる。
c#で、取得してみた。

サンプルコード

public class Hello {
    public static void Main() {
        string url = "http://ja.dbpedia.org/sparql";
        System.Net.WebClient wc = new System.Net.WebClient();
        System.Collections.Specialized.NameValueCollection ps = new System.Collections.Specialized.NameValueCollection();
        ps.Add("query", "SELECT DISTINCT * WHERE { dbpedia-ja:デ・トマソ dbpedia-owl:abstract ?abstract .}");
        byte[] resData = wc.UploadValues(url, ps);
        wc.Dispose();
        string resText = System.Text.Encoding.UTF8.GetString(resData);
        System.Console.WriteLine(resText);
        System.Console.WriteLine("Hello C#");
    }
}

成果物

以上。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0