Exemplo n.º 1
0
        internal IEnumerable <MappingControl <T> > FindMapping(ParsedUtterance parsedSentence)
        {
            var result = new List <MappingControl <T> >();

            foreach (var pair in Mapping)
            {
                var similarity = getSimilarity(pair.Key, parsedSentence);

                var control = new MappingControl <T>(similarity.Item1, similarity.Item2, this, pair.Value, pair.Key);
                result.Add(control);
            }

            result.Sort((a, b) => b.Score.CompareTo(a.Score));

            return(result);
        }
Exemplo n.º 2
0
 public PoolHypothesis(NodesSubstitution substitutions, MappingControl <ActionBlock> control)
 {
     Substitutions = substitutions;
     ActionBlock   = control.Value;
     Control       = control;
 }