Package edu.stanford.nlp.util

Examples of edu.stanford.nlp.util.Pair.second()


      System.out.println("Sorted descending support * KL");
      Collections.sort(answers, (o1, o2) -> {
        Pair p1 = (Pair) o1;
        Pair p2 = (Pair) o2;
        Double p12 = (Double) p1.second();
        Double p22 = (Double) p2.second();
        return p22.compareTo(p12);
      });
      for (int i = 0, size = answers.size(); i < size; i++) {
        Pair p = (Pair) answers.get(i);
        double psd = ((Double) p.second()).doubleValue();
View Full Code Here


        Double p22 = (Double) p2.second();
        return p22.compareTo(p12);
      });
      for (int i = 0, size = answers.size(); i < size; i++) {
        Pair p = (Pair) answers.get(i);
        double psd = ((Double) p.second()).doubleValue();
        System.out.println(p.first() + ": " + nf.format(psd));
        if (psd >= CUTOFFS[0]) {
          String annotatedLabel = (String) p.first();
          for (int j = 0; j < CUTOFFS.length; j++) {
            if (psd >= CUTOFFS[j]) {
View Full Code Here

    Collections.sort(topScores, (o1, o2) -> {
      Pair p1 = (Pair) o1;
      Pair p2 = (Pair) o2;
      Double p12 = (Double) p1.second();
      Double p22 = (Double) p2.second();
      return p22.compareTo(p12);
    });
    String outString = "All enriched categories, sorted by score\n";
    for (int i = 0, size = topScores.size(); i < size; i++) {
      Pair p = (Pair) topScores.get(i);
View Full Code Here

      return p22.compareTo(p12);
    });
    String outString = "All enriched categories, sorted by score\n";
    for (int i = 0, size = topScores.size(); i < size; i++) {
      Pair p = (Pair) topScores.get(i);
      double psd = ((Double) p.second()).doubleValue();
      System.out.println(p.first() + ": " + nf.format(psd));
    }


    System.out.println();
View Full Code Here

    System.out.println();
    System.out.println("  // Automatically generated by SisterAnnotationStats -- preferably don't edit");
    int k = CUTOFFS.length - 1;
    for (int j = 0; j < topScores.size(); j++) {
      Pair p = (Pair) topScores.get(j);
      double psd = ((Double) p.second()).doubleValue();
      if (psd < CUTOFFS[k]) {
        if (k == 0) {
          break;
        } else {
          k--;
View Full Code Here

      System.out.println("----");
      System.out.println("Sorted descending support * KL");
      Collections.sort(answers, (o1, o2) -> o2.second().compareTo(o1.second()));
      for (int i = 0, size = answers.size(); i < size; i++) {
        Pair p = (Pair) answers.get(i);
        double psd = ((Double) p.second()).doubleValue();
        System.out.println(p.first() + ": " + nf.format(psd));
        if (psd >= CUTOFFS[0]) {
          List lst = (List) p.first();
          String nd = (String) lst.get(0);
          String par = (String) lst.get(1);
View Full Code Here

      System.out.println("----");
      System.out.println("Sorted descending support * KL");
      Collections.sort(answers, (o1, o2) -> o2.second().compareTo(o1.second()));
      for (int i = 0, size = answers.size(); i < size; i++) {
        Pair p = (Pair) answers.get(i);
        double psd = ((Double) p.second()).doubleValue();
        System.out.println(p.first() + ": " + nf.format(psd));
        if (psd >= CUTOFFS[0]) {
          List lst = (List) p.first();
          String nd = (String) lst.get(0);
          String par = (String) lst.get(1);
View Full Code Here

        }
      }
      Collections.sort(answers, (o1, o2) -> o2.second().compareTo(o1.second()));
      for (int i = 0, size = answers.size(); i < size; i++) {
        Pair p = (Pair) answers.get(i);
        double psd = ((Double) p.second()).doubleValue();
        if (psd >= cutOff) {
          List lst = (List) p.first();
          String nd = (String) lst.get(0);
          String par = (String) lst.get(1);
          String gpar = (String) lst.get(2);
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.