<code>
.google.cloud.datalabeling.v1beta1.LabelTextClassificationOperationMetadata text_classification_details = 9;
</code>
503078
public com.google.cloud.datalabeling.v1beta1.LabelTextClassificationOperationMetadataOrBuilder
      getTextClassificationDetailsOrBuilder() {
    if (detailsCase_ == 9) {
      return (com.google.cloud.datalabeling.v1beta1.LabelTextClassificationOperationMetadata)
          details_;
    }
    return com.google.cloud.datalabeling.v1beta1.LabelTextClassificationOperationMetadata
        .getDefaultInstance();
  }
418268
public com.google.cloud.datalabeling.v1beta1.LabelVideoObjectDetectionOperationMetadataOrBuilder
      getVideoObjectDetectionDetailsOrBuilder() {
    if (detailsCase_ == 6) {
      return (com.google.cloud.datalabeling.v1beta1.LabelVideoObjectDetectionOperationMetadata)
          details_;
    }
    return com.google.cloud.datalabeling.v1beta1.LabelVideoObjectDetectionOperationMetadata
        .getDefaultInstance();
  }
152580
@Exported
    public String getDescription() {
        Set<Node> nodes = getNodes();
        if(nodes.isEmpty()) {
            Set<Cloud> clouds = getClouds();
            if(clouds.isEmpty())
                return Messages.Label_InvalidLabel();

            return Messages.Label_ProvisionedFrom(toString(clouds));
        }

        if(nodes.size()==1)
            return nodes.iterator().next().getNodeDescription();

        return Messages.Label_GroupOf(toString(nodes));
    }
407700
public com.google.cloud.datalabeling.v1beta1.LabelImageSegmentationOperationMetadata
      getImageSegmentationDetails() {
    if (detailsCase_ == 15) {
      return (com.google.cloud.datalabeling.v1beta1.LabelImageSegmentationOperationMetadata)
          details_;
    }
    return com.google.cloud.datalabeling.v1beta1.LabelImageSegmentationOperationMetadata
        .getDefaultInstance();
  }
461150
public com.google.cloud.datalabeling.v1beta1.LabelVideoEventOperationMetadataOrBuilder
      getVideoEventDetailsOrBuilder() {
    if (detailsCase_ == 8) {
      return (com.google.cloud.datalabeling.v1beta1.LabelVideoEventOperationMetadata) details_;
    }
    return com.google.cloud.datalabeling.v1beta1.LabelVideoEventOperationMetadata
        .getDefaultInstance();
  }
972497
public NamedEntities entity_stats() {
		NamedEntities res = new NamedEntities();
		CoreLabel c;
		for (int classifierId = 0; classifierId < classifiers.size(); classifierId++) {
			System.err.printf("-- Classifier-%d\n", classifierId);
			
			String lastGold = "O", lastGuess = "O";
			int goldIndex = 0, guessIndex = 0;
			String goldString = "", guessString = "";
			String goldLemmaString = "", guessLemmaString = "";
			for (int i = 0; i < document.size(); i++) {
				c = document.get(i);
				String gold = c.getString(NamedEntityTagGoldAnnotation.class);
				String guess = c.get(AnswersAnnotation.class).get(classifierId);
				
				// continue current gold string
				if (lastGold.equals(gold) && !lastGold.equals("O")) {
					goldString += " " + c.word();
					goldLemmaString += " " + c.lemma();
				}
				
				// continue current guess string
				if (lastGuess.equals(guess) && !lastGuess.equals("O")) {
					guessString += " " + c.word();
					guessLemmaString += " " + c.lemma();
				}
				
				if (!lastGold.equals(gold) && !lastGold.equals("O")) {
					String t = "|" + lastGold + "|" + lastGuess;
				    if (lastGuess.equals(lastGold) && !lastGuess.equals(guess) &&
				    		goldIndex == guessIndex) {
				    	// TP 0/0 1/1 0/0
				    	//System.err.printf("TP %s\n", goldString);
				    	res.incTp(goldLemmaString + t, goldString + t);
				    } else {
				    	// FN 0/0 1/0 1/0 0/0; 0/0 1/1 1/0 0/0
						//System.err.printf("FN %s\n", goldString);
						res.incFn(goldLemmaString + t, goldString + t);
				    }
				}
				
				if (!lastGuess.equals(guess) && !lastGuess.equals("O")) {
					if (lastGuess.equals(lastGold) && !lastGuess.equals(guess) &&
							goldIndex == guessIndex && !lastGold.equals(gold)) {
						// already TP
					} else {
						// FP 
						String t = "|" + lastGold + "|" + lastGuess;
						res.incFp(guessLemmaString + t, guessString + t);
						System.err.printf("FP %s\n", guessString);
					}
				}
				
				if (!lastGold.equals(gold)) {
					lastGold = gold;
					goldIndex = i;
					goldString = c.word();
					goldLemmaString = c.lemma();
				}

				if (!lastGuess.equals(guess)) {
					lastGuess = guess;
					guessIndex = i;
					guessString = c.word();
					guessLemmaString = c.lemma();
				}
			}
				
			if (!lastGold.equals("O")) {
				String t = "|" + lastGold + "|" + lastGuess;
				if (lastGold.equals(lastGuess) && goldIndex == guessIndex) {
					// System.err.printf("TP %s\n", goldString);
					res.incTp(goldLemmaString + t, goldString + t);
				} else {
					// System.err.printf("FN %s\n", goldString);
					res.incFn(goldLemmaString + t, goldString + t);
				}
			}
			
			if (!lastGuess.equals("O")) {
				if (lastGold.equals(lastGuess) && goldIndex == guessIndex) {
					// OK
				} else {
					String t = "|" + lastGold + "|" + lastGuess;
					res.incFn(guessLemmaString + t, guessString + t);
				}
			}
		}
		return res;
	}
