GuessLanguagePipe {bdpar} | R Documentation |
Class to guess the language of an Instance
Description
This class allows guess the language by using language detector of library cld2. Creates the language property which indicates the idiom text.
Note
The Pipe will invalidate the Instance
if the language of the data
can not be detect.
Inherit
This class inherits from GenericPipe
and implements the
pipe
abstract function.
Super class
bdpar::GenericPipe
-> GuessLanguagePipe
Methods
Public methods
Inherited methods
Method new()
Creates a GuessLanguagePipe
object.
Usage
GuessLanguagePipe$new( propertyName = "language", alwaysBeforeDeps = list("StoreFileExtPipe", "TargetAssigningPipe"), notAfterDeps = list() )
Arguments
propertyName
A
character
value. Name of the property associated with theGenericPipe
.alwaysBeforeDeps
A
list
value. The dependencies alwaysBefore (GenericPipes
that must be executed before this one).notAfterDeps
A
list
value. The dependencies notAfter (GenericPipes
that cannot be executed after this one).
Method pipe()
Preprocesses the Instance
to obtain the
language of the data.
Usage
GuessLanguagePipe$pipe(instance)
Arguments
Returns
The Instance
with the modifications that have
occurred in the pipe.
Method getLanguage()
Guesses the language of data.
Usage
GuessLanguagePipe$getLanguage(data)
Arguments
data
A
character
value. The text to guess the language.
Returns
The language guesser. Format: see ISO 639-3:2007.
Method clone()
The objects of this class are cloneable with this method.
Usage
GuessLanguagePipe$clone(deep = FALSE)
Arguments
deep
Whether to make a deep clone.
See Also
AbbreviationPipe
, bdpar.Options
,
ContractionPipe
, File2Pipe
,
FindEmojiPipe
, FindEmoticonPipe
,
FindHashtagPipe
, FindUrlPipe
,
FindUserNamePipe
, GuessDatePipe
,
Instance
, InterjectionPipe
,
MeasureLengthPipe
, GenericPipe
,
SlangPipe
, StopWordPipe
,
StoreFileExtPipe
, TargetAssigningPipe
,
TeeCSVPipe
, ToLowerCasePipe