Example #1
0
 List <Tuple <float, List <Captcha.Label> > > AddLabel(List <Tuple <float, List <Captcha.Label> > > ls, Captcha.Label label)
 {
     if (ls.Count == 0)
     {
         return(new List <Tuple <float, List <Captcha.Label> > >()
         {
             new Tuple <float, List <Captcha.Label> >(label.Prob, new List <Captcha.Label>()
             {
                 label
             })
         });
     }
     return(ls.Select(x =>
     {
         if (x.Item2.Last().Name == "eof")
         {
             return x;
         }
         return AddLabel(x, label);
     }).ToList());
 }
Example #2
0
        Tuple <float, List <Captcha.Label> > AddLabel(Tuple <float, List <Captcha.Label> > tp, Captcha.Label label)
        {
            var ls = tp.Item2.ToList();

            ls.Add(label);
            return(new Tuple <float, List <Captcha.Label> >(tp.Item1 * label.Prob, ls));
        }