Learn R Programming

bdpar (version 3.1.0)

MeasureLengthPipe: Class to obtain the length of the data field of an Instance

Description

This class is responsible of obtain the length of thedata field of each Instance. Creates the length property which indicates the length of the text. The property's name is customize thought the class constructor.

Arguments

Inherit

This class inherits from GenericPipe and implements the pipe abstract function.

Super class

bdpar::GenericPipe -> MeasureLengthPipe

Methods

Inherited methods


Method new()

Creates a File2Pipe object.

Usage

MeasureLengthPipe$new(
  propertyName = "length",
  alwaysBeforeDeps = list(),
  notAfterDeps = list(),
  nchar_conf = TRUE
)

Arguments

propertyName

A character value. Name of the property associated with the GenericPipe.

alwaysBeforeDeps

A list value. The dependencies alwaysBefore (GenericPipes that must be executed before this one).

notAfterDeps

A list value. The dependencies notAfter (GenericPipes that cannot be executed after this one).

nchar_conf

A logical value. indicates if the pipe uses nchar or object.size.


Method pipe()

Preprocesses the Instance to obtain the length of data.

Usage

MeasureLengthPipe$pipe(instance)

Arguments

instance

A Instance value. The Instance to preprocess.

Returns

The Instance with the modifications that have occurred in the pipe.


Method getLength()

Preprocesses the Instance to obtain the length of data.

Usage

MeasureLengthPipe$getLength(data, nchar_conf = TRUE)

Arguments

data

A character value. The text to preprocess.

nchar_conf

A logical value. Indicates if the pipe uses nchar or object.size.

Returns

The Instance with the modifications that have occurred in the pipe.


Method clone()

The objects of this class are cloneable with this method.

Usage

MeasureLengthPipe$clone(deep = FALSE)

Arguments

deep

Whether to make a deep clone.

See Also

AbbreviationPipe, ContractionPipe, File2Pipe, FindEmojiPipe, FindEmoticonPipe, FindHashtagPipe, FindUrlPipe, FindUserNamePipe, GuessDatePipe, GuessLanguagePipe, Instance, InterjectionPipe, GenericPipe, ResourceHandler, SlangPipe, StopWordPipe, StoreFileExtPipe, TargetAssigningPipe, TeeCSVPipe, ToLowerCasePipe