GC classifier db

This commit is contained in:
Joshua Peek
2012-06-08 16:04:43 -05:00
parent fd8b70ffa4
commit 8a75d4d208
3 changed files with 21 additions and 2 deletions

View File

@@ -15,7 +15,7 @@ class TestClassifier < Test::Unit::TestCase
File.read(File.join(fixtures_path, name))
end
def test_train_and_classify
def test_classify
classifier = Classifier.new
classifier.train Language["Ruby"], fixture("ruby/foo.rb")
classifier.train Language["Objective-C"], fixture("objective-c/Foo.h")
@@ -30,6 +30,10 @@ class TestClassifier < Test::Unit::TestCase
assert results.first[1] < 0.5, results.first.inspect
end
def test_gc
Classifier.instance.gc
end
# def test_instance_classify
# Sample.each do |sample|
# results = Classifier.instance.classify(sample.data)