251802
@Override
    public String classify(String text) throws IllegalArgumentException, IllegalStateException
    {
        Map<String, Double> scoreMap = predict(text);

        return CollectionUtility.max(scoreMap);
    }
195270
private static MeanMagnitudes getLayerMeanMagnitudes(int layerIdx, TrainModuleUtils.GraphInfo gi,
                    List<Persistable> updates, List<Integer> iterationCounts, ModelType modelType) {
        if (gi == null) {
            return new MeanMagnitudes(Collections.emptyList(), Collections.emptyMap(), Collections.emptyMap(),
                            Collections.emptyMap());
        }

        String layerName = gi.getVertexNames().get(layerIdx);
        if (modelType != ModelType.CG) {
            //Get the original name, for the index...
            layerName = gi.getOriginalVertexName().get(layerIdx);
        }
        String layerType = gi.getVertexTypes().get(layerIdx);
        if ("input".equalsIgnoreCase(layerType)) { //TODO better checking - other vertices, etc
            return new MeanMagnitudes(Collections.emptyList(), Collections.emptyMap(), Collections.emptyMap(),
                            Collections.emptyMap());
        }

        List<Integer> iterCounts = new ArrayList<>();
        Map<String, List<Double>> ratioValues = new HashMap<>();
        Map<String, List<Double>> outParamMM = new HashMap<>();
        Map<String, List<Double>> outUpdateMM = new HashMap<>();

        if (updates != null) {
            int pCount = -1;
            for (Persistable u : updates) {
                pCount++;
                if (!(u instanceof StatsReport))
                    continue;
                StatsReport sp = (StatsReport) u;
                if (iterationCounts != null) {
                    iterCounts.add(iterationCounts.get(pCount));
                } else {
                    int iterCount = sp.getIterationCount();
                    iterCounts.add(iterCount);
                }


                //Info we want, for each parameter in this layer: mean magnitudes for parameters, updates AND the ratio of these
                Map<String, Double> paramMM = sp.getMeanMagnitudes(StatsType.Parameters);
                Map<String, Double> updateMM = sp.getMeanMagnitudes(StatsType.Updates);
                for (String s : paramMM.keySet()) {
                    String prefix;
                    if (modelType == ModelType.Layer) {
                        prefix = layerName;
                    } else {
                        prefix = layerName + "_";
                    }

                    if (s.startsWith(prefix)) {
                        //Relevant parameter for this layer...
                        String layerParam = s.substring(prefix.length());
                        double pmm = paramMM.getOrDefault(s, 0.0);
                        double umm = updateMM.getOrDefault(s, 0.0);
                        if (!Double.isFinite(pmm)) {
                            pmm = NAN_REPLACEMENT_VALUE;
                        }
                        if (!Double.isFinite(umm)) {
                            umm = NAN_REPLACEMENT_VALUE;
                        }
                        double ratio;
                        if (umm == 0.0 && pmm == 0.0) {
                            ratio = 0.0; //To avoid NaN from 0/0
                        } else {
                            ratio = umm / pmm;
                        }
                        List<Double> list = ratioValues.get(layerParam);
                        if (list == null) {
                            list = new ArrayList<>();
                            ratioValues.put(layerParam, list);
                        }
                        list.add(ratio);

                        List<Double> pmmList = outParamMM.get(layerParam);
                        if (pmmList == null) {
                            pmmList = new ArrayList<>();
                            outParamMM.put(layerParam, pmmList);
                        }
                        pmmList.add(pmm);

                        List<Double> ummList = outUpdateMM.get(layerParam);
                        if (ummList == null) {
                            ummList = new ArrayList<>();
                            outUpdateMM.put(layerParam, ummList);
                        }
                        ummList.add(umm);
                    }
                }
            }
        }

        return new MeanMagnitudes(iterCounts, ratioValues, outParamMM, outUpdateMM);
    }
