The library documents itself · NLP & linguistics
stzNaiveBayes
7 own methods · 0 forms written with extensions, listed under their method
the source: base/learning/stzNaiveBayes.ring(opens in a new tab) · All classes · The area reference: NLP & linguistics
Under each method, its extensions (Q CS XT Z ZZ IB W U): bold and ticked, it exists; struck, it does not. The extensions and what they mean
Examples: 0 come from the library's tests; 4 were composed from each method's signature and run for this page, on a fresh object, for example o1 = new stzNaiveBayes() o1.Train("free money now", "spam") o1.Train("meeting at noon", "work") o1.Train("win free prizes", "spam"). 3 methods have none yet. Examples run on 2026-10-04 07:31 inside the library at commit 0e72e2e2c.
Method
Explanation, as the source carries it
init
(no comment in the source: the name reads as a sentence) initno extension
(no comment in the source: the name reads as a sentence) train 2 examples runno extension
composed example
o1 = new stzNaiveBayes()
o1.Train("free money now", "spam")
o1.Train("meeting at noon", "work")
o1.Train("win free prizes", "spam")
o1.Train("win free money", "spam")
? o1.NumberOfDocuments()
#--> 4composed from the signature, run for this pageLabels
(no comment in the source: the name reads as a sentence) labelsno extension
composed example
o1 = new stzNaiveBayes()
o1.Train("free money now", "spam")
o1.Train("meeting at noon", "work")
o1.Train("win free prizes", "spam")
? @@( o1.Labels() )
#--> [ "spam", "work" ]composed from the signature, run for this page(no comment in the source: the name reads as a sentence) number of documents 1 examples runno extension
(no comment in the source: the name reads as a sentence) vocabulary size 2 examples runno extension
composed example
o1 = new stzNaiveBayes()
o1.Train("free money now", "spam")
o1.Train("meeting at noon", "work")
o1.Train("win free prizes", "spam")
? o1.VocabularySize()
#--> 8composed from the signature, run for this page(no comment in the source: the name reads as a sentence) classify 1 examples runno extension
composed example
o1 = new stzNaiveBayes()
o1.Train("free money now", "spam")
o1.Train("meeting at noon", "work")
o1.Train("win free prizes", "spam")
? o1.Classify("win free money")
#--> spamcomposed from the signature, run for this pageWhy
(no comment in the source: the name reads as a sentence) whyno extension

