17.05 - NGramSplitter Syntax Elements - Teradata Database

Teradata Vantage™ - Advanced SQL Engine Analytic Functions

Advanced SQL Engine
Teradata Database
June 2020
Programming Reference
Specify the name of the column that contains the input text. This column must have a SQL string data type.
Specify the length, in words, of each n-gram (that is, the value of n). A value_range has the syntax integer1-integer2, where integer1 <= integer2. The values of n, integer1, and integer2 must be positive.
[Optional] Specify whether the function allows overlapping n-grams.
Default: 'true' (Each word in each sentence starts an n-gram, if enough words follow it in the same sentence to form a whole n-gram of the specified size. For information on sentences, see the Reset syntax element description.)
[Optional] Specify whether the function converts all letters in the input text to lowercase.
Default: 'true'
[Optional] Specify, in a string, the characters that can end a sentence. At the end of a sentence, the function discards any partial n-grams and searches for the next n-gram at the beginning of the next sentence. An n-gram cannot span sentences.
Default: '.,?!'
[Optional] Specify, in a string, the punctuation characters for the function to remove before evaluating the input text.
Punctuation characters can be from both Unicode and Latin character sets.
Default: '`~#^&*()-'
[Optional] Specify the character or string that separates words in the input text.
Default: ' ' (space)
[Optional] Specify whether the function returns the total number of n-grams in the document (that is, in the row) for each length n specified in the Grams syntax element. If you specify 'true', the TotalCountColName syntax element determines the name of the output table column that contains these totals.
The total number of n-grams is not necessarily the number of unique n-grams.
Default: 'false'
[Optional] Specify the name of the output table column that appears if the value of the OutputTotalGramCount syntax element is 'true'.
Default: 'totalcnt'
[Optional] Specify the names of the input table columns to copy to the output table for each n-gram. These columns cannot have the same names as those specified by the syntax elements NGramColName, GramLengthColName, and TotalCountColName.
Default: All input columns for each n-gram
[Optional] Specify the name of the output table column that is to contain the created n-grams.
Default: 'ngram'
[Optional] Specify the name of the output table column that is to contain the length of n-gram (in words).
Default: 'n'
[Optional] Specify the name of the output table column that is to contain the count of each unique n-gram (that is, the number of times that each unique n-gram appears in the document).
Default: 'frequency'