https://luarocks.org/modules/leafo/lapis-bayes
This update has no functional differences but includes refactors to internal function calls. If you are using the documented interface in the README then no changes are necessary.
Changes
-
Removed
increment_text
method fromCategories
model -- The Categories model has no ties to any particular classifier anymore. A classier or tokenizer instance must be used to convert text to a list of words. -
Categoires:increment_words
can also take an array of words, in addition to hash table format -
Remove the
lapis.bayes.tokenizer
module, which included a global instance of a tokenizer. Use a classifier or tokenizer directly to tokenize text. Thetokenize_text
function previously available on this module is now thetokenize_text
method of any classifier. -
Added new methods to
BaseClassifier
class inlapis.bayes.classifiers.base
. The base classifier now has methods that mirror the functions provided in thelapis.bayes
module- Add
find_word_classifications
method that can be used to override the query for looking up the word counts - Add
classify_text
method - Add
tokenize_text
method
- Add
-
Add support for
regconfig
option to thePostgresTextTokenizer
. Previously it was hard-coded toenglish
. -
Updates to test suite
Full Changelog: v1.2.0...v1.3.0