Learn R Programming

bdpar (version 1.0.1)

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 throught the class constructor.

Usage

MeasureLengthPipe

Arguments

Constructor

MeasureLengthPipe$new(propertyName = "length",
                      alwaysBeforeDeps = list(),
                      notAfterDeps = list())
  • Arguments:

    • propertyName: (character) name of the property associated with the Pipe.

    • alwaysBeforeDeps: (list) the dependences alwaysBefore (Pipes that must be executed before this one).

    • notAfterDeps: (list) the dependences notAfter (Pipes that cannot be executed after this one).

Inherit

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

Methods

  • pipe: preprocesses the Instance to obtain the length of data.

    • Usage: pipe(instance, propertyName = super$getPropertyName(), nchar_conf = TRUE)

    • Value: the Instance with the modifications that have occurred in the Pipe.

    • Arguments:

      • instance: (Instance) Instance to preproccess.

      • propertyName (character) the name of the property that will be obtained in the Pipe.

      • nchar_conf (logical) indicates if the Pipe uses nchar or object.size.

  • getLength: obtains the length of the data.

    • Usage: getLength(data, nchar_conf = TRUE)

    • Value: the Instance with the modifications that have occurred in the Pipe.

    • Arguments:

      • data: (character) text to preproccess.

      • nchar_conf: (logical) indicates if the Pipe uses nchar or object.size.

See Also

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