530030
public com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails
          .DeltaPresenceEstimationResultOrBuilder
      getDeltaPresenceEstimationResultOrBuilder() {
    if (resultCase_ == 9) {
      return (com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult)
          result_;
    }
    return com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult
        .getDefaultInstance();
  }
987554
protected String labelNode(KamNode node) throws KAMStoreException {
        List<BelTerm> terms = kAMStore.getSupportingTerms(node);
        if (!terms.isEmpty()) {
            BelTerm bt = terms.get(0);
            Term parsed;
            try {
                parsed = BELParser.parseTerm(bt.getLabel());
            } catch (Exception e) {
                return null;
            }
            Term converted = convert(parsed);

            return displayLongForm ? converted.toBELLongForm() : converted
                    .toBELShortForm();
        }
        return null;
    }
1163621
private String getDatatypeLabel(DatatypeIdValue datatype) {
		if (datatype.getIri() == null) { // TODO should be redundant once the
											// JSON parsing works
			return "Unknown";
		}

		switch (datatype.getIri()) {
		case DatatypeIdValue.DT_COMMONS_MEDIA:
			return "Commons media";
		case DatatypeIdValue.DT_GLOBE_COORDINATES:
			return "Globe coordinates";
		case DatatypeIdValue.DT_ITEM:
			return "Item";
		case DatatypeIdValue.DT_QUANTITY:
			return "Quantity";
		case DatatypeIdValue.DT_STRING:
			return "String";
		case DatatypeIdValue.DT_TIME:
			return "Time";
		case DatatypeIdValue.DT_URL:
			return "URL";
		case DatatypeIdValue.DT_PROPERTY:
			return "Property";
		case DatatypeIdValue.DT_EXTERNAL_ID:
			return "External identifier";
		case DatatypeIdValue.DT_MATH:
			return "Math";
		case DatatypeIdValue.DT_MONOLINGUAL_TEXT:
			return "Monolingual Text";
		default:
			throw new RuntimeException("Unknown datatype " + datatype.getIri());
		}
	}
9445
public com.google.cloud.datalabeling.v1beta1.LabelTextEntityExtractionOperationMetadata
      getTextEntityExtractionDetails() {
    if (detailsCase_ == 13) {
      return (com.google.cloud.datalabeling.v1beta1.LabelTextEntityExtractionOperationMetadata)
          details_;
    }
    return com.google.cloud.datalabeling.v1beta1.LabelTextEntityExtractionOperationMetadata
        .getDefaultInstance();
  }
335820
public DBObject getMetadataFromGFSEntity(GridFS gfs, EntityMetadata m, Object entity,
            KunderaMetadata kunderaMetadata)
    {
        MetamodelImpl metaModel = (MetamodelImpl) kunderaMetadata.getApplicationMetadata()
                .getMetamodel(m.getPersistenceUnit());

        EntityType entityType = metaModel.entity(m.getEntityClazz());

        DBObject gfsMetadata = new BasicDBObject();
        Set<Attribute> columns = entityType.getAttributes();
        for (Attribute column : columns)
        {
            boolean isLob = ((Field) column.getJavaMember()).getAnnotation(Lob.class) != null;
            if (!isLob)
            {
                DocumentObjectMapper.extractFieldValue(entity, gfsMetadata, column);
            }
        }
        return gfsMetadata;
    }
105969
public com.google.cloud.datalabeling.v1beta1.LabelImagePolylineOperationMetadata
      getImagePolylineDetails() {
    if (detailsCase_ == 12) {
      return (com.google.cloud.datalabeling.v1beta1.LabelImagePolylineOperationMetadata) details_;
    }
    return com.google.cloud.datalabeling.v1beta1.LabelImagePolylineOperationMetadata
        .getDefaultInstance();
  }
754302
public com.google.cloud.datalabeling.v1beta1.LabelImageBoundingBoxOperationMetadata
      getImageBoundingBoxDetails() {
    if (detailsCase_ == 4) {
      return (com.google.cloud.datalabeling.v1beta1.LabelImageBoundingBoxOperationMetadata)
          details_;
    }
    return com.google.cloud.datalabeling.v1beta1.LabelImageBoundingBoxOperationMetadata
        .getDefaultInstance();
  }
1020951
public com.google.api.ads.adwords.axis.v201809.cm.AssetPerformanceLabel getAssetPerformanceLabel() {
        return assetPerformanceLabel;
    }
202837
@Override
  public SortedMap<Double, Set<String>> sortedScoreMap(String[] text) {
    SortedMap<Double, Set<String>> descendingMap = new TreeMap<>();
    double[] categorize = classifyProb(text);
    int catSize = getNumberOfLabels();
    for (int i = 0; i < catSize; i++) {
      String category = getLabel(i);
      double score = categorize[getIndex(category)];
      if (descendingMap.containsKey(score)) {
        descendingMap.get(score).add(category);
      } else {
        Set<String> newset = new HashSet<>();
        newset.add(category);
        descendingMap.put(score, newset);
      }
    }
    return descendingMap;
  }