SEMANTICKEYPHRASETABLE
SEMANTICKEYPHRASETABLE is a table-valued function in SQL Server that allows you to extract and rank key phrases based on their statistical significance in a full-text indexed catalog. It can be used to gain semantic insight into documents or records stored in your database.
SEMANTICKEYPHRASETABLE( table, column, source_key )
- table: The table parameter specifies the name of the table that contains the column you’re targeting for semantic keyword analysis. This could be any existing table within the database where the Full-Text Semantic Search feature is activated.
- column: This parameter denotes the specific column in the previously mentioned table that will be analyzed for semantic keywords. The column must be of the type nvarchar(max), varchar(max), or varbinary(max).
- source_key: It signifies a unique key to a full-text indexed record in the specified table. Using this parameter, the SEMANTICKEYPHRASETABLE function retrieves a table of key phrases associated with the specified key value from the specified table and column.
Example
Output
Explanation
The SEMANTICKEYPHRASETABLE function in the example returns key phrases in the full-text indexed columns of MyTable that are semantically similar to a user specified phrase, ‘software development’. The function results are ordered in descending order by score, which measures the semantic similarity between the specified phrase and the key phrases in the table.