Tabnine Logo
ICodingAnnotationStudy.getCategoryCount
Code IndexAdd Tabnine to your IDE (free)

How to use
getCategoryCount
method
in
de.tudarmstadt.ukp.dkpro.statistics.agreement.coding.ICodingAnnotationStudy

Best Java code snippets using de.tudarmstadt.ukp.dkpro.statistics.agreement.coding.ICodingAnnotationStudy.getCategoryCount (Showing top 7 results out of 315)

origin: de.tudarmstadt.ukp.dkpro.statistics/dkpro-statistics-agreement

/** Calculates the expected inter-rater agreement that assumes a 
 *  uniform distribution over all raters and annotations. 
 *  @throws NullPointerException if the annotation study is null. 
 *  @throws ArithmeticException if there are no annotation categories. */
@Override
public double calculateExpectedAgreement() {
  return 1.0 / (double) study.getCategoryCount();
}
 
origin: de.tudarmstadt.ukp.dkpro.statistics/dkpro-statistics-agreement

/** Calculates the expected inter-rater agreement that assumes a 
 *  uniform distribution over all raters and annotations. 
 *  @throws NullPointerException if the annotation study is null. 
 *  @throws ArithmeticException if there are no annotation categories. */
public double calculateExpectedAgreement() {
  return 1.0 / (double) study.getCategoryCount();
}
 
origin: de.tudarmstadt.ukp.dkpro.statistics/dkpro-statistics-agreement

double[] sums = new double[study.getCategoryCount()]; 
for (Object category1 : study.getCategories()) {
  Map<Object, Double> c1 = coincidence.get(category1);
origin: de.tudarmstadt.ukp.dkpro.statistics/dkpro-statistics-agreement

  categories.put(cat, categories.size());
int[][] frequencies = new int[study.getCategoryCount()][study.getCategoryCount()];
for (ICodingAnnotationItem item : study.getItems()) { 
  int cat1 = categories.get(item.getUnit(0).getCategory());
out.println();
int i = 0;
int[] colSum = new int[study.getCategoryCount()];
for (Object category1 : categories.keySet()) {
  out.print(category1);
origin: webanno/webanno

public static void dumpStudy(PrintStream aOut, ICodingAnnotationStudy aStudy)
{
  try {
    aOut.printf("Category count: %d%n", aStudy.getCategoryCount());
  }
  catch (Throwable e) {
    aOut.printf("Category count: %s%n", ExceptionUtils.getRootCauseMessage(e));
  }
  try {
    aOut.printf("Item count: %d%n", aStudy.getItemCount());
  }
  catch (Throwable e) {
    aOut.printf("Item count: %s%n", ExceptionUtils.getRootCauseMessage(e));
  }
  
  for (ICodingAnnotationItem item : aStudy.getItems()) {
    StringBuilder sb = new StringBuilder();
    for (IAnnotationUnit unit : item.getUnits()) {
      if (sb.length() > 0) {
        sb.append(" \t");
      }
      sb.append(unit.getCategory());
    }
    aOut.println(sb);
  }
}
origin: webanno/webanno

public static void dumpAgreementStudy(PrintStream aOut, AgreementResult aAgreement)
{
  try {
    aOut.printf("Category count: %d%n", aAgreement.getStudy().getCategoryCount());
  }
  catch (Throwable e) {
    aOut.printf("Category count: %s%n", ExceptionUtils.getRootCauseMessage(e));
  }
  try {
    aOut.printf("Item count: %d%n", aAgreement.getStudy().getItemCount());
  }
  catch (Throwable e) {
    aOut.printf("Item count: %s%n", ExceptionUtils.getRootCauseMessage(e));
  }
  aOut.printf("Relevant position count: %d%n", aAgreement.getRelevantSetCount());
  aOut.printf("%n== Complete sets: %d ==%n", aAgreement.getCompleteSets().size());
  dumpAgreementConfigurationSetsWithItems(aOut, aAgreement, aAgreement.getCompleteSets());
  
  aOut.printf("%n== Incomplete sets (by position): %d == %n",
      aAgreement.getIncompleteSetsByPosition().size());
  dumpAgreementConfigurationSets(aOut, aAgreement, aAgreement.getIncompleteSetsByPosition());
  aOut.printf("%n== Incomplete sets (by label): %d ==%n",
      aAgreement.getIncompleteSetsByLabel().size());
  dumpAgreementConfigurationSets(aOut, aAgreement, aAgreement.getIncompleteSetsByLabel());
  aOut.printf("%n== Plurality sets: %d ==%n", aAgreement.getPluralitySets().size());
  dumpAgreementConfigurationSets(aOut, aAgreement, aAgreement.getPluralitySets());
}

origin: webanno/webanno

.getCategoryCount()));
de.tudarmstadt.ukp.dkpro.statistics.agreement.codingICodingAnnotationStudygetCategoryCount

Popular methods of ICodingAnnotationStudy

  • getItemCount
    Returns the number of annotation items defined by the study.
  • getItems
    Allows iterating all annotation items of this study.
  • getCategories
  • getItem
    Returns the annotation item with the given index. The first item has index 0.
  • getRaterCount
  • hasMissingValues
    Returns true if, and only if, the annotation study contains at least one item with a missing value (

Popular in Java

  • Reading from database using SQL prepared statement
  • onCreateOptionsMenu (Activity)
  • scheduleAtFixedRate (Timer)
  • requestLocationUpdates (LocationManager)
  • RandomAccessFile (java.io)
    Allows reading from and writing to a file in a random-access manner. This is different from the uni-
  • Thread (java.lang)
    A thread is a thread of execution in a program. The Java Virtual Machine allows an application to ha
  • Collection (java.util)
    Collection is the root of the collection hierarchy. It defines operations on data collections and t
  • Dictionary (java.util)
    Note: Do not use this class since it is obsolete. Please use the Map interface for new implementatio
  • NoSuchElementException (java.util)
    Thrown when trying to retrieve an element past the end of an Enumeration or Iterator.
  • Base64 (org.apache.commons.codec.binary)
    Provides Base64 encoding and decoding as defined by RFC 2045.This class implements section 6.8. Base
  • Top plugins for Android Studio
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now