Twi$erEcho : a Distributed Focused Crawler to Support Open - - PowerPoint PPT Presentation

twi erecho a distributed focused crawler to support open
SMART_READER_LITE
LIVE PREVIEW

Twi$erEcho : a Distributed Focused Crawler to Support Open - - PowerPoint PPT Presentation

Intl. Workshop on Social Media Applica6ons in News and Entertainment SMANE 2012 @ WWW 2012 v Lyon, April 16th 2012 Twi$erEcho :


slide-1
SLIDE 1
  • Intl. ¡Workshop ¡on ¡Social ¡Media ¡Applica6ons ¡in ¡News ¡and ¡Entertainment ¡ ¡

¡ SMANE ¡2012 ¡@ ¡WWW ¡2012 ¡ ¡ ¡v ¡ ¡ ¡Lyon, ¡April ¡16th ¡2012 ¡ ¡

Twi$erEcho: ¡a ¡Distributed ¡Focused ¡Crawler ¡to ¡ Support ¡Open ¡Research ¡with ¡TwiLer ¡Data ¡

hLp://www.fe.up.pt/~eduarda ¡ ¡ ¡v ¡ ¡eduardamr@acm.org ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡

Matko ¡Bošnjak, ¡Eduardo ¡Oliveira, ¡José ¡Mar6ns, ¡ ¡Eduarda ¡Mendes ¡Rodrigues, ¡Luís ¡Sarmento ¡

labs.sapo.pt/up

slide-2
SLIDE 2

Mo6va6on ¡

  • Computa6onal ¡journalism ¡project ¡

– Breaking ¡news ¡are ¡shared ¡on ¡TwiLer ¡and ¡other ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ social ¡media ¡(e.g., ¡blogs) ¡before ¡they ¡are ¡appear ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ in ¡tradi6onal ¡media ¡ – User-­‑generated ¡content ¡is ¡a ¡valuable ¡source ¡of ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ public ¡opinion ¡ – Some ¡applica6ons: ¡

  • predic6ons ¡(e.g., ¡elec6on ¡outcome, ¡box ¡office ¡success) ¡ ¡
  • sen6ment ¡analysis ¡(e.g., ¡public ¡figures, ¡events) ¡
  • finding ¡influencers ¡and ¡topic ¡experts ¡
  • Research ¡on ¡mining ¡social ¡media ¡data ¡and ¡online ¡news ¡

– Text ¡mining, ¡social ¡network ¡analysis ¡

hLp://dmir.inesc-­‑id.pt/reac6on/ ¡ FCT ¡| ¡UT ¡Aus6n ¡programme ¡

slide-3
SLIDE 3

TwiLer ¡Communi6es ¡ ¡

PT ¡ BR ¡

Popula6on: ¡≈1/19 ¡

  • Problem: ¡how ¡to ¡focus ¡the ¡data ¡collec6on ¡on ¡the ¡

Portuguese ¡community? ¡

– Profile ¡loca6on ¡informa6on ¡is ¡not ¡totally ¡reliable ¡ – Geo-­‑loca6on ¡informa6on ¡only ¡present ¡in ¡a ¡very ¡small ¡ percentage ¡of ¡tweets ¡ – Language-­‑based ¡search ¡fails ¡ ¡

slide-4
SLIDE 4

TwiLer ¡Data ¡Licensing ¡

  • Companies ¡can ¡get ¡access ¡to ¡full-­‑fidelity ¡data ¡through ¡

the ¡TwiLer ¡firehose ¡

  • TwiLer's ¡licensing ¡costs: ¡

– E.g., ¡halgose ¡offering ¡50% ¡of ¡all ¡the ¡messages ¡posted ¡to ¡ TwiLer ¡for ¡$360,000 ¡per ¡year ¡ – $0.10 ¡per ¡thousand ¡tweets ¡

¡

  • Solu2on: ¡Twi$erEcho ¡crawler ¡

hLp://labs.sapo.pt/twiLerecho/ ¡

slide-5
SLIDE 5

