-
Notifications
You must be signed in to change notification settings - Fork 123
Open
Labels
enhancementNew feature or requestNew feature or requestgood first issueGood for newcomersGood for newcomerspriority: lowLow priority - nice to haveLow priority - nice to have
Milestone
Description
Summary
The train_from_stream method currently only accepts positional arguments:
classifier.train_from_stream(:spam, File.open("spam_corpus.txt"))For API consistency with other methods like train and add, it would be nice to also support keyword arguments:
classifier.train_from_stream(spam: File.open("spam_corpus.txt"))Affected Classes
Classifier::BayesClassifier::LSIClassifier::KNNClassifier::LogisticRegression
Current Behavior
classifier.train_from_stream(spam: File.open("corpus.txt"))
# => ArgumentError: wrong number of arguments (given 0, expected 2)Expected Behavior
classifier.train_from_stream(spam: File.open("corpus.txt"))
# => Works, trains the :spam category from the streamMetadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or requestgood first issueGood for newcomersGood for newcomerspriority: lowLow priority - nice to haveLow priority - nice to have