FluidLabelSet:
Filter:
Classes (extension) | Libraries > FluidCorpusManipulation

FluidLabelSet : FluidDataObject : FluidServerObject : Object
ExtensionExtension

A set of labels associated with identifiers.

Description

FluidLabelSet is a container associating identifiers with labels.

Read more about FluidLabelSet on the learn platform.

Class Methods

FluidLabelSet.new(server)

Arguments:

server

The Server on which to construct this object

Inherited class methods

Instance Methods

.addLabel(identifier, label, action)

Add a label to the FluidLabelSet.

Arguments:

identifier

The identifier for this label.

label

The label to add.

action

A function to execute when the server has completed running addLabel

.getLabel(identifier, action)

Retrieve the label associated with an identifier. Will report an error if the identifier is not present in the set.

Arguments:

identifier

The identifier for the label to be retrieved.

action

A function to execute when the server has completed running getLabel

.deleteLabel(identifier, action)

Delete a label given a certain identifier.

Arguments:

identifier

The identifier to be deleted.

action

A function to execute when the server has completed running deleteLabel

.updateLabel(identifier, label, action)

Update a label for a given identifier in the label set.

Arguments:

identifier

The identifier for this label.

label

The label to update.

action

A function to execute when the server has completed running updateLabel

.setLabel(identifier, label, action)

Set a label for a given identifier.

Arguments:

identifier

The identifier for this label.

label

The label to update.

action

A function to execute when the server has completed running setLabel

.merge(sourceLabelSet, overwrite: 0, action)

Merge sourceLabelSet in the current LabelSet. It will replace the label with the same identifier if overwrite is set to 1.

Arguments:

sourceLabelSet

The source LabelSet to be merged.

overwrite

A flag to allow overwrite labels with the same identifier.

action

A function to execute when the server has completed running merge

.dump(action)

From superclass: FluidDataObject

Dump the state of this object as a Dictionary.

Arguments:

action

A function to execute when the server has completed running dump

.load(dict, action)

From superclass: FluidDataObject

Replace the internal state of the object from a Dictionary.

Arguments:

dict
action

A function to execute when the server has completed running load

.print(action)

Post an abbreviated content of the label set in the window by default, but you can supply a custom action instead.

Arguments:

action

A function to execute when the server has completed running print

.size(action)

From superclass: FluidDataObject

The number of data points (entries / observations) in this model or dataset / labeset

Arguments:

action

A function to execute when the server has completed running size

.cols(action)

From superclass: FluidDataObject

The number of columns (dimensions) in this model or dataset / labeset

Arguments:

action

A function to execute when the server has completed running cols

.clear(action)

Empty the label set and reset to a clean state.

Arguments:

action

A function to execute when the server has completed running clear

.write(filename, action)

From superclass: FluidDataObject

Save the contents of the object to a JSON file on disk.

Arguments:

filename

Path of the file to load from

action

A function to execute when the server has completed running write

.read(filename, action)

From superclass: FluidDataObject

Replace the internal state of the object from a JSON file on disk.

Arguments:

filename

Path of the file to load from

action

A function to execute when the server has completed running read

.getIds(labelSet, action)

Export the LabelSet identifier to a FluidLabelSet.

Arguments:

labelSet

The FluidLabelSet to export to. Its content will be replaced.

action

A function to execute when the server has completed running getIds

Inherited instance methods

Undocumented instance methods

.addLabelMsg(identifier, label)

.clearMsg

.deleteLabelMsg(identifier, action)

.getIdsMsg(labelSet)

.getLabelMsg(identifier)

.mergeMsg(sourceLabelSet, overwrite: 0)

.printMsg

.setLabelMsg(identifier, label)

.updateLabelMsg(identifier, label)

Examples

Labeling Audio Analyses

Other Messages

Dictionary interface

Merging