From 5d55d90f8586e8a3b138ace532295c1d31d06b6f Mon Sep 17 00:00:00 2001 From: Mispy <^_^@mispy.me> Date: Thu, 24 Apr 2014 20:55:53 -0700 Subject: [PATCH] Be more paranoid about identifying mentions --- lib/twitter_ebooks/model.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/twitter_ebooks/model.rb b/lib/twitter_ebooks/model.rb index 9a79b48..9924584 100644 --- a/lib/twitter_ebooks/model.rb +++ b/lib/twitter_ebooks/model.rb @@ -59,13 +59,13 @@ module Ebooks statements.each do |s| @sentences << NLP.tokenize(s).reject do |t| - t.start_with?('@') || t.start_with?('http') + t.include?('@') || t.include?('http') end end mentions.each do |s| @mentions << NLP.tokenize(s).reject do |t| - t.start_with?('@') || t.start_with?('http') + t.include?('@') || t.include?('http') end end