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.
This class inherits from GenericPipe
and implements the
pipe
abstract function.
bdpar::GenericPipe
-> FindEmojiPipe
new()
Creates a FindEmojiPipe
object.
FindEmojiPipe$new(
propertyName = "Emojis",
alwaysBeforeDeps = list(),
notAfterDeps = list(),
replaceEmojis = 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).
replaceEmojis
A logical
value. Indicates if the
emojis are replaced.
propertyLanguageName
A character
value. Name of the
language property.
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
.
FindEmojiPipe$pipe(instance)
instance
A Instance
value. The Instance
to preprocess.
The Instance
with the modifications that have
occurred in the pipe.
findEmoji()
Checks if the emoji is in the data.
FindEmojiPipe$findEmoji(data, emoji)
data
A character
value. The text where emoji
will be searched.
emoji
A character
value. Indicates the
emoji to find.
A logical
value depending on whether the
emoji is in the data.
replaceEmoji()
Replaces the emoji in the data for the extendedEmoji.
FindEmojiPipe$replaceEmoji(emoji, extendedEmoji, data)
emoji
A character
value. Indicates the
emoji to replace.
extendedEmoji
A character
value. Indicates the
string to replace for the emojis found.
data
A character
value. The text where emoji
will be replaced.
The data with the emojis replaced.
clone()
The objects of this class are cloneable with this method.
FindEmojiPipe$clone(deep = FALSE)
deep
Whether to make a deep clone.
FindEmojiPipe
use the emoji list provided by data(emojisData).
AbbreviationPipe
, ContractionPipe
,
File2Pipe
, FindEmoticonPipe
,
FindHashtagPipe
, FindUrlPipe
,
FindUserNamePipe
, GuessDatePipe
,
GuessLanguagePipe
, Instance
,
InterjectionPipe
, MeasureLengthPipe
,
GenericPipe
, SlangPipe
,
StopWordPipe
, StoreFileExtPipe
,
TargetAssigningPipe
, TeeCSVPipe
,
ToLowerCasePipe