From f10ed49586c9b04aa986faef01c112644f3f68f4 Mon Sep 17 00:00:00 2001 From: Daniel Supernault Date: Thu, 28 May 2020 23:26:22 -0600 Subject: [PATCH] Update Entity Extractor --- app/Util/Lexer/Extractor.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/app/Util/Lexer/Extractor.php b/app/Util/Lexer/Extractor.php index bcdbba919..5cf43d610 100755 --- a/app/Util/Lexer/Extractor.php +++ b/app/Util/Lexer/Extractor.php @@ -452,6 +452,9 @@ class Extractor extends Regex $start_position = $at[1] > 0 ? StringUtils::strlen(substr($tweet, 0, $at[1])) : $at[1]; $end_position = $start_position + StringUtils::strlen($at[0]) + StringUtils::strlen($username[0]); $screenname = trim($all[0]) == '@'.$username[0] ? $username[0] : trim($all[0]); + if(\App\Profile::whereUsername($screenname)->exists() == false) { + continue; + } $entity = [ 'screen_name' => $screenname, 'list_slug' => $list_slug[0],