Softanza
StartFrançais
Softanza
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 run
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()
#--> 4
composed from the signature, run for this page
no extension
Labels
(no comment in the source: the name reads as a sentence) labels
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 extension
(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 run
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()
#--> 8
composed from the signature, run for this page
no extension
(no comment in the source: the name reads as a sentence) classify 1 examples run
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")
#--> spam
composed from the signature, run for this page
no extension
Why
(no comment in the source: the name reads as a sentence) whyno extension