Crawler ¡Technical ¡Requirements ¡

  • Crawl ¡policy ¡-­‑ ¡adhering ¡to ¡TwiLer ¡API ¡limits ¡
  • Con2nuous ¡opera2on ¡-­‑ ¡able ¡to ¡collect ¡data ¡for ¡

extended ¡periods ¡of ¡6me ¡

  • Run-­‑2me ¡expandability ¡-­‑ ¡implemen6ng ¡changes ¡

without ¡stopping ¡

  • Data ¡completeness ¡-­‑ ¡keeping ¡the ¡data ¡for ¡thousands ¡of ¡

users ¡

  • Fault ¡tolerance ¡-­‑ ¡data ¡should ¡not ¡be ¡compromised ¡
  • Modularity ¡-­‑ ¡easily ¡upgradable ¡with ¡new ¡modules ¡
slide-6
SLIDE 6

TwiLerEcho ¡Architecture ¡

slide-7
SLIDE 7

Architecture ¡-­‑ ¡Client ¡

¡

  • Lookup: ¡User ¡+ ¡Tweets ¡

– Gets ¡tweets, ¡profile ¡info, ¡sta6s6cs ¡ using ¡Lookup ¡(100 ¡profiles ¡in ¡a ¡single ¡ call) ¡ – Executed ¡every ¡minute ¡ – Uses ¡priori6za6on ¡scheme ¡to ¡ maximize ¡coverage ¡

  • Links: ¡Social ¡Graph ¡

– Gets ¡the ¡followers ¡and ¡friends ¡of ¡a ¡list ¡

  • f ¡users ¡

– Executed ¡every ¡10 ¡minutes ¡

2 ¡Types ¡of ¡Clients ¡

¡

  • Perl ¡scripts ¡using ¡REST ¡API ¡(limit ¡350 ¡calls ¡/ ¡h, ¡we ¡use ¡300) ¡
slide-8
SLIDE 8

Architecture ¡-­‑ ¡Server ¡

  • Get: ¡gives ¡clients ¡a ¡list ¡of ¡users ¡

(priori6zed) ¡to ¡be ¡looked ¡up ¡

  • Put: ¡parses ¡a ¡JSON ¡string ¡and ¡inserts ¡

informa6on ¡in ¡the ¡database ¡

¡

  • Priori2za2on ¡

– Low ¡number ¡of ¡users ¡publish ¡a ¡lot ¡ – Increase ¡priority ¡for ¡every ¡new ¡ tweet, ¡decrease ¡for ¡every ¡duplicate ¡

  • ne ¡ ¡

– Pool ¡of ¡users ¡to ¡crawl ¡created ¡ randomly ¡using ¡classes ¡of ¡priori6es ¡

slide-9
SLIDE 9

Architecture ¡-­‑ ¡Modules ¡

  • User ¡expansion: ¡

– started ¡from ¡a ¡seed ¡list ¡of ¡Portuguese ¡ users ¡(from ¡@TwiLerPortugal) ¡ – iden6fies ¡@men6ons ¡and ¡RTs ¡in ¡the ¡ crawled ¡tweets ¡ – new ¡users ¡from ¡social ¡graph ¡

  • User ¡selec6on: ¡

– profile ¡analysis ¡-­‑ ¡Portuguese ¡names, ¡ loca6on ¡ – language ¡iden6fica6on ¡-­‑ ¡unigram ¡language ¡ profile ¡comparison ¡

  • User ¡inspec6on: ¡

– checks ¡for ¡deleted ¡and ¡suspended ¡users ¡ – detects ¡inac6ve ¡users, ¡which ¡are ¡then ¡ crawled ¡during ¡the ¡night ¡

¡

slide-10
SLIDE 10

Evalua6on ¡– ¡Crawl ¡Coverage ¡

  • 2.608 ¡users ¡crawled ¡for ¡all ¡tweets ¡and ¡compared ¡to ¡our ¡

database ¡

  • Total ¡coverage ¡of ¡75.2% ¡

