document more on the Naive Bayesian Classifier

This commit is contained in:
Matthew Fisher 2018-03-21 15:50:58 -07:00
Родитель 267ad3d302
Коммит 0a5f05eef9
1 изменённых файлов: 1 добавлений и 1 удалений

Просмотреть файл

@ -63,7 +63,7 @@ Plans and ideas to improve the pack creation workflow can be found in [issue 287
## Pack Detection
When `draft create` is executed on an application, Draft performs a deep search on the current directory to determine the language, then starts iterating through the packs available in `$(draft home)/packs`. If it finds a pack that matches the language description, it will then use that pack to bootstrap the application.
When `draft create` is executed on an application, Draft performs a deep search on the current directory to determine the language. It displays language percentages based on the files present in the current directory and subdirectories. The percentages are calculated based on the bytes of code for each language as reported by a [Naive Bayesian Classifier](https://en.wikipedia.org/wiki/Naive_Bayes_classifier), which is trained on files provided by [github/linguist](https://github.com/github/linguist). Draft then starts iterating through the packs available in `$(draft home)/packs`. If it finds a pack that matches the language description, it will then use that pack to bootstrap the application.
Draft's smart pack detection can be overridden with the `--pack` flag. The detection logic will not be run and Draft will bootstrap the app with the specified pack, no questions asked.