コード例 #1
0
	public static void Main() {
		modshogun.init_shogun_with_defaults();
		string [] strings = new string[6] { "hey","guys","i","am","a","string"};
		StringCharFeatures f = new StringCharFeatures(strings, EAlphabet.RAWBYTE);
		string [] r = f.get_features();
		foreach(string item in r) {
		  Console.WriteLine(item);
	  }

	}
コード例 #2
0
    internal static ArrayList run(string[] strs)
    {
        modshogun.init_shogun_with_defaults();
        StringCharFeatures f = new StringCharFeatures(strings, RAWBYTE);
        f.set_feature_vector(new DoubleMatrix(new double[][] {{'t','e','s','t'}}), 0);

        ArrayList result = new ArrayList();
        result.Add(f.get_features());
        result.Add(f);

        modshogun.exit_shogun();
        return result;
    }
コード例 #3
0
    public static void Main()
    {
        modshogun.init_shogun_with_defaults();
        string [] strings = new string[6] {
            "hey", "guys", "i", "am", "a", "string"
        };
        StringCharFeatures f = new StringCharFeatures(strings, EAlphabet.RAWBYTE);

        string [] r = f.get_features();
        foreach (string item in r)
        {
            Console.WriteLine(item);
        }
    }
コード例 #4
0
    internal static ArrayList run(string filename)
    {
        modshogun.init_shogun_with_defaults();
        StringCharFeatures f = new StringCharFeatures(RAWBYTE);
        f.load_from_directory(".");

        AsciiFile fil = new AsciiFile(fname);
        f.load(fil);

        ArrayList result = new ArrayList();
        result.Add(f.get_features());
        result.Add(f);

        modshogun.exit_shogun();
        return result;
    }