适用于:
Databricks SQL
Databricks Runtime
将 str 拆分为一个数组,其中包含单词数组。
语法
sentences(str [, lang, country] )
参数
-
str:要分析的STRING表达式。 -
lang:一个可选STRING表达式,包含ISO 639 Alpha-2的语言代码(例如“DE”)、Alpha-3或最多 8 个字符的语言子标记。 -
country:可选STRING表达式,其中包含来自ISO 3166 alpha-2国家/地区代码的国家/地区代码或 3 位数字的UN M.49区号。
返回
由 ARRAY 组成的 ARRAY 组成的 STRING。
lang 和 country 的默认值分别为 en 和 US。
示例
> SELECT sentences('Hi there! Good morning.');
[[Hi, there],[Good, morning]]
> SELECT sentences('Hi there! Good morning.', 'en', 'US');
[[Hi, there],[Good, morning]]