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

                    Py.ExecuteScript($"from nltk.corpus import {name}");
                    CorpusObj = Py.GetVariable(name);
                }
示例#2
0
 public ConditionalFreqDist(string pythonExpresion)
 {
     if (pythonExpresion != null)
     {
         dynamic expr = Py.ExecuteScript(pythonExpresion);
         PyObject = CreateNltkObject(nameof(ConditionalFreqDist), expr);
     }
 }
示例#3
0
 static Tag()
 {
     Py.ImportModule("nltk.tag");
     Py.ExecuteScript($"from nltk.tag import str2tuple");
 }