mirror of
https://github.com/ralsina/tartrazine.git
synced 2025-06-19 22:53:05 -03:00
new by content heuristisc, nore
This commit is contained in:
@ -64,14 +64,20 @@ func (s *TSuite) TestGetLanguageByContentLinguistCorpus(c *C) {
|
||||
if f.Name() == "filenames" {
|
||||
return filepath.SkipDir
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
expected := filepath.Base(filepath.Dir(path))
|
||||
filename := filepath.Base(path)
|
||||
extension := filepath.Ext(path)
|
||||
content, _ := ioutil.ReadFile(path)
|
||||
|
||||
if extension == "" {
|
||||
return nil
|
||||
}
|
||||
|
||||
total++
|
||||
expected := filepath.Base(filepath.Dir(path))
|
||||
filename := filepath.Base(path)
|
||||
content, _ := ioutil.ReadFile(path)
|
||||
|
||||
obtained, safe := GetLanguageByContent(filename, content)
|
||||
if obtained == OtherLanguage {
|
||||
other++
|
||||
|
Reference in New Issue
Block a user