| FindEmoticonPipe {bdpar} | R Documentation |
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.
Details
The regular expression indicated in the emoticonPattern
variable is used to identify emoticons.
Note
FindEmoticonPipe 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 -> FindEmoticonPipe
Public fields
emoticonPatternA
charactervalue. The regular expression to detect emoticons.
Methods
Public methods
Inherited methods
Method new()
Creates a FindEmoticonPipe object.
Usage
FindEmoticonPipe$new(
propertyName = "emoticon",
alwaysBeforeDeps = list(),
notAfterDeps = list("FindHashtagPipe"),
removeEmoticons = 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).removeEmoticonsA
logicalvalue. Indicates if the emoticons are removed.propertyLanguageNameA
charactervalue. Name of the language property.
Method pipe()
Preprocesses the Instance to obtain/remove
the emoticons. The emoticons found in the data are added to the
list of properties of the Instance.
Usage
FindEmoticonPipe$pipe(instance)
Arguments
Returns
The Instance with the modifications that have
occurred in the pipe.
Method findEmoticon()
Finds the emoticons in the data.
Usage
FindEmoticonPipe$findEmoticon(data)
Arguments
dataA
charactervalue. The text to search the emoticons.
Returns
The list with emoticons found.
Method removeEmoticon()
Removes the emoticons in the data.
Usage
FindEmoticonPipe$removeEmoticon(data)
Arguments
dataA
charactervalue. The text where emoticons will be removed.
Returns
The data with the emoticons removed.
Method clone()
The objects of this class are cloneable with this method.
Usage
FindEmoticonPipe$clone(deep = FALSE)
Arguments
deepWhether to make a deep clone.
See Also
AbbreviationPipe, ContractionPipe,
File2Pipe, FindEmojiPipe,
FindHashtagPipe, FindUrlPipe,
FindUserNamePipe, GuessDatePipe,
GuessLanguagePipe, Instance,
InterjectionPipe, MeasureLengthPipe,
GenericPipe, SlangPipe,
StopWordPipe, StoreFileExtPipe,
TargetAssigningPipe, TeeCSVPipe,
ToLowerCasePipe