ignore empty documents #70

Merged
merged 1 commit into from Sep 29, 2012

Projects

None yet

2 participants

Contributor
joscha commented Sep 27, 2012

When calling

classifier.addDocument("","someClass");
or
classifier.addDocument([],"someClass");

there is no real value added, as the class gets added to the classifier, but there is no data to base any classification on - ergo probability for this class will always be 0% - this pull request fixes this by not adding the empty data at all and thus making sure that the classifier does not get unnecessarily bloated.

Owner

thanks!

@chrisumbel chrisumbel merged commit 2f7c95a into NaturalNode:master Sep 29, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment