| FindEmojiPipe {bdpar} | R Documentation |
Class to find and/or replace the emoji on the data field of an Instance
Description
This class is responsible of detecting the existing emojis in the
data field of each Instance. Identified emojis are
stored inside the emoji field of Instance class.
Moreover if required, is able to perform inline emoji replacement.
Details
FindEmojiPipe use the emoji list provided by data(emojisData).
Note
FindEmojiPipe will automatically invalidate the
Instance whenever the obtained data is empty.
Inherit
This class inherits from GenericPipe and implements the
pipe abstract function.
Super class
bdpar::GenericPipe -> FindEmojiPipe
Methods
Public methods
Inherited methods
Method new()
Creates a FindEmojiPipe object.
Usage
FindEmojiPipe$new( propertyName = "Emojis", alwaysBeforeDeps = list(), notAfterDeps = list(), replaceEmojis = TRUE )
Arguments
propertyNameA
charactervalue. Name of the property associated with theGenericPipe.alwaysBeforeDepsA
listvalue. The dependencies alwaysBefore (GenericPipesthat must be executed before this one).notAfterDepsA
listvalue. The dependencies notAfter (GenericPipesthat cannot be executed after this one).replaceEmojisA
logicalvalue. Indicates if the emojis are replaced.propertyLanguageNameA
charactervalue. Name of the language property.
Method pipe()
Preprocesses the Instance to obtain/replace
the emojis. The emojis found in the data are added to the
list of properties of the Instance.
Usage
FindEmojiPipe$pipe(instance)
Arguments
Returns
The Instance with the modifications that have
occurred in the pipe.
Method findEmoji()
Checks if the emoji is in the data.
Usage
FindEmojiPipe$findEmoji(data, emoji)
Arguments
Returns
A logical value depending on whether the
emoji is in the data.
Method replaceEmoji()
Replaces the emoji in the data for the extendedEmoji.
Usage
FindEmojiPipe$replaceEmoji(emoji, extendedEmoji, data)
Arguments
Returns
The data with the emojis replaced.
Method clone()
The objects of this class are cloneable with this method.
Usage
FindEmojiPipe$clone(deep = FALSE)
Arguments
deepWhether to make a deep clone.
See Also
AbbreviationPipe, ContractionPipe,
File2Pipe, FindEmoticonPipe,
FindHashtagPipe, FindUrlPipe,
FindUserNamePipe, GuessDatePipe,
GuessLanguagePipe, Instance,
InterjectionPipe, MeasureLengthPipe,
GenericPipe, SlangPipe,
StopWordPipe, StoreFileExtPipe,
TargetAssigningPipe, TeeCSVPipe,
ToLowerCasePipe