Learn R Programming

bdpar (version 1.0.1)

FindHashtagPipe: Class to find and/or remove the hashtags on the data field of an Instance

Description

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

Usage

FindHashtagPipe

Arguments

Constructor

FindHashtagPipe$new(propertyName = "hashtag",
                    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/remove the hashtags.

    • Usage: pipe(instance, removeHashtag = TRUE)

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

    • Arguments:

      • instance: (Instance) Instance to preproccess.

      • removeHashtag: (logical) indicates if the hashstags are removed

  • findHashtag: finds the hashtags in the data.

    • Usage: findHashtag(data)

    • Value: list with hashtags found.

    • Arguments:

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

  • removeHashtag: removes the hashtags in the data.

    • Usage: removeHashtag(data)

    • Value: the data with hashtags removed.

    • Arguments:

      • data: (character) text to remove the hashtags.

Public fields

  • hashtagPattern: (character) regular expression to detect hashtags.

Details

The regular expression indicated in the hashtagPattern variable is used to identify hashtags.

See Also

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