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.aucune extension
exemple composé
o1 = new stzWordStream()
o1.SetCaseSensitive(TRUE)
o1.Feed("Cat cat")
? o1.DistinctWords()
#--> 2composé à partir de la signature, exécuté pour cette pageEngine
(sans commentaire dans la source : le nom se lit comme une phrase) engineaucune extension
Feed
feeding dataaussi écrite: Add · FeedChunkQCSXTZZZIBWUMany
exemple composé
o1 = new stzWordStream()
o1.Feed("the cat saw the dog and the cat ran")
o1.Feed("one two two three")
? o1.NumberOfWords()
#--> 13composé à partir de la signature, exécuté pour cette pageFeedChunks
feeding dataaucune extension
exemple composé
o1 = new stzWordStream()
o1.Feed("the cat saw the dog and the cat ran")
o1.FeedChunks([ "one two", "two three" ])
? o1.NumberOfWords()
#--> 13composé à partir de la signature, exécuté pour cette pageTopWords
[[word, count], ...] over EVERYTHING fed so far, top-N by count.aucune extension
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 pageWordsAndTheirCounts
[[word, count], ...] over everything fed, in first-appearance order.aucune extension
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 pageMostFrequentWords
Just the words of the top-N (drops the counts).aucune extension
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 pageMostFrequentWord
queryingaucune extension
exemple composé
o1 = new stzWordStream()
o1.Feed("the cat saw the dog and the cat ran")
? o1.MostFrequentWord()
#--> thecomposé à partir de la signature, exécuté pour cette pageTotalWords
Total tokens fed (with multiplicity).aussi écrite: NumberOfWordsaucune extension
DistinctWords
Size of the vocabulary (distinct words) accumulated so far.aussi écrite: VocabularySize · NumberOfDistinctWordsaucune extension
exemple composé
o1 = new stzWordStream()
o1.Feed("the cat saw the dog and the cat ran")
? o1.DistinctWords()
#--> 6composé à partir de la signature, exécuté pour cette pageFree
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

