Move classifer db to samples.yml

This commit is contained in:
Joshua Peek
2012-07-23 13:05:08 -05:00
parent 3172bf5b46
commit 97ae7c1a11
3 changed files with 4 additions and 4 deletions

View File

@@ -8,15 +8,15 @@ Rake::TestTask.new do |t|
end
file 'lib/linguist/classifier.yml' => Dir['samples/**/*'] do |f|
file 'lib/linguist/samples.yml' => Dir['samples/**/*'] do |f|
require 'linguist/sample'
classifier = Linguist::Sample.classifier
File.open(f.name, 'w') { |io| classifier.to_yaml(io) }
end
CLOBBER.include 'lib/linguist/classifier.yml'
CLOBBER.include 'lib/linguist/samples.yml'
task :classifier => [:clobber, 'lib/linguist/classifier.yml']
task :classifier => [:clobber, 'lib/linguist/samples.yml']
namespace :classifier do
LIMIT = 1_000

View File

@@ -4,7 +4,7 @@ module Linguist
# Language bayesian classifier.
class Classifier
# Internal: Path to persisted classifier db.
PATH = File.expand_path('../classifier.yml', __FILE__)
PATH = File.expand_path('../samples.yml', __FILE__)
# Public: Check if persisted db exists on disk.
#