Learn R Programming

bdpar (version 1.0.1)

TargetAssigningPipe: Class to get the target field of the Instance

Description

This class allows searching in the path the target of the Instance.

Usage

TargetAssigningPipe

Arguments

Constructor

TargetAssigningPipe$new(targets = list("ham","spam"),
                        targetsName = list("_ham_","_spam_"),
                        propertyName = "target",
                        alwaysBeforeDeps = list(),
                        notAfterDeps = list())
  • Arguments:

    • targets: (list) name of the targets property.

    • targetsName: (list) the name of folders.

    • 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 target.

    • Usage: pipe(instance)

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

    • Arguments:

      • instance: (Instance) Instance to preproccess.

  • getTarget gets the target from a path.

    • Usage:

      getTarget(path)

    • Value: the target of the path.

    • Arguments:

      • path: (character) path to analize.

  • checkTarget: checks if the target is in the path.

    • Usage: checkTarget(target, path)

    • Value: if the target is found, returns target, else returns "".

    • Arguments:

      • target: (character) target to find in the path.

      • path: (character) path to analize.

  • getTargets: gets of targets.

    • Usage: getTargets()

    • Value: value of targets.

Private fields

  • targets: (list) name of the targets property.

Details

The targets that are searched can be controlled through the constructor of the class where targetsName will be the string that is searched within the path and targets has the values that the property can take.

See Also

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