mirror of
https://github.com/KevinMidboe/linguist.git
synced 2025-10-29 17:50:22 +00:00
Make classify a function on the Classifier
This commit is contained in:
@@ -442,7 +442,7 @@ module Linguist
|
||||
if Language.ambiguous?(extname)
|
||||
possible_languages = Language.all.select { |l| l.extensions.include?(extname) }.map(&:name)
|
||||
if possible_languages.any?
|
||||
if result = Classifier.new(Samples::DATA).classify(data, possible_languages).first
|
||||
if result = Classifier.classify(Samples::DATA, data, possible_languages).first
|
||||
Language[result[0]]
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user