示例#1
0
                protected BaseCorpus(string name)
                {
                    CorpusName = name;

                    Py.ExecuteScript($"from nltk.corpus import {name}");
                    CorpusObj = Py.GetVariable(name);
                }
示例#2
0
            public static NltkResultTupleStrStr Str2Tuple(string str)
            {
                var str2tuple = Py.GetVariable("str2tuple");

                var result = str2tuple(str);

                return(new NltkResultTupleStrStr()
                {
                    AsPython = result,
                    AsNet = ValueTuple.Create((string)result[0], (string)result[1])
                });
            }