Average ¡ ac2vity ¡ Users ¡ Tweets ¡ fetched ¡ Tweets ¡ crawled ¡ Accuracy ¡per ¡ user(%) ¡ 1h ¡ 127 ¡ 21400 ¡ 16073 ¡ 74,0 ¡ 3h ¡ 217 ¡ 36463 ¡ 26592 ¡ 72,8 ¡ 6h ¡ 216 ¡ 32098 ¡ 23153 ¡ 71,7 ¡ 12h ¡ 277 ¡ 25287 ¡ 19512 ¡ 76,3 ¡ 24h ¡ 378 ¡ 16946 ¡ 13078 ¡ 76,8 ¡ 3d ¡ 725 ¡ 12197 ¡ 9942 ¡ 83,2 ¡ 6d ¡ 358 ¡ 2543 ¡ 2046 ¡ 84,3 ¡ 12d ¡ 228 ¡ 999 ¡ 841 ¡ 87,3 ¡ 24d ¡ 82 ¡ 297 ¡ 248 ¡ 88,7 ¡

slide-11
SLIDE 11

Evalua6on ¡– ¡Crawl ¡Focus ¡

  • Profile ¡analysis ¡
  • Language ¡iden6fica6on ¡

User ¡Class ¡ Correctly ¡classified ¡ Accuracy ¡(%) ¡ Portuguese ¡ 454 ¡ 90,8 ¡ Non-­‑Portuguese ¡ 497 ¡ 99,4 ¡ User ¡class ¡ Classified ¡as ¡PT ¡ Accuracy ¡(%) ¡ Inconclusive ¡ 60 ¡ 12.0 ¡ Tweets ¡ Users ¡ Precision ¡ Recall ¡ 30-­‑40 ¡ 115 ¡ 0,960 ¡ 0,49 ¡ 41-­‑60 ¡ 193 ¡ 1,000 ¡ 0,663 ¡ 61-­‑80 ¡ 117 ¡ 0,949 ¡ 0,755 ¡ 81-­‑100 ¡ 125 ¡ 0,969 ¡ 0,738 ¡ 30-­‑100 ¡ 550 ¡ 0,974 ¡ 0,659 ¡

slide-12
SLIDE 12

Current ¡Sta6s6cs ¡

  • running ¡for ¡12 ¡months ¡of ¡running ¡
  • ≈85 ¡thousand ¡users ¡
  • 14.6 ¡M ¡tweets ¡

0 ¡ 10000 ¡ 20000 ¡ 30000 ¡ 40000 ¡ 50000 ¡ 60000 ¡ 70000 ¡ 80000 ¡ 90000 ¡

Total ¡users ¡monitored ¡

0 ¡ 2000000 ¡ 4000000 ¡ 6000000 ¡ 8000000 ¡ 10000000 ¡ 12000000 ¡ 14000000 ¡ 16000000 ¡

Total ¡tweets ¡downloaded ¡

slide-13
SLIDE 13

Our ¡First ¡Applica6on ¡

Twitómetro: ¡hLp://legisla6vas.sapo.pt/2011/twitometro/ ¡

Twitómetro: ¡tacking ¡user ¡opinions ¡during ¡the ¡last ¡general ¡elec6ons ¡

slide-14
SLIDE 14

Challenges ¡and ¡Future ¡Work ¡

  • Scalability ¡– ¡Improving ¡scalability ¡for ¡tracking ¡larger ¡

communi6es ¡

– Distribu6ng ¡server ¡tasks ¡over ¡distributed ¡databases ¡(Hadoop/HBase) ¡ – Enabling ¡user/tweet ¡graph ¡querying ¡via ¡graph ¡databases ¡(Neo4j) ¡

  • Focused ¡crawling ¡– ¡increase ¡precision ¡by ¡improving ¡

modules ¡for ¡user ¡selec6on ¡ ¡

– Language ¡detec6on ¡(PT ¡vs. ¡BR) ¡ – Loca6on ¡disambigua6on ¡

slide-15
SLIDE 15

Thank ¡you! ¡ ¡Ques6ons? ¡

¡ ¡ ¡

hLp://labs.sapo.pt/twiLerecho/ ¡ ¡

hLp://www.fe.up.pt/~eduarda ¡ ¡ ¡v ¡ ¡eduardamr@acm.org ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡

¡