Remove gc for now

This commit is contained in:
Joshua Peek
2012-07-23 12:23:20 -05:00
parent 5b28336d56
commit 3172bf5b46
3 changed files with 1 additions and 12 deletions

View File

@@ -57,13 +57,6 @@ module Linguist
nil nil
end end
# Public: Prune infrequent tokens.
#
# Returns receiver Classifier instance.
def gc
self
end
# Public: Guess language of data. # Public: Guess language of data.
# #
# data - Array of tokens or String data to analyze. # data - Array of tokens or String data to analyze.

View File

@@ -89,7 +89,7 @@ module Linguist
data = File.read(sample[:path]) data = File.read(sample[:path])
classifier.train(language.name, data) classifier.train(language.name, data)
} }
classifier.gc classifier
end end
end end
end end

View File

@@ -71,10 +71,6 @@ class TestClassifier < Test::Unit::TestCase
assert_equal data['tokens_total'], data['tokens'].inject(0) { |n, (_, ts)| n += ts.inject(0) { |m, (_, c)| m += c } } assert_equal data['tokens_total'], data['tokens'].inject(0) { |n, (_, ts)| n += ts.inject(0) { |m, (_, c)| m += c } }
end end
def test_gc
Classifier.instance.gc
end
def test_classify_ambiguous_languages def test_classify_ambiguous_languages
Sample.each do |sample| Sample.each do |sample|
language = Linguist::Language.find_by_alias(sample[:language]) language = Linguist::Language.find_by_alias(sample[:language])