Algosim documentation: words

words

Returns the list of all words in a string.

Syntax

Description

In general, words(s[...]) returns the ordered list of all words in the text s. The additional arguments specify options for the word-extraction algorithm.

Examples

Alice ≔ ExampleData("Alice in Wonderland") \ 50
ALICE’S ADVENTURES IN WONDERLAND

Lewis Carroll
…
SortBy(frequencies(words(Alice)), (x ↦ −x[2])) \ 20
(the, 1515)
(and, 774)
(to, 717)
(a, 610)
(she, 498)
(of, 494)
(it, 482)
(said, 456)
(I, 400)
(Alice, 385)
(in, 353)
(was, 352)
(you, 308)
(that, 257)
(as, 246)
(her, 243)
(at, 199)
(on, 189)
(had, 177)
(with, 176)
⋮

See also