<?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use App\Http\Requests\RawRequest;
use App\Models\Raw;
class RawController extends Controller
{
public function raws() {
return view('raws', ['raws'=> Raw::orderBy('id', 'asc')->paginate(config('variable.paginate.table'))]);
}
public function createRaw() {
return view('new_raw');
}
public function updateRaw($id, RawRequest $request) {
$raw = Raw::find($id);
$raw->name = $request->input('name');
$raw->description = $request->input('description');
$raw->save();
return redirect()->route('raws');
}
public function uploadRaw(RawRequest $request) {
$raw = new Raw();
$raw->name = $request->input('name');
$raw->description = $request->input('description');
$raw->save();
return redirect()->route('raw.create');
}
public function setRawToProduct() {
return view('components', ['raws'=> Raw::all()]);
}
}
{'alt.atheism': Count TF \
Без стоп-слов Со стоп-словами Без стоп-слов
0 (god, 405) NaN (don, 23.028134212098568)
1 (people, 330) NaN (god, 22.7390659634348)
2 (don, 262) NaN (people, 21.992093372266293)
3 (think, 215) NaN (think, 19.74329451753867)
4 (just, 209) NaN (just, 17.438244100003825)
5 (does, 207) NaN (say, 13.934933025414747)
6 (atheism, 199) NaN (does, 13.529289650005731)
7 (say, 174) NaN (know, 12.778648157368789)
8 (believe, 163) NaN (like, 11.853680054917413)
9 (atheists, 162) NaN (religion, 10.659592714019288)
10 (like, 162) NaN (time, 9.52880161781797)
11 (religion, 156) NaN (said, 9.481693846015904)
12 (jesus, 155) NaN (atheism, 9.07019912579126)
13 (know, 154) NaN (believe, 8.86045824397283)
14 (argument, 148) NaN (good, 8.179118655145967)
15 (time, 135) NaN (ve, 7.9196590076244995)
16 (said, 131) NaN (way, 7.6007624135558745)
17 (true, 131) NaN (did, 7.484046074823044)
18 (bible, 121) NaN (bible, 7.332003632101348)
19 (way, 120) NaN (islam, 7.246044059603053)
TF-IDF \
Со стоп-словами Без стоп-слов Со стоп-словами
0 NaN (god, 13.339517067126604) NaN
1 NaN (don, 11.143284660635869) NaN
2 NaN (people, 11.03896851681279) NaN
3 NaN (think, 10.439852532165277) NaN
4 NaN (just, 9.826482653437349) NaN
5 NaN (does, 7.924096838404766) NaN
6 NaN (say, 7.876077346828552) NaN
7 NaN (know, 7.190324073904586) NaN
8 NaN (religion, 6.920697244672647) NaN
9 NaN (atheism, 6.546077204489129) NaN
10 NaN (like, 6.524429710853716) NaN
11 NaN (believe, 5.98515896022011) NaN
12 NaN (said, 5.964300060930759) NaN
13 NaN (time, 5.6232439235315885) NaN
14 NaN (islam, 5.611832827522266) NaN
15 NaN (bible, 5.367745881814317) NaN
16 NaN (did, 5.3278080834004475) NaN
17 NaN (ve, 5.252228683691001) NaN
18 NaN (atheists, 5.238206038094362) NaN
19 NaN (good, 5.236403839018066) NaN
Count TF TF-IDF
Со стоп-cловами Со стоп-cловами Со стоп-cловами
0 (the, 4551) (the, 142.70912068295237) (the, 58.72946801777127)
1 (of, 2643) (to, 85.82286903919766) (to, 37.63352694429252)
2 (to, 2636) (of, 79.1766711187928) (of, 36.28679525229283)
3 (is, 2178) (that, 70.17532080434249) (is, 33.1365985493515)
4 (that, 1983) (is, 66.39741803525008) (that, 32.398092983642165)
5 (and, 1682) (and, 54.327521179137065) (you, 27.5232309767464)
6 (in, 1446) (you, 53.7576690257119) (and, 26.05382484121586)
7 (it, 1430) (it, 52.35320512022453) (it, 25.985828093531275)
8 (you, 1122) (in, 46.67304386398525) (in, 23.834386086695314)
9 (not, 978) (not, 31.960164969406677) (not, 18.58878035802214)
10 (be, 803) (be, 28.434719343279586) (are, 16.567546360540593)
11 (are, 796) (this, 26.78361973051118) (this, 16.472783673412255)
12 (this, 789) (are, 26.658653308584455) (be, 16.454558146850715)
13 (for, 756) (for, 25.636485421179717) (have, 15.607111062407983)
14 (have, 712) (have, 25.121158687534212) (for, 15.092515163436014)
15 (as, 688) (as, 21.455307779470655) (as, 14.225196597773422)
16 (but, 588) (if, 20.285204686409266) (they, 13.202729049674149)
17 (or, 565) (but, 19.520790480236954) (if, 13.065711167091644)
18 (if, 536) (on, 18.52564088806366) (but, 12.749259503726345)
19 (they, 495) (they, 18.47355135690449) (what, 12.381880863182444) , 'rec.motorcycles': Count TF \
Без стоп-слов Со стоп-словами Без стоп-слов
0 (bike, 336) NaN (bike, 35.323361821264406)
1 (just, 196) NaN (like, 22.025167861721894)
2 (like, 194) NaN (just, 21.563057746107546)
3 (dod, 190) NaN (don, 16.633851005280857)
4 (don, 144) NaN (know, 16.118731150889516)
5 (know, 142) NaN (dod, 12.871200662458488)
6 (good, 121) NaN (good, 12.55508390667668)
7 (ride, 118) NaN (think, 12.393350415040643)
8 (motorcycle, 105) NaN (right, 11.767497610255504)
9 (time, 105) NaN (ride, 11.323790052647142)
10 (right, 102) NaN (bikes, 11.093137005593368)
11 (think, 102) NaN (ve, 10.705484130396027)
12 (bikes, 100) NaN (new, 9.902179893443986)
13 (new, 95) NaN (motorcycle, 9.648656954755497)
14 (riding, 94) NaN (time, 9.513332060035598)
15 (make, 92) NaN (riding, 9.439508812212402)
16 (ve, 90) NaN (make, 9.384436582768725)
17 (way, 88) NaN (really, 8.811280224659836)
18 (helmet, 82) NaN (going, 8.762596960015445)
19 (going, 78) NaN (ll, 8.71583963822576)
}
['alt.atheism', 'rec.motorcycles', 'talk.politics.guns', 'full']
а это, выдает print cats
Интересно, а как так Вы raw решили передать с фронта? И если можно пояснения