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.
This class inherits from GenericPipe
and implements the
pipe
abstract function.
bdpar::GenericPipe
-> MeasureLengthPipe
new()
Creates a File2Pipe
object.
MeasureLengthPipe$new(
propertyName = "length",
alwaysBeforeDeps = list(),
notAfterDeps = list(),
nchar_conf = TRUE
)
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.
pipe()
Preprocesses the Instance
to obtain the
length of data.
MeasureLengthPipe$pipe(instance)
instance
A Instance
value. The Instance
to preprocess.
The Instance
with the modifications that have
occurred in the pipe.
getLength()
Preprocesses the Instance
to obtain the
length of data.
MeasureLengthPipe$getLength(data, nchar_conf = TRUE)
data
A character
value. The text to preprocess.
nchar_conf
A logical
value. Indicates if the pipe
uses nchar or object.size.
The Instance
with the modifications that have
occurred in the pipe.
clone()
The objects of this class are cloneable with this method.
MeasureLengthPipe$clone(deep = FALSE)
deep
Whether to make a deep clone.
AbbreviationPipe
, ContractionPipe
,
File2Pipe
, FindEmojiPipe
,
FindEmoticonPipe
, FindHashtagPipe
,
FindUrlPipe
, FindUserNamePipe
,
GuessDatePipe
, GuessLanguagePipe
,
Instance
, InterjectionPipe
,
GenericPipe
, ResourceHandler
,
SlangPipe
, StopWordPipe
,
StoreFileExtPipe
, TargetAssigningPipe
,
TeeCSVPipe
, ToLowerCasePipe