This commit is contained in:
Brandon Keepers
2014-11-27 11:40:48 -05:00
parent bf4baff363
commit e42ccf0d82
2 changed files with 15 additions and 2 deletions

View File

@@ -6,7 +6,7 @@ module Linguist
# Public: Use the classifier to detect language of the blob.
#
# blob - An object that quacks like a blob.
# possible_languages - Array of
# possible_languages - Array of Language objects
#
# Examples
#
@@ -14,7 +14,7 @@ module Linguist
# Language["Ruby"], Language["Python"]
# ])
#
# Returns an Array of possible lanuages, most probable first.
# Returns an Array of Language objects, most probable first.
def self.call(blob, possible_languages)
language_names = possible_languages.map(&:name)
classify(Samples.cache, blob.data, language_names).map do |name, _|