/// <summary> /// returns "count" of closest words for target representation /// </summary> public DistanceTo[] Distance(Representation representation, int maxCount) { return(representation.GetClosestFrom(Words.Where(v => v != representation), maxCount)); }
/// <summary> /// If wordA is wordB, then wordC is... /// Returns "count" of best fits for the result /// </summary> public DistanceTo[] Analogy(Representation wordA, Representation wordB, Representation wordC, int count) { var cummulative = wordB.Substract(wordA).Add(wordC); return(cummulative.GetClosestFrom(Words.Where(t => t != wordA && t != wordB && t != wordC), count)); }
public DistanceTo Distance(IEnumerable <Representation> representations, Representation B) { return(representations.Select(GetCosineDistanceTo) .Where(x => x.Representation == B) .First()); }
public DistanceTo Distance(Representation A, Representation B) { return(A.Distance(Words.Where(v => v != A), B)); }
public DistanceTo[] DistanceWithStartWithOut(Representation representation, int maxCount, string startWithout) { return(representation.GetClosestFromWithout(Words.Where(v => v != representation), maxCount, startWithout)); }
public DistanceTo(Representation representation, double distanceValue) { _representation = representation; _distanceValue = distanceValue; }
public LinkedDistance(Representation representation, TLinked linkedObject, double distance) { _distance = new DistanceTo(representation, distance); _linkedObject = linkedObject; }