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::Tokeniser
Naive::Tokeniser
Reference
Object
Defined in:
naive.cr
Constructors
.new
(stop_words : Array(String) =
[]
of
String
, signs : Array(String) = [
"?!#%&"
])
Instance Method Summary
#remove_punctuation
(token : String)
#remove_stop_words
(token : String)
#tokenise
(text : String)
Constructor Detail
def self.
new
(stop_words : Array(String) =
[]
of
String
, signs : Array(String) = [
"?!#%&"
])
#
[
View source
]
Instance Method Detail
def
remove_punctuation
(token : String)
#
[
View source
]
def
remove_stop_words
(token : String)
#
[
View source
]
def
tokenise
(text : String)
#
[
View source
]