Description Usage Arguments Format Details Inherit Methods Public fields Private fields See Also
Class to compute synsets from text.
1 2 3 4 | StringBuffer2SynsetVectorPipe$new(propertyName = "synsetVector",
propertyLanguageName = "language",
alwaysBeforeDeps = list(),
notAfterDeps = list())
|
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). |
An object of class R6ClassGenerator
of length 24.
Building...
This class inherits from PipeGeneric
and implements the
pipe
abstract function.
pipe Compute synsets from text. This method get data from StringBuffer and process instances: - Invalidate instance if the language is not present - Get the list of unmatched texts - Process this texts to get matches - Build a synset vector
Usage
pipe(instance)
Value
The instance with the modifications that have occurred in the pipe.
Arguments
instance (Instance) Instance to preproccess.
computeUnmatched This method find fagments in text (str) thar are incorrect.
Usage
computeUnmatched(str, lang)
Value
A list where the name is the incorrect fragment and the value will be the replacement (null now).
Arguments
str (character) The original text.
lang (character) The language of the original text.
handleUnmatched Try to fix terms that are incorrectly written. The original text should be fixed according with the replacements made. Implement the UnmatchedTextHandler interface and one specific implementations that are: + UrbanDictionaryHandler
Usage
handleUnmatched(originalText, unmatched, lang)
Value
A string containing the original text fixed.
Arguments
originalText (character) The originalText to fix.
unmatched (list) A list of text fragments that should be tryed to fix. The text fragments are in the form of a pair (T,R) where T is the original fragment ant R the replacement (null originally). This method should fill R with the suggested replacement.
lang (character) The language of the original text.
buildSynsetVector Create a synsetVector from text. Call Babelfy api to transform the string into a vector of sysnsets. The fisrt string in the pair is the synsetID from babelnet. The second string is the matched text.
Usage
buildSynsetVector(fixedText, lang)
Value
A list of synsets. Each synset is represented in a pair (S,T) where S stands for the synset ID and T for the text that matches this synset ID.
Arguments
fixedText (character) The text to transform into a synset vector.
lang (character) The language in which the original text is written.
getPropertyLanguageName Getter of name of property language.
Usage
getPropertyLanguageName()
Value
Value of name of property language.
vUTH (list) An array of UnmatchedTextHandlers to fix incorrect text fragments.
acceptedCharOnBeggining (character) List of puntuation marks accepted on the beggining of a word.
acceptedCharOnBegginingPattern (character) List of puntuation marks accepted on the beggining of a word.
acceptedCharOnEnd (character) List of puntuation marks accepted on the end of a word.
acceptedCharOnEndPattern (character) List of puntuation marks accepted on the end of a word.
acceptedCharOnMiddle (character) List of puntuation marks accepted on the middle of a word.
acceptedCharOnMiddlePattern (character) List of puntuation marks accepted on the middle of a word.
puntMarkPattern (character) A pattern to detect puntuation marks.
propertyLanguageName (character) The name of property about language.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.