mirror of
https://github.com/neocities/neocities.git
synced 2025-07-22 10:36:07 +02:00
experimental statistical language classification system
This commit is contained in:
parent
9cc85a48bb
commit
242cc6e92d
15 changed files with 178 additions and 37 deletions
|
@ -120,6 +120,11 @@ post '/admin/banhammer' do
|
|||
|
||||
site = Site[username: params[:username]]
|
||||
|
||||
if !params[:classifier].empty?
|
||||
site.untrain 'index.html'
|
||||
site.train 'index.html', params[:classifier]
|
||||
end
|
||||
|
||||
if site.nil?
|
||||
flash[:error] = 'User not found'
|
||||
redirect '/admin'
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue