예제 #1
0
파일: Program.cs 프로젝트: davidsoloman/S4
 static void Main(string[] args)
 {
     S4ServiceClient s4 = new S4ServiceClient(ServiceCatalog.getItem("news"), "<api-key>", "<api-pass>");
      //   System.Console.Write(s4.annotateDocumentFromUrl(new Uri("http://www.bbc.com/news/uk-politics-29784493"), SupportedMimeType.HTML).text);
     Stream st = s4.annotateDocumentAsStream("We will always remember the courage of those who served on our behalf.", SupportedMimeType.PLAINTEXT, ResponseFormat.GATE_XML);
     StreamReader str = new StreamReader(st);
     Console.WriteLine(str.ReadToEnd());
     Console.Read();
 }
예제 #2
0
        static void Main(string[] args)
        {
            S4ServiceClient s4 = new S4ServiceClient(ServiceCatalog.getItem("news"), "<api-key>", "<api-pass>");
            //   System.Console.Write(s4.annotateDocumentFromUrl(new Uri("http://www.bbc.com/news/uk-politics-29784493"), SupportedMimeType.HTML).text);
            Stream       st  = s4.annotateDocumentAsStream("We will always remember the courage of those who served on our behalf.", SupportedMimeType.PLAINTEXT, ResponseFormat.GATE_XML);
            StreamReader str = new StreamReader(st);

            Console.WriteLine(str.ReadToEnd());
            Console.Read();
        }