InterjectionPipe class is responsible for detecting
the existing interjections in the data field of each Instance.
Identified interjections are stored inside the interjection field of
Instance class. Moreover if needed, is able to perform inline
interjections removement.
This class inherits from GenericPipe and implements the
pipe abstract function.
bdpar::GenericPipe -> InterjectionPipe
new()Creates a InterjectionPipe object.
InterjectionPipe$new(
propertyName = "interjection",
propertyLanguageName = "language",
alwaysBeforeDeps = list("GuessLanguagePipe"),
notAfterDeps = list(),
removeInterjections = TRUE,
resourcesInterjectionsPath = NULL
)propertyNameA character value. Name of the property
associated with the GenericPipe.
propertyLanguageNameA character value. Name of the
language property.
alwaysBeforeDepsA list value. The dependencies
alwaysBefore (GenericPipes that must be executed before
this one).
notAfterDepsA list value. The dependencies
notAfter (GenericPipes that cannot be executed after
this one).
removeInterjectionsA logical value. Indicates if
the interjections are removed or not.
resourcesInterjectionsPathA character value. Path
of resource files (in json format) containing the interjections.
pipe()Preprocesses the Instance to obtain/remove
the interjections. The interjections found in the data are added to the
list of properties of the Instance.
InterjectionPipe$pipe(instance)instanceA Instance value. The Instance
to preprocess.
The Instance with the modifications that have
occurred in the pipe.
findInterjection()Checks if the interjection is in the data.
InterjectionPipe$findInterjection(data, interjection)dataA character value. The text where interjection
will be searched.
interjectionA character value. Indicates the
interjection to find.
A logical value depending on whether the
interjection is in the data.
removeInterjection()Removes the interjection in the data.
InterjectionPipe$removeInterjection(interjection, data)interjectionA character value. Indicates the
interjection to remove.
dataA character value. The text where interjection
will be removed.
The data with the interjections removed.
getPropertyLanguageName()Gets the name of property language.
InterjectionPipe$getPropertyLanguageName()Value of name of property language.
getResourcesInterjectionsPath()Gets the path of interjections resources.
InterjectionPipe$getResourcesInterjectionsPath()Value of path of interjections resources.
setResourcesInterjectionsPath()Sets the path of interjections resources.
InterjectionPipe$setResourcesInterjectionsPath(path)pathA character value. The new value of the path of
interjections resources.
clone()The objects of this class are cloneable with this method.
InterjectionPipe$clone(deep = FALSE)deepWhether to make a deep clone.
InterjectionPipe class requires the resource files (in json format)
containing the list of interjections. To this end, the language of the text
indicated in the propertyLanguageName should be contained in the
resource file name (ie. interj.xxx.json where xxx is the value defined in the
propertyLanguageName ). The location of the resources should be
defined in the "resources.interjections.path" field of
bdpar.Options variable.
AbbreviationPipe, bdpar.Options,
ContractionPipe, File2Pipe,
FindEmojiPipe, FindEmoticonPipe,
FindHashtagPipe, FindUrlPipe,
FindUserNamePipe, GuessDatePipe,
GuessLanguagePipe, Instance,
MeasureLengthPipe, GenericPipe,
ResourceHandler, SlangPipe,
StopWordPipe, StoreFileExtPipe,
TargetAssigningPipe, TeeCSVPipe,
ToLowerCasePipe