询问者
WPF 手动识别汉字调用IACore.dll报错,求指导!

问题
-
捣鼓了一上午也捣鼓出来,不知道怎么解决,哪位大神会呢,指导下。
/// <summary>
/// 识别
/// </summary>
/// <param name="strokes">笔迹集合</param>
/// <returns>候选词数组</returns>
public string[] Recognize(StrokeCollection strokes)
{
if (strokes == null || strokes.Count == 0)
return Constants.EmptyAlternates;
var analyzer = new InkAnalyzer();
analyzer.AddStrokes(strokes, Constants.ChsLanguageId);
analyzer.SetStrokesType(strokes, StrokeType.Writing);
var status = analyzer.Analyze();---------这里报错了
if (status.Successful)
{
return analyzer.GetAlternates()
.OfType<AnalysisAlternate>()
.Select(x => x.RecognizedString)
.ToArray();
}
analyzer.Dispose();
return Constants.EmptyAlternates;
}