//N is the number of closest words that will be shown public List <Result> Distance(string[] termList, int N = 40) { List <TermOP> termOPList = new List <TermOP>(); foreach (string term in termList) { TermOP termOP = new TermOP(); termOP.strTerm = term; termOP.operation = TermOperation.ADD; termOPList.Add(termOP); } return(Distance(termOPList, N)); }
private List <TermOP> GenerateTermOP(string[] termList) { List <TermOP> termOPList = new List <TermOP>(); foreach (string term in termList) { TermOP termOP = new TermOP(); termOP.strTerm = term; termOP.operation = TermOperation.ADD; termOPList.Add(termOP); } return(termOPList); }
public double[] ToVector(string[] termList, int N = 40) { List <TermOP> termOPList = new List <TermOP>(); foreach (string term in termList) { TermOP termOP = new TermOP(); termOP.strTerm = term; termOP.operation = TermOperation.ADD; termOPList.Add(termOP); } double[] vec = GetVector(termOPList); return(vec); }