SlangPipe: Class to find and/or replace the slangs on the data of an...

Description Usage Arguments Format Details Inherit Methods Private fields See Also

Description

This class allows you to preprocess the data of an instance to find the slangs that are in it. Optionally, you can decide whether to delete the data slangs or not.

Usage

1
2
3
4
SlangPipe$new(propertyName = "langpropname",
              propertyLanguageName = "language",
              alwaysBeforeDeps = list("GuessLanguagePipe"),
              notAfterDeps = list())

Arguments

propertyName

(character) Name of the property associated with the pipe.

propertyLanguageName

(character) Name of the language property.

alwaysBeforeDeps

(list) The dependences alwaysBefore (pipes that must be executed before this one).

notAfterDeps

(list) The dependences notAfter (pipes that cannot be executed after this one).

Format

An object of class R6ClassGenerator of length 24.

Details

This class needs files in json format that will contain the slangs to be located and the string that will replace them. For this it is necessary that the instance contains a property that indicates the language of the data to be able to correctly choose the list of slangs that apply to the data. The format of the file names of the resources has to be: slang.xxx.json (Being xxx the value of the language property of the instance).

To indicate the path where the associated resources are located, the configuration file is used. It is necessary to indicate in the section called resourcesPath, the path of resourcesSlangsPath.

The pipe will invalidate the instance in the moment that the resulting data is empty.

Inherit

This class inherits from PipeGeneric and implements the pipe abstract function.

Methods

Private fields

See Also

PipeGeneric, Instance, ResourceHandler


miferreiro/bdp4R documentation built on May 20, 2019, 12:59 a.m.