Open Sidebar
Close Sidebar
CrystalDoc.info
Source code
Shards.info
naive
master
Naive
Classifier
NotSeen
Tokeniser
TrainedData
Trainer
Built with Crystal 1.9.2
2023-10-07 20:19:24 UTC
class
Naive::Classifier
Naive::Classifier
Reference
Object
Defined in:
naive.cr
Constructors
.new
(trainedData : TrainedData, tokeniser : Tokeniser)
Instance Method Summary
#classify
(text : String)
#getPrior
(className : String)
#getTokenProb
(token : String, className : String) : Float64
Constructor Detail
def self.
new
(trainedData :
TrainedData
, tokeniser :
Tokeniser
)
#
[
View source
]
Instance Method Detail
def
classify
(text : String)
#
[
View source
]
def
getPrior
(className : String)
#
[
View source
]
def
getTokenProb
(token : String, className : String) : Float64
#
[
View source
]