mirror of
https://github.com/KevinMidboe/linguist.git
synced 2025-10-29 17:50:22 +00:00
GC classifier db
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user