0
我在C#下的visual studio 2012下使用NLP解析器。 NuGet安裝正常,可以編譯這個簡單的例子。 我注意到與模型加載器的一個問題:斯坦福詞法分析器負載模型錯誤
try
{
System.Console.WriteLine(System.IO.File.Exists(full) ? "File exists." : "File does not exist.");
LexicalizedParser lp = LexicalizedParser.loadModel(full);
lp.setOptionFlags(new String[] { "-maxLength", "80", "-retainTmpSubcategories" });
//if (!String.IsNullOrEmpty(fileName))
//DemoDP(lp, fileName);
//else
DemoAPI(lp);
}
catch (Exception e)
{
System.Console.WriteLine(e.Message);
throw e;
}
我得到某種讀文件格式錯誤:
C:\ NLPTest \ BIN \ 86 \調試\ englishPCFG.ser.gz:期待BEGIN塊;得到 ??
模型文件大約8 MB,但我對此模型文件的格式沒有任何線索。 是否有某處我可以下載的官方文件肯定會起作用?