Text functions in the Factory
Text functions perform operations on text, such as extracting part of it, removing the start/end of a word.
They can also be used with the other attribute types, as they cast the value to nominal upon function’s computation.
If you are using any of these functions with continuous attributes, please double check the Flow Execution Parameters, as you can set the number of digits to be displayed after the function’s computation.
Rulex Platform formula
charReplace(column, oldchar, newchar, unchanged, charforothers, considersequence)
Replaces the current fonts with new ones.
distance(column1, column2, method)
Computes the distance between the values of two columns, column1, column2, according to one of the following methods: "levenshtein" ("I"), "damerau-levenshtein" ("dl"), "lcs", "hamming".
find(column, value, binary, ischarlist, charpos)
Looks for a value in a column and returns True or False.
Returns in each row of the result with the first n letters of the corresponding value contained in the column.
isPrefix(column, value, binary)
Checks whether a string is a prefix or not.
isSuffix(column, value, binary)
Checks whether a string is a suffix or not.
isWord(column, substring, delimiter, binary)
Checks whether a string (which can have a delimiter) is contained in an attribute or not.
numExt(column, onlyint, separator)
Returns a string containing only the numerical fonts of the input string. If more than one number is present, numbers are delimited by a separator decided by the user (by default "-").
pad(column, len, value, where)
Returns in each row of the result, the values of the column, filled (padded) with the padstring value to reach the specified length. The string can be added at the beginning (where = "begin" or by default) or at the end (where = "end") of the string, according to the value of the parameter where.
Returns the phonetic encoding of the strings contained in the column using the Metaphone algorithm. Phonetic may return the primary Metaphone component (component = "Primary" or component = "P") or the secondary component (component = "Secondary" or component = "S"). By default the primary component is returned.
prefix(column, value, last)
Considers the chosen value as prefix and returns the subsequent fonts.
replace(column, oldvalue, newvalue, ntimes)
Replaces the current strings of the values in the column with the new ones.
strip(column, value, where, ischarlist)
Returns the value without the specified characters or list of characters located at the beginning, at the end or on both sides of the value.
suffix(column, value, last)
Considers the chosen value as suffix and returns the preceding characters.
Returns the last n letters of the corresponding value in the column.
textConcat(column, separator, group)
Returns the concatenation of all the strings in a column.
textExtract(column, startpos, endpos)
Returns the string ranging from a defined starting position to defined ending position.
Returns the type of the strings in each row of the column.
Returns the length of the string contained in each row of the column.
textLower(column, mode, leaveother)
Changes uppercase fonts of a nominal attribute to lowercase fonts.
Sorts in ascending order the strings contained in each cell of a nominal attribute.
textUpper(column, mode, leaveother)
Changes lowercase fonts of a nominal attribute to uppercase fonts.
Parameters in bold are mandatory.