セパレータを使用してテキストをチャンクに分割する
Chunks = tokens(text) Chunks = tokens(text, separators)
[" ", ascii(9)], ascii(9) being the horizontal tab.
tokens(…) は,
文字列textの中に含まれるトークンを探します.
tokens(…)は,テキストでセパレータを検索し,それをチャンクに分割します.
チャンクにはセパレータがありません. 連続する区切り文字がマージされます.
tokens("The given text") tokens("SCI/demos/scicos", "/")' tokens("Επιστήμη και καινοτομία", ["α"," "])' nbsp = ascii(160); // non-breakable space t = "the" + nbsp + "given text" tokens(t) | ![]() | ![]() |
--> tokens('The given text')
ans =
"The"
"given"
"text"
--> tokens('SCI/demos/scicos', '/')'
ans =
"SCI" "demos" "scicos"
--> tokens("Επιστήμη και καινοτομία", ["α"," "])'
ans =
"Επιστήμη" "κ" "ι" "κ" "ινοτομί"
--> nbsp = ascii(160); // non-breakable space
--> t = "the" + nbsp + "given text"
t =
"the given text"
--> tokens(t)
ans =
"the given"
"text"