| AbbreviationPipe | R Documentation |
AbbreviationPipe class is responsible for detecting
the existing abbreviations in the data field of each Instance.
Identified abbreviations are stored inside the abbreviation field of
Instance class. Moreover if needed, is able to perform inline
abbreviations replacement.
AbbreviationPipe class requires the resource files (in json format)
containing the correspondence between abbreviations and meaning. To this end,
the language of the text indicated in the propertyLanguageName should
be contained in the resource file name (ie. abbrev.xxx.json where xxx is the
value defined in the propertyLanguageName ). The location of the
resources should be defined in the "resources.abbreviations.path"
field of bdpar.Options variable.
AbbreviationPipe will automatically invalidate the
Instance whenever the obtained data is empty.
This class inherits from GenericPipe and implements the
pipe abstract function.
bdpar::GenericPipe -> AbbreviationPipe
new()Creates a AbbreviationPipe object.
AbbreviationPipe$new(
propertyName = "abbreviation",
propertyLanguageName = "language",
alwaysBeforeDeps = list("GuessLanguagePipe"),
notAfterDeps = list(),
replaceAbbreviations = TRUE,
resourcesAbbreviationsPath = 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).
replaceAbbreviationsA logical value. Indicates if
the abbreviations are replaced or not.
resourcesAbbreviationsPathA character value. Path
of resource files (in json format) containing the correspondence between
abbreviations and meaning.
pipe()Preprocesses the Instance to obtain/replace
the abbreviations. The abbreviations found in the data are added to the
list of properties of the Instance.
AbbreviationPipe$pipe(instance)
instanceA Instance value. The Instance
to preprocess.
The Instance with the modifications that have
occurred in the pipe.
findAbbreviation()Checks if the abbreviation is in the data.
AbbreviationPipe$findAbbreviation(data, abbreviation)
dataA character value. The text where abbreviation
will be searched.
abbreviationA character value. Indicates the
abbreviation to find.
A logical value depending on whether the
abbreviation is in the data.
replaceAbbreviation()Replaces the abbreviation in the data for the extendedAbbreviation.
AbbreviationPipe$replaceAbbreviation(abbreviation, extendedAbbreviation, data)
abbreviationA character value. Indicates the
abbreviation to replace.
extendedAbbreviationA character value. Indicates the
string to replace for the abbreviations found.
dataA character value. The text where abbreviation
will be replaced.
The data with the abbreviations replaced.
getPropertyLanguageName()Gets the name of property language.
AbbreviationPipe$getPropertyLanguageName()
Value of name of property language.
getResourcesAbbreviationsPath()Gets the path of abbreviations resources.
AbbreviationPipe$getResourcesAbbreviationsPath()
Value of path of abbreviations resources.
setResourcesAbbreviationsPath()Sets the path of abbreviations resources.
AbbreviationPipe$setResourcesAbbreviationsPath(path)
pathA character value. The new value of the path of
abbreviations resources.
clone()The objects of this class are cloneable with this method.
AbbreviationPipe$clone(deep = FALSE)
deepWhether to make a deep clone.
bdpar.Options, ContractionPipe,
File2Pipe, FindEmojiPipe,
FindEmoticonPipe, FindHashtagPipe,
FindUrlPipe, FindUserNamePipe,
GuessDatePipe, GuessLanguagePipe,
Instance, InterjectionPipe,
MeasureLengthPipe, GenericPipe,
ResourceHandler, SlangPipe,
StopWordPipe, StoreFileExtPipe,
TargetAssigningPipe, TeeCSVPipe,
ToLowerCasePipe
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.