Ejemplo n.º 1
0
        public static void Main(string[] args)
        {
            Pattern p = Pattern.Compile("^([^:]*):(.*)$");
            ICollection <string> guesses = Arrays.AsList(new string[] { "S:a", "S:b", "VP:c", "VP:d", "S:a" });
            ICollection <string> golds   = Arrays.AsList(new string[] { "S:a", "S:b", "S:b", "VP:d", "VP:a" });

            EquivalenceClassEval.IEqualityChecker <string> e  = null;
            IEquivalenceClasser <string, string>           eq = null;

            Edu.Stanford.Nlp.Stats.EquivalenceClassEval <string, string> eval = new Edu.Stanford.Nlp.Stats.EquivalenceClassEval <string, string>(eq, e, "testing");
            eval.SetBagEval(false);
            eval.Eval(guesses, golds);
            eval.DisplayLast();
            eval.Display();
        }
Ejemplo n.º 2
0
 public CollectionContainsChecker(EquivalenceClassEval.IEqualityChecker <T> e)
 {
     /* a filter that returns true iff the object is a collection that contains currentItem */
     this.e = e;
 }
Ejemplo n.º 3
0
 public Eval(bool bagEval, EquivalenceClassEval.IEqualityChecker <T> e)
 {
     checker      = new EquivalenceClassEval.Eval.CollectionContainsChecker <T>(e);
     this.bagEval = bagEval;
 }
Ejemplo n.º 4
0
 public Eval(EquivalenceClassEval.IEqualityChecker <T> e)
     : this(false, e)
 {
 }
Ejemplo n.º 5
0
 /// <summary>
 /// Specifies an EquivalenceClassEval using the Eval.EqualityChecker argument as equality criterion
 /// and grouping all items according to the EquivalenceClasser argument.
 /// </summary>
 public EquivalenceClassEval(IEquivalenceClasser <IN, OUT> eq, EquivalenceClassEval.IEqualityChecker <In> e, string summaryName)
     : this(eq, new EquivalenceClassEval.Eval.CollectionContainsChecker <In>(e), summaryName)
 {
 }
Ejemplo n.º 6
0
 /// <summary>
 /// Specifies an EquivalenceClassEval using the Eval.EqualityChecker argument as equality criterion
 /// and grouping all items according to the EquivalenceClasser argument.
 /// </summary>
 public EquivalenceClassEval(IEquivalenceClasser <IN, OUT> eq, EquivalenceClassEval.IEqualityChecker <In> e)
     : this(eq, e, string.Empty)
 {
 }
Ejemplo n.º 7
0
 /// <summary>
 /// Specifies an EquivalenceClassEval using the Eval.EqualityChecker argument as equality criterion
 /// and grouping all items into a single equivalence class for reporting statistics.
 /// </summary>
 public EquivalenceClassEval(EquivalenceClassEval.IEqualityChecker <In> e)
     : this(Edu.Stanford.Nlp.Stats.EquivalenceClassEval.NullEquivalenceClasser <IN, OUT>(), e)
 {
 }