mirror of
https://github.com/thewesker/twitter_ebooks.git
synced 2025-12-20 04:11:08 -05:00
Be more paranoid about identifying mentions
This commit is contained in:
@@ -59,13 +59,13 @@ module Ebooks
|
|||||||
|
|
||||||
statements.each do |s|
|
statements.each do |s|
|
||||||
@sentences << NLP.tokenize(s).reject do |t|
|
@sentences << NLP.tokenize(s).reject do |t|
|
||||||
t.start_with?('@') || t.start_with?('http')
|
t.include?('@') || t.include?('http')
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
mentions.each do |s|
|
mentions.each do |s|
|
||||||
@mentions << NLP.tokenize(s).reject do |t|
|
@mentions << NLP.tokenize(s).reject do |t|
|
||||||
t.start_with?('@') || t.start_with?('http')
|
t.include?('@') || t.include?('http')
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user