jinput-sharp is Google CGI API for Japanese Input client written in C#.
Google CGI API for Japanese Input returns JSON style array for conversion candidates of inputted japanese hiragana.
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<appSettings>
<add key="ApiUrl" value="http://www.google.com/transliterate?langpair=ja-Hira|ja&text=" />
</appSettings>
</configuration>
using JinputSharp;
using System;
public class Program
{
public static void Main(string[] args)
{
Console.WriteLine("ひらがな".ToKanji());
}
}
new Jinput().Convert("ひらがな");
new Jinput().ConvertToDecoded("ひらがな");
new Jinput().ConvertToJArray("ひらがな");
jinput-sharp uses Json.NET.
$ unzip Json35r8.zip
$ cd Bin/DotNet/
$ sudo gacutil -i Newtonsoft.Json.dll -package 2.0
Package exported to: /usr/lib/mono/2.0/Newtonsoft.Json.dll -> ../gac/Newtonsoft.Json/3.5.0.0__30ad4fe6b2a6aeed/Newtonsoft.Json.dll
Installed Newtonsoft.Json.dll into the gac (/usr/lib/mono/gac)
Name: Json.NET
Description: Json.NET - Json.NET is a popular high-performance JSON framework for .NET
Version: 3.5.0.0
Libs: -r:/usr/lib/mono/gac/Newtonsoft.Json/3.5.0.0__30ad4fe6b2a6aeed/Newtonsoft.Json.dll
$ sudo cp Newtonsoft.Json_3.5.pc /usr/lib/pkgconfig
Copyright © 2012 sta.blockhead
Licensed under the MIT License.