class Naive::TrainedData

Defined in:

naive.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new #

[View source]

Instance Method Detail

def docCountOfClasses : Hash(String, Int32) #

[View source]
def frequencies : Hash(String, Hash(String, Int32)) #

[View source]
def getClassDocCount(className : String) #

returns document count of the class. If class is not available, it returns Nil


[View source]
def getClasses #

returns the names of the available classes as list


[View source]
def getDocCount #

returns all documents count


[View source]
def getFrequency(token : String, className : String) : Int32 | Nil #

[View source]
def increaseClass(className : String, byAmount : Int = 1) #

[View source]
def increaseToken(token : String, className : String, byAmount : Int = 1) #

[View source]