如何从文档中提取relavent关键字 [英] how to extract relavent keyword from documents

查看:214
本文介绍了如何从文档中提取relavent关键字的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们如何从具有高价值和内容价值的文档中提取最相关的关键字。 PLZ建议从哪里可以获得它在asp.net中的代码

how we can extract the most relavent keywords from a document which have high querry value and content value. plz suggest from where i can get its sorce code in asp.net

推荐答案

您可以搜索关键字。关键字仍然只是一个单词,您可以在文件内(或在长字符串内)搜索。然后你可以简单地获取文档的内容,你有一个字符串。并在其上执行字符串函数以在其中查找数据。



例如,如果您要查找单词的完全匹配,可以编写此代码,



You can search for a keyword. A keyword is still just a word, that you can search for inside the file (or inside a long string). Then you can simply just get the content of the document, you're having as a string. And perform string functions over it to find your data in it.

For example, if you're going to find an exact match of a word you can write this code,

string data = "This is your data";
string word = "word";

if(data.IndexOf(word) != -1) {
  // The word is found in the string
}





..或者因为IndexOf返回一个整数值,你也可以用字符串的单词得到这个单词的索引。还有很多其他选项,可以在ASP.NET中使用C#在一串数据中查找单词。



.. or since IndexOf returns an integer value, you can also get the index of this word in the words of string too. Quite multiple other options too, to seach for a word inside a string of data using C# in ASP.NET.


这篇关于如何从文档中提取relavent关键字的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