Learn R Programming

bdpar (version 1.0.1)

FindEmoticonPipe: Class to find and/or remove the emoticons on the data field of an Instance

Description

This class is responsible of detecting the existing emoticons in the data field of each Instance. Identified emoticons are stored inside the emoticon field of Instance class. Moreover if required, is able to perform inline emoticon removement.

Usage

FindEmoticonPipe

Arguments

Constructor

FindEmoticonPipe$new(propertyName = "emoticon",
                     alwaysBeforeDeps = list(),
                     notAfterDeps = list("FindHashtagPipe"))

  • 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/remove the emoticons.

    • Usage: pipe(instance, removeEmoticon = TRUE)

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

    • Arguments:

      • instance: (Instance) Instance to preproccess.

      • removeEmoticon: (logical) indicates if the emoticons are replaced.

  • findEmoticon: finds the emoticons in the data.

    • Usage: findEmoticon(data)

    • Value: list with emoticons found.

    • Arguments:

      • data: (character) text to search the emoticons.

  • removeEmoticon: removes the emoticons in the data.

    • Usage: removeEmoticon(data)

    • Value: the data with emoticons removed.

    • Arguments:

      • data: (character) text in which emoticons will be removed.

Public fields

  • emoticonPattern: (character) regular expression to detect emoticons.

Details

The regular expression indicated in the emoticonPattern variable is used to identify emoticons.

See Also

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