mirror of
https://github.com/ralsina/tartrazine.git
synced 2025-06-19 06:33:06 -03:00
go: remove Classifier from API
Even more reduces public API surface by hiding un-used Classifier API for providing a pre-trained classifier weights. Signed-off-by: Alexander Bezzubov <bzz@apache.org>
This commit is contained in:
@ -332,7 +332,7 @@ func (s *EnryTestSuite) TestGetLanguagesBySpecificClassifier() {
|
||||
name string
|
||||
filename string
|
||||
candidates []string
|
||||
classifier Classifier
|
||||
classifier classifier
|
||||
expected string
|
||||
}{
|
||||
{name: "TestGetLanguagesByClassifier_1", filename: filepath.Join(s.samplesDir, "C/blob.c"), candidates: []string{"python", "ruby", "c", "c++"}, classifier: defaultClassifier, expected: "C"},
|
||||
@ -348,7 +348,7 @@ func (s *EnryTestSuite) TestGetLanguagesBySpecificClassifier() {
|
||||
content, err := ioutil.ReadFile(test.filename)
|
||||
assert.NoError(s.T(), err)
|
||||
|
||||
languages := GetLanguagesBySpecificClassifier(content, test.candidates, test.classifier)
|
||||
languages := getLanguagesBySpecificClassifier(content, test.candidates, test.classifier)
|
||||
var language string
|
||||
if len(languages) == 0 {
|
||||
language = OtherLanguage
|
||||
|
Reference in New Issue
Block a user