Softanza
DémarrerEnglish
Softanza
La bibliothèque se documente elle-même · Chaînes de caractères

stzWordStream

13 méthodes propres · 1 formes avec extensions, rangées sous leur méthode

la source: base/string/stzWordStream.ring(s'ouvre dans un nouvel onglet) · Toutes les classes · La référence du domaine : Chaînes de caractères

Sous chaque méthode, ses extensions (Q CS XT Z ZZ IB W U) : en gras et cochée, elle existe ; barrée, elle n'existe pas. Les extensions et leur sens

Exemples : 0 viennent des tests de la bibliothèque ; 8 ont été composés à partir de la signature de chaque méthode et exécutés pour cette page, sur un objet neuf, par exemple o1 = new stzWordStream() o1.Feed("the cat saw the dog and the cat ran"). 5 méthodes n'en ont pas encore. Exemples exécutés le 2026-10-04 07:31 dans la bibliothèque au commit 0e72e2e2c.

Méthode
Explication, telle que la source la porte
init
Default = case-INsensitive (folded counting). For case-sensitive accumulation use StzWordStreamCS(1) or .SetCaseSensitive(1) before feeding.aucune extension
SetCaseSensitive
Reconfigure case-sensitivity. Only meaningful BEFORE any Feed -- it discards the (empty) accumulator and starts a fresh one.
exemple composé
o1 = new stzWordStream()
o1.SetCaseSensitive(TRUE)
o1.Feed("Cat cat")
? o1.DistinctWords()
#--> 2
composé à partir de la signature, exécuté pour cette page
aucune extension
Engine
(sans commentaire dans la source : le nom se lit comme une phrase) engineaucune extension
Feed
feeding dataaussi écrite: Add · FeedChunk
exemple composé
o1 = new stzWordStream()
o1.Feed("the cat saw the dog and the cat ran")
o1.Feed("one two two three")
? o1.NumberOfWords()
#--> 13
composé à partir de la signature, exécuté pour cette page
QCSXTZZZIBWUMany
FeedChunks
feeding data
exemple composé
o1 = new stzWordStream()
o1.Feed("the cat saw the dog and the cat ran")
o1.FeedChunks([ "one two", "two three" ])
? o1.NumberOfWords()
#--> 13
composé à partir de la signature, exécuté pour cette page
aucune extension
TopWords
[[word, count], ...] over EVERYTHING fed so far, top-N by count.
exemple composé
o1 = new stzWordStream()
o1.Feed("the cat saw the dog and the cat ran")
? @@( o1.TopWords(2) )
#--> [ [ "the", 3 ], [ "cat", 2 ] ]
composé à partir de la signature, exécuté pour cette page
aucune extension
WordsAndTheirCounts
[[word, count], ...] over everything fed, in first-appearance order.
exemple composé
o1 = new stzWordStream()
o1.Feed("the cat saw the dog and the cat ran")
? @@( o1.WordsAndTheirCounts() )
#--> [ [ "the", 3 ], [ "cat", 2 ], [ "saw", 1 ], [ "dog", 1 ], [ "and", 1 ], [ "ran", 1 ] ]
composé à partir de la signature, exécuté pour cette page
aucune extension
MostFrequentWords
Just the words of the top-N (drops the counts).
exemple composé
o1 = new stzWordStream()
o1.Feed("the cat saw the dog and the cat ran")
? @@( o1.MostFrequentWords(2) )
#--> [ "the", "cat" ]
composé à partir de la signature, exécuté pour cette page
aucune extension
MostFrequentWord
querying
exemple composé
o1 = new stzWordStream()
o1.Feed("the cat saw the dog and the cat ran")
? o1.MostFrequentWord()
#--> the
composé à partir de la signature, exécuté pour cette page
aucune extension
TotalWords
Total tokens fed (with multiplicity).aussi écrite: NumberOfWordsaucune extension
DistinctWords
Size of the vocabulary (distinct words) accumulated so far.aussi écrite: VocabularySize · NumberOfDistinctWords
exemple composé
o1 = new stzWordStream()
o1.Feed("the cat saw the dog and the cat ran")
? o1.DistinctWords()
#--> 6
composé à partir de la signature, exécuté pour cette page
aucune extension
Free
Haro has no destructors -- free the engine-side accumulator explicitly when done (safe to call more than once).aucune extension
Release
Same as Free: Haro has no destructors -- free the engine-side accumulator explicitly when done (safe to call more than once).aucune extension