{{ count($news) }} articles récupérés sur {{ count($feeds_urls) }} médias @foreach ($news as $first_new) @php $first_line_displayed = false; @endphp @foreach ($news as $sous_new) @if ($first_new->title != $sous_new->title) @php $jacard = round(\App\Http\Controllers\TestNotifyController::getJaccardSimilarityCoefficient($first_new->title, $sous_new->title, ' ') * 100); $similar_1 = similar_text($first_new->title, $sous_new->title); $similar_2 = similar_text($sous_new->title, $first_new->title); $pourcent_jacard = 40; $pourcent_similar = 52; @endphp @if ($jacard >= $pourcent_jacard OR $similar_1 >= $pourcent_similar OR $similar_2 >= $pourcent_similar) @if ($first_line_displayed == false) @php $first_line_displayed = true; @endphp @endif @endif @endif @endforeach @endforeach
Article Date Média Jacard Similar Text FIRST / SOUS Similar Text SOUS / FIRST
{{ $first_new->title }} {{ $first_new->date->format('d/m/Y H:i') }} {{ $first_new->media }}
{{ $sous_new->title }} {{ $sous_new->date->format('d/m/Y H:i') }} {{ $sous_new->media }} {{ $jacard }} {{ $similar_1 }} {{ $similar_2 }}