【发布时间】:2015-12-29 19:47:43
【问题描述】:
我正在寻找比较两个对象列表;了解语料库的语言。参考列表由 txt 构建。语料库也一样。
列出参考/列出语料库
public Canagram(string anagram, int frequency,int percentage)
{
anagram = Anagram; // exemple "a"
frequency = Frequency; // how many "a" in the txt
percentage = Percentage; // what's the percentage compared to the other anagram
}
目标是将每个列表上的每个字谜与百分比匹配,并返回这两个列表之间的全局百分比匹配。
public static int percentage(List<Canagram> reference, List<Canagram> corpus)
{
//don"t know how to compare this two list properly and return % match
return (int) percentage of match;
}
谢谢!
【问题讨论】:
-
你到底在比较什么?你是在比较
anagram还是anagram*frequency,还是...? -
我想比较语料库的所有字谜(如果它在参考列表中)并比较这个字谜的百分比,以便以后知道这个语料库中使用了哪种语言。例如,我从 french.txt/spanish.txt/english.txt 得到列表字谜 -> 我想通过将他的字谜列表与其他字谜列表进行比较来了解 text.txt 的语言
标签: c# list compare percentage listobject