是否有任何库或算法可以自动检测文本中的标签(忽略所选语言的常用词)?
像这样:
string[] keywords = GetKeyword("Your order is num #0123456789")
和关键字[] 将包含“order”和“#0123456789”......? 它存在吗?还是用户一直自己选择每个文档的所有标签? :?
最佳答案
foreach(string keyword in keywords) { // where keywords is a List<string>
if ("Your order is num #0123456789".Contains(keyword)) {
keywordsPresent.Add(keyword); // where keywordsPresent is a List<string>
}
}
return keywordsPresent;
上面的内容不适合你的#0123456789,因为它添加了更多逻辑来查找#或其他东西的索引......
关于c# - 自动检测文本中的标签,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9734329/