【发布时间】:2016-11-15 12:20:18
【问题描述】:
我正在尝试在我的术语集合中查找搜索词。
术语集合数组:
[0] "windows"
[1] "dual sim"
[2] "32 gb"
[3] "Intel i5"
现在我搜索以下术语
search term= "32 gb" return -> 2 (position of array)
search term ="android 32 gb" return -> 2 (position of array)
search term ="android mobile 32 gb" return -> 2 (position of array)
search term= "32 GB" return -> 2 (position of array)
search term= "32gb" return -> not match
search term= "dual sim 32" return -> 1 (position of array)
那么如何在 C# .net 中做到这一点 任何搜索库或搜索词典都可以提供此功能吗
请提供相同的建议/建议
谢谢!
【问题讨论】:
-
你想在哪个位置,在数组中找到搜索词?
-
你能分享一下你的代码吗?
-
当“搜索词”为“windows 32 gb”时应该返回什么?这里的规范似乎非常含糊,当然没有任何形式的minimal reproducible example,不清楚您已经尝试过什么以及解决此问题的具体困难是什么。
-
@sami :-yes 在数组中找到的搜索词
-
如果您根本没有任何代码,也就是说,如果您甚至懒得尝试解决方案 - 任何解决方案 - 您不应该在此处发布!
标签: c# dictionary levenshtein-distance fuzzy-search