| FindUserNamePipe {bdpar} | R Documentation |
Class to find and/or remove the users on the data field of an Instance
Description
This class is responsible of detecting the existing use names in the
data field of each Instance. Identified user names are
stored inside the userName field of Instance class.
Moreover if required, is able to perform inline user name removement.
Details
The regular expressions indicated in the userPattern
variable are used to identify user names.
Note
FindUserNamePipe 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 -> FindUserNamePipe
Public fields
userPatternA
charactervalue. The regular expression to detect name users.
Methods
Public methods
Inherited methods
Method new()
Creates a FindEmoticonPipe object.
Usage
FindUserNamePipe$new( propertyName = "userName", alwaysBeforeDeps = list(), notAfterDeps = list(), removeUser = 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).removeUserA
logicalvalue. Indicates if the name users are removed.propertyLanguageNameA
charactervalue. Name of the language property.
Method pipe()
Preprocesses the Instance to obtain/remove
the name users. The emoticons found in the data are added to the
list of properties of the Instance.
Usage
FindUserNamePipe$pipe(instance)
Arguments
Returns
The Instance with the modifications that have
occurred in the pipe.
Method findUserName()
Finds the name users in the data.
Usage
FindUserNamePipe$findUserName(data)
Arguments
dataA
charactervalue. The text to search the name users.
Returns
The list with name users found.
Method removeUserName()
Removes the name users in the data.
Usage
FindUserNamePipe$removeUserName(data)
Arguments
dataA
charactervalue. The text where name users will be removed.
Returns
The data with the name users removed.
Method clone()
The objects of this class are cloneable with this method.
Usage
FindUserNamePipe$clone(deep = FALSE)
Arguments
deepWhether to make a deep clone.
See Also
AbbreviationPipe, ContractionPipe,
File2Pipe, FindEmojiPipe,
FindEmoticonPipe, FindHashtagPipe,
FindUrlPipe, GuessDatePipe,
GuessLanguagePipe, Instance,
InterjectionPipe, MeasureLengthPipe,
GenericPipe, SlangPipe,
StopWordPipe, StoreFileExtPipe,
TargetAssigningPipe, TeeCSVPipe,
ToLowerCasePipe