Get an array of all class labels in a given data set.

@param bundle Bundle
@return Class labels.
545411
public static ArrayList<ClassLabel> allClassLabels(MultipleObjectsBundle bundle) {
    int col = findClassLabelColumn(bundle);
    // TODO: automatically infer class labels?
    if(col < 0) {
      throw new AbortException("No class label found (try using ClassLabelFilter).");
    }
    return allClassLabels(bundle, col);
  }
124732
public static Set<Label> getLabels(final Collection<Annotation> annotations) {
        return annotations.stream()
                .flatMap(AnnotationUtils::extractRepeatable)
                .map(AnnotationUtils::getMarks)
                .flatMap(Collection::stream)
                .collect(Collectors.toSet());
    }
285207
public static int findLabelColumn(MultipleObjectsBundle bundle) {
    for(int i = 0; i < bundle.metaLength(); i++) {
      if(TypeUtil.GUESSED_LABEL.isAssignableFromType(bundle.meta(i))) {
        return i;
      }
    }
    return -1;
  }
374875
def get_bundles(self):
        # type: () -> List[Bundle]
        
        with self.__bundles_lock:
            return [
                self.__bundles[bundle_id]
                for bundle_id in sorted(self.__bundles.keys())
            ]
749253
private Set<ModelDescription> scanBundleForModels(Bundle bundle) {
        Set<ModelDescription> models = new HashSet<ModelDescription>();
        if (!shouldSkipBundle(bundle)) {
            models = loadModelsOfBundle(bundle);
        }
        return models;
    }
203178
public String[] getLabel(InstanceSet set) {
		String[] pred= new String[set.size()];
		for(int i=0;i<set.size();i++){
			pred[i]=  getStringLabel(set.getInstance(i));			
		}
		return pred;
	}
501861
public List<ManifestEntry> scan( final Bundle bundle )
    {
        NullArgumentException.validateNotNull( bundle, "Bundle" );

        final Dictionary bundleHeaders = bundle.getHeaders();
        if( bundleHeaders != null && !bundleHeaders.isEmpty() )
        {
            return asManifestEntryList( m_manifestFilter.match( dictionaryToMap( bundleHeaders ) ) );
        }
        else
        {
            return Collections.emptyList();
        }
    }
369137
private Set<String> getResourcePaths(List<JoinableResourceBundle> bundles) {

		Set<String> resourcePaths = new HashSet<>();

		for (JoinableResourceBundle bundle : bundles) {
			for (BundlePath bundlePath : bundle.getItemPathList()) {
				resourcePaths.add(bundlePath.getPath());
			}
		}

		return resourcePaths;
	}
1121282
public static Map<String, String> toMap(ResourceBundle bundle) {
		Map<String, String> map = new HashMap<String, String>();
		Enumeration<String> keys = bundle.getKeys();
		while(keys.hasMoreElements()) {
			String key = keys.nextElement();
			map.put(key, bundle.getString(key));
		}
		return map;
	}
479756
private JSONObject getJSONForBundle(Bundle bundle) throws JSONException {
    JSONObject root = new JSONObject();
    for (String key : bundle.keySet()) {
      root.put(key, getJSONValue(bundle.get(key)));
    }
    return root;
  }
339929
public ClassDoc[] allClasses(PackageDoc pkgDoc) {
          return pkgDoc.isIncluded() ?
                pkgDoc.allClasses() :
                getArray(allClasses, Util.getPackageName(pkgDoc));
      }
793813
public void setBundles(java.util.Collection<Bundle> bundles) {
        if (bundles == null) {
            this.bundles = null;
            return;
        }

        this.bundles = new java.util.ArrayList<Bundle>(bundles);
    }
465699
public static List<Bundle> getBundles( BundleContext bc, String symbolicName )
    {
        List<Bundle> bundles = new ArrayList<Bundle>();
        for( Bundle bundle : bc.getBundles() )
        {
            if( bundle.getSymbolicName().equals( symbolicName ) )
            {
                bundles.add( bundle );
            }
        }
        return bundles;
    }
1321001
public static Map<String, Object> getHeaders(Bundle b) {
	Dictionary<String, String> headers = b.getHeaders();
	Enumeration<String> keys = headers.keys();
	Enumeration<String> values = headers.elements();

	String key, value;
	Object existing;
	List<String> list;
	Map<String, Object> _headers = new HashMap<String, Object>();
	while (keys.hasMoreElements()) {
	    key = keys.nextElement();
	    value = StringUtil.unwrap(values.nextElement());
	    existing = _headers.get(key);
	    if (existing != null) {
		if (existing instanceof String) {
		    list = new ArrayList<>();
		    list.add((String) existing);
		    _headers.put(key, list);
		}
		else list = (List<String>) existing;
		list.add(value);
	    }
	    else _headers.put(key, value);
	}

	return _headers;
    }
213200
public List<GitlabLabel> getLabels(Serializable projectId)
            throws IOException {
        String tailUrl = GitlabProject.URL + "/" + sanitizeProjectId(projectId) + GitlabLabel.URL;
        GitlabLabel[] labels = retrieve().to(tailUrl, GitlabLabel[].class);
        return Arrays.asList(labels);
    }
468484
public List<Pair<int[][][], int[]>> documentsToDataAndLabelsList(Collection<List<IN>> documents) {
    int numDatums = 0;

    List<Pair<int[][][], int[]>> docList = new ArrayList<Pair<int[][][], int[]>>();
    for (List<IN> doc : documents) {
      Pair<int[][][], int[]> docPair = documentToDataAndLabels(doc);
      docList.add(docPair);
      numDatums += doc.size();
    }

    System.err.println("numClasses: " + classIndex.size() + ' ' + classIndex);
    System.err.println("numDocuments: " + docList.size());
    System.err.println("numDatums: " + numDatums);
    System.err.println("numFeatures: " + featureIndex.size());
    return docList;
  }
568355
public static Set<String> getFullLocaleNameSet(String bundlePrefix, ClassLoader loader) {
        return getAvailEntry(bundlePrefix, loader).getFullLocaleNameSet();
    }