c# API 使用 wordnet-什么更好?

发布于 2024-09-19 16:38:58 字数 300 浏览 2 评论 0原文

我正在做一个基于网络的聊天机器人系统,我的问题是这些。

  • 我需要获取特定的用户问题并检查其中的某些特定关键字(例如名词)并查找同义词以及拼写检查?

那么 wordnet 的最佳 C# API 是什么? 好吧,我想做的是从文本框中获取一个句子,并将其用于同义词和拼写检查,wrodnet 网站上有 C# ASP 和独立应用程序 API。最好的方法是什么?

我可以使用 wordnet 和其他 C# API 进行拼写检查和同义词检查吗?

如果您能给我一些解决方案,我将不胜感激。

多谢。

I am doing a web based chattebot system and my problems are these.

  • I need to get a particular user question and check for some specific keywords in it(for example take the nouns) and find for synonyms and well as do the spell check?

Therefore What is the best C# API for wordnet??
Well what I want to do is get a sentence from a textbox and use it for synonym and spell check and there is both c# ASP and standalone app APIs on the wrodnet site.What is the best way?

Can I do both spell check and synonym check using wordnet and the other c# API??

I would be grateful if you could give me some solutions.

Thanks a lot.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

未蓝澄海的烟 2024-09-26 16:38:58

如果可以的话,我会使用 WPF 内置的拼写检查器,只需在 ASP.NET 项目中添加对 PresentationFramework 的引用,您就可以以编程方式创建一个 WPF 文本框以用于拼写检查等。

    List<string> getSuggestions(string text)
    {
        System.Windows.Controls.TextBox wpfTextBox = new System.Windows.Controls.TextBox();
        wpfTextBox.AcceptsReturn = true;
        wpfTextBox.AcceptsTab = true;
        wpfTextBox.SpellCheck.IsEnabled = true;
        wpfTextBox.Text = text;

        int index = 0;
        List<string> suggestions = new List<string>();

        while ((index = wpfTextBox.GetNextSpellingErrorCharacterIndex(index, System.Windows.Documents.LogicalDirection.Forward)) != -1)
        {
            string currentError = wpfTextBox.Text.Substring(index, wpfTextBox.GetSpellingErrorLength(index));
            suggestions.Add(currentError);

            foreach (string suggestion in wpfTextBox.GetSpellingError(index).Suggestions)
            {
                suggestions.Add(suggestion);
            }
        }
        return suggestions;
    }

If you can I would use the WPF built in spell checker, just add a reference to PresentationFramework in your ASP.NET project and you can programmatically create a WPF text box to use for spell check etc.

    List<string> getSuggestions(string text)
    {
        System.Windows.Controls.TextBox wpfTextBox = new System.Windows.Controls.TextBox();
        wpfTextBox.AcceptsReturn = true;
        wpfTextBox.AcceptsTab = true;
        wpfTextBox.SpellCheck.IsEnabled = true;
        wpfTextBox.Text = text;

        int index = 0;
        List<string> suggestions = new List<string>();

        while ((index = wpfTextBox.GetNextSpellingErrorCharacterIndex(index, System.Windows.Documents.LogicalDirection.Forward)) != -1)
        {
            string currentError = wpfTextBox.Text.Substring(index, wpfTextBox.GetSpellingErrorLength(index));
            suggestions.Add(currentError);

            foreach (string suggestion in wpfTextBox.GetSpellingError(index).Suggestions)
            {
                suggestions.Add(suggestion);
            }
        }
        return suggestions;
    }
零崎曲识 2024-09-26 16:38:58

此处列出的 API:http://wordnet.princeton.edu/wordnet/lated -projects/#.NET,
马特·格伯 (http://ptl.sys.virginia.edu/ ptl/members/matthew-gerber/software#WordNet_API )是最好的。

它不是一个很好的 API,但它工作得很好,并且对于我所需要的东西来说这是一个良好的开始。

我还没有尝试过 Proxem 的 Antelope,因为它看起来更像是一个重量级应用程序然后是一个简单的API。但它可能更加强大,并且解析引擎对于您正在做的事情可能非常有用

Of the API's listed here: http://wordnet.princeton.edu/wordnet/related-projects/#.NET,
Matt Gerber's ( http://ptl.sys.virginia.edu/ptl/members/matthew-gerber/software#WordNet_API ) is the best.

It's not a great API, but it works okay and it was a good start for what I needed.

I've also not tried Proxem's Antelope yet as it seemed more like a heavyweight app then a simple API. It may be much more robust though, and the parsing engine could be very useful for what you are doing.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文