SlideShare une entreprise Scribd logo
1  sur  32
SWIFT RIVER
Verifying and Filtering the Crowd




          An Ushahidi Initiative

     by Neville Newey and Jon Gosier
How do we manage it all?
SWIFT IS THE FILTER
SWIFTRIVER IS FOR...
Improving information findability
Surfacing content you didn't know you were looking for
Understanding media from other parts of the world (translation)
Making urgent data more discoverable (structured, published and accessible)
Verifying eyewitness accounts
Using location as context
Expanding the grassroots reporting network
Preserving information (archiving)
SILCC
SwiftRiver Language Computation Core




              Web Services
WHAT IS SILCC?
•What is SiLCC
•Where does it fit in?
•Goals
•Limitations
•Status
WHAT IS SILCC?
•Swift Language Computation Component
•One of the SwiftRiver Web Services
•Open Web API
•Semantic Tagging of Short Text
•Multilingual
•Multiple sources (twitter, email, SMS, blogs etc)
•Active Learning capability
•Open Source
•Easy to Deploy, Modify and Run
Swiftriver     SiLCC  Dataflow  
       
                          SiSLS  
                                                         Content   Items   coming   from   the   SiSLS   have      where  
                 Swiftriver  Source                      SiSLS   integrations   is   enabled      global   trust   values  
                  Library  Service                       added  to  the  object  model.  


            




                         SiLCC  

               Swiftriver  Language                      An  API  key  is  sent  along  with  the  text  to  ensure  that  
                                                         the  SiLCC  is  not  open  to  any  malicious  usage.    
               Computational  Core  

                  The  text  of  the  
               content  is  sent  to  the  
                       SiLCC.  



                                                         There  is  still  a  bit  of  ambiguity  around  what  the  NLP  
                                                         should  extract  from  the  text  but  at  its  most  simple,  
               Using  NLP,  the  SiLCC                   all  the  nouns  would  be  a  good  start.  
                extracts  Nouns  and  
               other  keywords  from  
                      the  text.  




               The  SiLCC  send  back  
                                                           The   lists   of   tags   sent   back   from   the   SiLCC   can   be  
               a  list  of  tags  that  are  
                                                           added  to  the  Content  Item  along  with  any  that  were  
                     added  to  the                        extracted  from  the  source  data  by  the  parser.  
                     Content  Item  




                          SLISa  
                                                           Although   the   NLP   tags   have   now   been   applied,   the  
                                                           SLISa   is   now   responsible   for   applying   instance  
                Swiftriver  Language  
                                                           specific  tagging  corrections.  
               Improvement  Service  

            
OUR GOALS
•Simple Tagging of short snippets of text
•Rapid tagging for high volume environments
•Simple API, easy to use
•Learns from user feedback
•Routing of messages to upstream services
•Semantic Classification
•Sorts rapid streams into buckets
•Clusters like messages
•Visual effects
•Cross-referencing
WHAT IT’S NOT
•Does not do deep analysis of text
•Only identifies words within original text
HOW DOES IT WORK?
•Step 1: Lexical Analysis
•Step 2: Parsing into constituent parts
•Step 3: Part of Speech tagging
•Step 4: Feature extraction
•Step 5: Compute using feature weights
•Lets examine each one in turn...
STEP 1: LEXICAL ANALYSIS
•For news headlines, email subjects this is trivial, just
 split on spaces.

•For Twitter this is more complex...
TWEET ANALYSIS
•Tweets are surprisingly complex
•Only 140 characters but many features
•Emergent features from community (e.g. hashtags)
•Lets take a look at a typical tweet...
TWEET ANALYSIS
 The typical Tweet: “RT @directrelief: RT
 @PIH: PBS @NewsHour addresses mental health
 needs in the aftermath of the #Haiti earthquake
 #health #earthquake... http://bit.ly/bNhyK6”

•RT indicates a “re-tweet”
•@name indicates who the original tweeter was
•Multiple embedded retweets
•Hashtags (e.g. #Haiti) can play two roles, as a tag
 and as part of the sentence
TWEET ANALYSIS 2
•Two or more hashtags within a tweet (e.g.
 #health and #earthquake)
•Continuation dots “...” indicates that there
 was more text that didn’t fit into the 140 limit
 somewhere in it’s history
•Urls many tweets contain one or more urls
 As we can see this simple tweet contains no less
 than 7 different features and that’s not all!
TWEET ANALYSIS 3
We want to break up the tweet into the following
parts:
{

  'text': ['PBS addresses mental health needs in the aftermath of the Haiti
earthquake'],

    'hashtags': ['#Haiti', '#health', '#earthquake'],

    'names': ['@directrelief', '@PIH', '@NewsHour'],

    'urls': ['http://bit.ly/bNhyK6'],

}
TWEET ANALYSIS 4
 Why do we want to break up the tweet into parts
 (parsing)?

•Because we want to further process the
 grammatically correct english text
•Part of speech tagging would otherwise be
 corrupted by words it cannot recognize (e.g. urls,
 hashtags, @names etc.)
•We want to save the hashtags for later use
•Many of the features are irrelevant to the task of
 identifying tags (e.g. dots, punctuation, @name, RT)
TWEET ANALYSIS 5
•We now take the “text” portion of the tweet and
 perform part of speech tagging on it
•After part of speech tagging, we perform feature
 extraction
•Features are now passed through the keyword
 classifier which returns a list of keywords / tags
•Finally we combine these tags with the hashtags we
 saved earlier to give the complete tag set
HEADLINE AND EMAIL
    SUBJECT ANALYSIS
•This is much simpler to do
•Its a subset of the steps in Tweet Analysis
•There is no parsing since there are no hashtags,
 @names etc.
FEATURE EXTRACTION
• For the active learning algorithm we need to extract features to use in classification
• These features should be subject/domain independent
• We therefore never use the actual words as features
• This would for example give artificially high weights to words such as “earthquake”
• We don't want these artificial weights as we can’t foresee future disasters and we
    want to be as generic with classification as possible
•   The use of training sets does allow for domain customization if where necessary
FEATURE EXTRACTION
• Capitalization of individual words: Either first caps, or all caps, this is an
    important indicator of proper nouns or other important words that make good tag
    candidates
•   Position in text: Tags seem to have a greater preponderance near the
    beginning of text
•   Part of Speech: Nouns and proper nouns are particularly important but so are
    some adjectives and adverbs
•   Capitalization of entire text: sometimes the whole text is capitalized and
    this should reduce overall weighting of other features
•   Length of the text: In shorter texts the words are more likely to be tags
•   The parts of speech of previous and next words (effectively this means we
    are using trigrams; or a window of 3)
TRAINING
• Requires user reviewed examples
• Lexical analysis, parsing and feature extraction on the examples
• Multinomial naïve Bayes algorithm
• NB: The granularity we are classifying is at the word level
• For each word in the text, we classify it as either a keyword or not
• This has pleasant side effect of providing several training examples from each user
    reviewed text
•   Even with less than 50 reviewed texts the results are comparable to the simple
    approach of using nouns only
ACTIVE LEARNING
•The API also provides a method for users to send
 back corrected text
•The corrected text is saved and then used in the
 next iteration of training
•User may optionally specify a corpus for the
 example to go into
•Training can be performed using any combination of
 corpora
DEVELOPER FRIENDLY
•Two levels of API, the web API and the internal
 Python API
•Either one may be used but most users will use the
 web API
•Design is highly modular and maintainable
•For very rapid backend processing the native Python
 API can be used
PYTHON CLASSES
Most of the classes that make up the library are
divided into three types:

   1) Tokenizers
   2) Parsers
   3) Taggers

All three types have consistent API's and are
interchangeable.
PYTHON API
•A tagger calls a parser
•A parser calls a tokenizer
•Output of the tokenizer goes into the parser
•Output of the parser goes into the tagger
•Output of the tagger goes into the user!
CLASSES
• BasicTokenizer – This is used for splitting basic (non-tweet) text into individual
    words
•   TweetTokenizer – This is used to tokenize a tweet, it may also be used to
    tokenize plain text since plain text is a subset of tweets
•   TweetParser – Calls the TweetTokenizer and the parses the output (see
    previous example)
•   TweetTagger – Calls the TweetTokenizer and then tags the output of the text
    part and adds the hashtags
•   BasicTagger – Calls the BasicTokenizer and then tags the text, should only be
    used for non-tweet text, uses simple Part of Speech to identify tags
•   BayesTagger – Same as BasicTagger but uses weights from the naïve Bayes
    training algorithm
DEPENDANCIES
•Part of speech tagging is currently performed by the
 Python NLTK
•The Web API uses the Pylons web framework
CURRENT STATUS
•Tag method of API is ready for use, individual
 deployments can choose between using the
 BasicTagger or the BayesTagger
•Tell method (for user feedback) will be ready by
 the time you read this!
•Training is possible on corpora of tagged data in .csv
 format (see examples in distribution)
CURRENT LIMITATIONS
•Only English text is supported at the moment
•Tags are always one of the words in the supplied
 text ie they can never be a word not in the supplied
 text
•Very few training examples exist at the moment
FUTURE WORK
•Multilingual, use non-english part of speech taggers
•UTF8 compatible
•Experiment with different learning algorithms (e.g.
 neural networks)
•Perform external text analysis (e.g. if there is a url,
 analyze the text in the url as well as in the tweet)
•Allow users to specify required density of tags
SWIFT RIVER
       jon@ushahidi.com
   http://swift.ushahidi.com
http://github.com/appfrica/silcc




         An Ushahidi Initiative

    by Neville Newey and Jon Gosier

Contenu connexe

Similaire à SiLCC Overview

Iterator - a powerful but underappreciated design pattern
Iterator - a powerful but underappreciated design patternIterator - a powerful but underappreciated design pattern
Iterator - a powerful but underappreciated design patternNitin Bhide
 
Extending Apache Spark APIs Without Going Near Spark Source or a Compiler wi...
 Extending Apache Spark APIs Without Going Near Spark Source or a Compiler wi... Extending Apache Spark APIs Without Going Near Spark Source or a Compiler wi...
Extending Apache Spark APIs Without Going Near Spark Source or a Compiler wi...Databricks
 
presentation on online movie ticket booking
presentation on online movie ticket bookingpresentation on online movie ticket booking
presentation on online movie ticket bookingdharmawath
 
Api FUNdamentals #MHA2017
Api FUNdamentals #MHA2017Api FUNdamentals #MHA2017
Api FUNdamentals #MHA2017JoEllen Carter
 
APIs at Scale with TypeSpec by Mandy Whaley, Microsoft
APIs at Scale with TypeSpec by Mandy Whaley, MicrosoftAPIs at Scale with TypeSpec by Mandy Whaley, Microsoft
APIs at Scale with TypeSpec by Mandy Whaley, MicrosoftNordic APIs
 
Api fundamentals
Api fundamentalsApi fundamentals
Api fundamentalsAgileDenver
 
Swift programming language
Swift programming languageSwift programming language
Swift programming languageNijo Job
 
IRJET- Hosting NLP based Chatbot on AWS Cloud using Docker
IRJET-  	  Hosting NLP based Chatbot on AWS Cloud using DockerIRJET-  	  Hosting NLP based Chatbot on AWS Cloud using Docker
IRJET- Hosting NLP based Chatbot on AWS Cloud using DockerIRJET Journal
 
Elasticsearch and Spark
Elasticsearch and SparkElasticsearch and Spark
Elasticsearch and SparkAudible, Inc.
 
Onion Architecture and the Blog
Onion Architecture and the BlogOnion Architecture and the Blog
Onion Architecture and the Blogbarryosull
 
Writing Well Abstracted Automation on Foundations of Jello
Writing Well Abstracted Automation on Foundations of JelloWriting Well Abstracted Automation on Foundations of Jello
Writing Well Abstracted Automation on Foundations of JelloDan Cuellar
 
Illuminating Lucene.Net
Illuminating Lucene.NetIlluminating Lucene.Net
Illuminating Lucene.NetDean Thrasher
 
TAUS Webinar - Introduction to the Gengo API Ecosystem
TAUS Webinar - Introduction to the Gengo API EcosystemTAUS Webinar - Introduction to the Gengo API Ecosystem
TAUS Webinar - Introduction to the Gengo API EcosystemGengo
 
Алексей Веркеенко "Symfony2 & REST API"
Алексей Веркеенко "Symfony2 & REST API" Алексей Веркеенко "Symfony2 & REST API"
Алексей Веркеенко "Symfony2 & REST API" Fwdays
 
Class Diagram Extraction from Textual Requirements Using NLP Techniques
Class Diagram Extraction from Textual Requirements Using NLP TechniquesClass Diagram Extraction from Textual Requirements Using NLP Techniques
Class Diagram Extraction from Textual Requirements Using NLP Techniquesiosrjce
 
Introduction to apache lucene
Introduction to apache luceneIntroduction to apache lucene
Introduction to apache luceneShrikrishna Parab
 
MongoDB World 2018: A Swift Introduction to Swift
MongoDB World 2018: A Swift Introduction to SwiftMongoDB World 2018: A Swift Introduction to Swift
MongoDB World 2018: A Swift Introduction to SwiftMongoDB
 
The Evolution of Reading List Integrations - Richard Tattersall | Talis Insig...
The Evolution of Reading List Integrations - Richard Tattersall | Talis Insig...The Evolution of Reading List Integrations - Richard Tattersall | Talis Insig...
The Evolution of Reading List Integrations - Richard Tattersall | Talis Insig...Talis
 

Similaire à SiLCC Overview (20)

Iterator - a powerful but underappreciated design pattern
Iterator - a powerful but underappreciated design patternIterator - a powerful but underappreciated design pattern
Iterator - a powerful but underappreciated design pattern
 
Extending Apache Spark APIs Without Going Near Spark Source or a Compiler wi...
 Extending Apache Spark APIs Without Going Near Spark Source or a Compiler wi... Extending Apache Spark APIs Without Going Near Spark Source or a Compiler wi...
Extending Apache Spark APIs Without Going Near Spark Source or a Compiler wi...
 
presentation on online movie ticket booking
presentation on online movie ticket bookingpresentation on online movie ticket booking
presentation on online movie ticket booking
 
Api FUNdamentals #MHA2017
Api FUNdamentals #MHA2017Api FUNdamentals #MHA2017
Api FUNdamentals #MHA2017
 
APIs at Scale with TypeSpec by Mandy Whaley, Microsoft
APIs at Scale with TypeSpec by Mandy Whaley, MicrosoftAPIs at Scale with TypeSpec by Mandy Whaley, Microsoft
APIs at Scale with TypeSpec by Mandy Whaley, Microsoft
 
Api fundamentals
Api fundamentalsApi fundamentals
Api fundamentals
 
Swift programming language
Swift programming languageSwift programming language
Swift programming language
 
IRJET- Hosting NLP based Chatbot on AWS Cloud using Docker
IRJET-  	  Hosting NLP based Chatbot on AWS Cloud using DockerIRJET-  	  Hosting NLP based Chatbot on AWS Cloud using Docker
IRJET- Hosting NLP based Chatbot on AWS Cloud using Docker
 
Elasticsearch and Spark
Elasticsearch and SparkElasticsearch and Spark
Elasticsearch and Spark
 
Onion Architecture and the Blog
Onion Architecture and the BlogOnion Architecture and the Blog
Onion Architecture and the Blog
 
Writing Well Abstracted Automation on Foundations of Jello
Writing Well Abstracted Automation on Foundations of JelloWriting Well Abstracted Automation on Foundations of Jello
Writing Well Abstracted Automation on Foundations of Jello
 
Illuminating Lucene.Net
Illuminating Lucene.NetIlluminating Lucene.Net
Illuminating Lucene.Net
 
TAUS Webinar - Introduction to the Gengo API Ecosystem
TAUS Webinar - Introduction to the Gengo API EcosystemTAUS Webinar - Introduction to the Gengo API Ecosystem
TAUS Webinar - Introduction to the Gengo API Ecosystem
 
Architecting for Scale
Architecting for ScaleArchitecting for Scale
Architecting for Scale
 
Алексей Веркеенко "Symfony2 & REST API"
Алексей Веркеенко "Symfony2 & REST API" Алексей Веркеенко "Symfony2 & REST API"
Алексей Веркеенко "Symfony2 & REST API"
 
Class Diagram Extraction from Textual Requirements Using NLP Techniques
Class Diagram Extraction from Textual Requirements Using NLP TechniquesClass Diagram Extraction from Textual Requirements Using NLP Techniques
Class Diagram Extraction from Textual Requirements Using NLP Techniques
 
D017232729
D017232729D017232729
D017232729
 
Introduction to apache lucene
Introduction to apache luceneIntroduction to apache lucene
Introduction to apache lucene
 
MongoDB World 2018: A Swift Introduction to Swift
MongoDB World 2018: A Swift Introduction to SwiftMongoDB World 2018: A Swift Introduction to Swift
MongoDB World 2018: A Swift Introduction to Swift
 
The Evolution of Reading List Integrations - Richard Tattersall | Talis Insig...
The Evolution of Reading List Integrations - Richard Tattersall | Talis Insig...The Evolution of Reading List Integrations - Richard Tattersall | Talis Insig...
The Evolution of Reading List Integrations - Richard Tattersall | Talis Insig...
 

Plus de Ushahidi

Data Science for Social Good and Ushahidi - Final Presentation
Data Science for Social Good and Ushahidi - Final PresentationData Science for Social Good and Ushahidi - Final Presentation
Data Science for Social Good and Ushahidi - Final PresentationUshahidi
 
Corruption mapping (april 2013, part 2)
Corruption mapping (april 2013, part 2)Corruption mapping (april 2013, part 2)
Corruption mapping (april 2013, part 2)Ushahidi
 
Anti-Corruption Mapping (April 2013, part 1)
Anti-Corruption Mapping (April 2013, part 1)Anti-Corruption Mapping (April 2013, part 1)
Anti-Corruption Mapping (April 2013, part 1)Ushahidi
 
Ushahdi 3.0 Design Framework
Ushahdi 3.0 Design Framework Ushahdi 3.0 Design Framework
Ushahdi 3.0 Design Framework Ushahidi
 
Around the Globe Corruption Mapping (part 2)
Around the Globe Corruption Mapping (part 2)Around the Globe Corruption Mapping (part 2)
Around the Globe Corruption Mapping (part 2)Ushahidi
 
Around the Globe Corruption Mapping (part 1)
Around the Globe Corruption Mapping (part 1)Around the Globe Corruption Mapping (part 1)
Around the Globe Corruption Mapping (part 1)Ushahidi
 
Ushahidi Toolbox - Real-time Evaluation
Ushahidi Toolbox - Real-time EvaluationUshahidi Toolbox - Real-time Evaluation
Ushahidi Toolbox - Real-time EvaluationUshahidi
 
Ushahidi Toolbox - Implementation
Ushahidi Toolbox - ImplementationUshahidi Toolbox - Implementation
Ushahidi Toolbox - ImplementationUshahidi
 
Ushahidi Toolbox - Assessment
Ushahidi Toolbox - AssessmentUshahidi Toolbox - Assessment
Ushahidi Toolbox - AssessmentUshahidi
 
Kenya Ushahidi Evaluation: Unsung Peace Heros/Building Bridges
Kenya Ushahidi Evaluation: Unsung Peace Heros/Building BridgesKenya Ushahidi Evaluation: Unsung Peace Heros/Building Bridges
Kenya Ushahidi Evaluation: Unsung Peace Heros/Building BridgesUshahidi
 
Kenya Ushahidi Evaluation: Uchaguzi
Kenya Ushahidi Evaluation: UchaguziKenya Ushahidi Evaluation: Uchaguzi
Kenya Ushahidi Evaluation: UchaguziUshahidi
 
Kenya Ushahidi Evaluation: Blog Series
Kenya Ushahidi Evaluation: Blog SeriesKenya Ushahidi Evaluation: Blog Series
Kenya Ushahidi Evaluation: Blog SeriesUshahidi
 
Pivoting An African Open Source Project
Pivoting An African Open Source ProjectPivoting An African Open Source Project
Pivoting An African Open Source ProjectUshahidi
 
Ushahidi esri juliana
Ushahidi esri julianaUshahidi esri juliana
Ushahidi esri julianaUshahidi
 
Ushahidi personas scenarios
Ushahidi personas scenariosUshahidi personas scenarios
Ushahidi personas scenariosUshahidi
 
Citizen pollution mapping made easy
Citizen pollution mapping made easy Citizen pollution mapping made easy
Citizen pollution mapping made easy Ushahidi
 
Map it, Change it
Map it, Change itMap it, Change it
Map it, Change itUshahidi
 
Map it, Make it, Hack it
Map it, Make it, Hack itMap it, Make it, Hack it
Map it, Make it, Hack itUshahidi
 
What if Citizens Mapped Health?
What if Citizens Mapped Health?What if Citizens Mapped Health?
What if Citizens Mapped Health?Ushahidi
 

Plus de Ushahidi (20)

Data Science for Social Good and Ushahidi - Final Presentation
Data Science for Social Good and Ushahidi - Final PresentationData Science for Social Good and Ushahidi - Final Presentation
Data Science for Social Good and Ushahidi - Final Presentation
 
Corruption mapping (april 2013, part 2)
Corruption mapping (april 2013, part 2)Corruption mapping (april 2013, part 2)
Corruption mapping (april 2013, part 2)
 
Anti-Corruption Mapping (April 2013, part 1)
Anti-Corruption Mapping (April 2013, part 1)Anti-Corruption Mapping (April 2013, part 1)
Anti-Corruption Mapping (April 2013, part 1)
 
Ushahdi 3.0 Design Framework
Ushahdi 3.0 Design Framework Ushahdi 3.0 Design Framework
Ushahdi 3.0 Design Framework
 
Around the Globe Corruption Mapping (part 2)
Around the Globe Corruption Mapping (part 2)Around the Globe Corruption Mapping (part 2)
Around the Globe Corruption Mapping (part 2)
 
Around the Globe Corruption Mapping (part 1)
Around the Globe Corruption Mapping (part 1)Around the Globe Corruption Mapping (part 1)
Around the Globe Corruption Mapping (part 1)
 
Ushahidi Toolbox - Real-time Evaluation
Ushahidi Toolbox - Real-time EvaluationUshahidi Toolbox - Real-time Evaluation
Ushahidi Toolbox - Real-time Evaluation
 
Ushahidi Toolbox - Implementation
Ushahidi Toolbox - ImplementationUshahidi Toolbox - Implementation
Ushahidi Toolbox - Implementation
 
Ushahidi Toolbox - Assessment
Ushahidi Toolbox - AssessmentUshahidi Toolbox - Assessment
Ushahidi Toolbox - Assessment
 
Kenya Ushahidi Evaluation: Unsung Peace Heros/Building Bridges
Kenya Ushahidi Evaluation: Unsung Peace Heros/Building BridgesKenya Ushahidi Evaluation: Unsung Peace Heros/Building Bridges
Kenya Ushahidi Evaluation: Unsung Peace Heros/Building Bridges
 
Kenya Ushahidi Evaluation: Uchaguzi
Kenya Ushahidi Evaluation: UchaguziKenya Ushahidi Evaluation: Uchaguzi
Kenya Ushahidi Evaluation: Uchaguzi
 
Kenya Ushahidi Evaluation: Blog Series
Kenya Ushahidi Evaluation: Blog SeriesKenya Ushahidi Evaluation: Blog Series
Kenya Ushahidi Evaluation: Blog Series
 
Pivoting An African Open Source Project
Pivoting An African Open Source ProjectPivoting An African Open Source Project
Pivoting An African Open Source Project
 
Ushahidi esri juliana
Ushahidi esri julianaUshahidi esri juliana
Ushahidi esri juliana
 
Ushahidi personas scenarios
Ushahidi personas scenariosUshahidi personas scenarios
Ushahidi personas scenarios
 
Citizen pollution mapping made easy
Citizen pollution mapping made easy Citizen pollution mapping made easy
Citizen pollution mapping made easy
 
Testimony
TestimonyTestimony
Testimony
 
Map it, Change it
Map it, Change itMap it, Change it
Map it, Change it
 
Map it, Make it, Hack it
Map it, Make it, Hack itMap it, Make it, Hack it
Map it, Make it, Hack it
 
What if Citizens Mapped Health?
What if Citizens Mapped Health?What if Citizens Mapped Health?
What if Citizens Mapped Health?
 

Dernier

DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 
Time Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsTime Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsNathaniel Shimoni
 
A Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersA Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersNicole Novielli
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .Alan Dix
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxhariprasad279825
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxLoriGlavin3
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfAddepto
 
Training state-of-the-art general text embedding
Training state-of-the-art general text embeddingTraining state-of-the-art general text embedding
Training state-of-the-art general text embeddingZilliz
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Manik S Magar
 
What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfMounikaPolabathina
 
What is Artificial Intelligence?????????
What is Artificial Intelligence?????????What is Artificial Intelligence?????????
What is Artificial Intelligence?????????blackmambaettijean
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxLoriGlavin3
 
Sample pptx for embedding into website for demo
Sample pptx for embedding into website for demoSample pptx for embedding into website for demo
Sample pptx for embedding into website for demoHarshalMandlekar2
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr BaganFwdays
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteDianaGray10
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Commit University
 
unit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptxunit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptxBkGupta21
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 

Dernier (20)

DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 
Time Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsTime Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directions
 
A Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersA Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software Developers
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptx
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
 
Training state-of-the-art general text embedding
Training state-of-the-art general text embeddingTraining state-of-the-art general text embedding
Training state-of-the-art general text embedding
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!
 
What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdf
 
What is Artificial Intelligence?????????
What is Artificial Intelligence?????????What is Artificial Intelligence?????????
What is Artificial Intelligence?????????
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
 
Sample pptx for embedding into website for demo
Sample pptx for embedding into website for demoSample pptx for embedding into website for demo
Sample pptx for embedding into website for demo
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test Suite
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
 
unit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptxunit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptx
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 

SiLCC Overview

  • 1. SWIFT RIVER Verifying and Filtering the Crowd An Ushahidi Initiative by Neville Newey and Jon Gosier
  • 2. How do we manage it all?
  • 3. SWIFT IS THE FILTER
  • 4. SWIFTRIVER IS FOR... Improving information findability Surfacing content you didn't know you were looking for Understanding media from other parts of the world (translation) Making urgent data more discoverable (structured, published and accessible) Verifying eyewitness accounts Using location as context Expanding the grassroots reporting network Preserving information (archiving)
  • 6. WHAT IS SILCC? •What is SiLCC •Where does it fit in? •Goals •Limitations •Status
  • 7. WHAT IS SILCC? •Swift Language Computation Component •One of the SwiftRiver Web Services •Open Web API •Semantic Tagging of Short Text •Multilingual •Multiple sources (twitter, email, SMS, blogs etc) •Active Learning capability •Open Source •Easy to Deploy, Modify and Run
  • 8. Swiftriver    SiLCC  Dataflow     SiSLS   Content   Items   coming   from   the   SiSLS   have     where   Swiftriver  Source     SiSLS   integrations   is   enabled     global   trust   values   Library  Service   added  to  the  object  model.     SiLCC   Swiftriver  Language   An  API  key  is  sent  along  with  the  text  to  ensure  that   the  SiLCC  is  not  open  to  any  malicious  usage.     Computational  Core     The  text  of  the   content  is  sent  to  the   SiLCC.   There  is  still  a  bit  of  ambiguity  around  what  the  NLP   should  extract  from  the  text  but  at  its  most  simple,   Using  NLP,  the  SiLCC   all  the  nouns  would  be  a  good  start.   extracts  Nouns  and   other  keywords  from   the  text.   The  SiLCC  send  back   The   lists   of   tags   sent   back   from   the   SiLCC   can   be   a  list  of  tags  that  are   added  to  the  Content  Item  along  with  any  that  were   added  to  the   extracted  from  the  source  data  by  the  parser.   Content  Item   SLISa   Although   the   NLP   tags   have   now   been   applied,   the   SLISa   is   now   responsible   for   applying   instance   Swiftriver  Language   specific  tagging  corrections.   Improvement  Service    
  • 9. OUR GOALS •Simple Tagging of short snippets of text •Rapid tagging for high volume environments •Simple API, easy to use •Learns from user feedback •Routing of messages to upstream services •Semantic Classification •Sorts rapid streams into buckets •Clusters like messages •Visual effects •Cross-referencing
  • 10. WHAT IT’S NOT •Does not do deep analysis of text •Only identifies words within original text
  • 11. HOW DOES IT WORK? •Step 1: Lexical Analysis •Step 2: Parsing into constituent parts •Step 3: Part of Speech tagging •Step 4: Feature extraction •Step 5: Compute using feature weights •Lets examine each one in turn...
  • 12. STEP 1: LEXICAL ANALYSIS •For news headlines, email subjects this is trivial, just split on spaces. •For Twitter this is more complex...
  • 13. TWEET ANALYSIS •Tweets are surprisingly complex •Only 140 characters but many features •Emergent features from community (e.g. hashtags) •Lets take a look at a typical tweet...
  • 14. TWEET ANALYSIS The typical Tweet: “RT @directrelief: RT @PIH: PBS @NewsHour addresses mental health needs in the aftermath of the #Haiti earthquake #health #earthquake... http://bit.ly/bNhyK6” •RT indicates a “re-tweet” •@name indicates who the original tweeter was •Multiple embedded retweets •Hashtags (e.g. #Haiti) can play two roles, as a tag and as part of the sentence
  • 15. TWEET ANALYSIS 2 •Two or more hashtags within a tweet (e.g. #health and #earthquake) •Continuation dots “...” indicates that there was more text that didn’t fit into the 140 limit somewhere in it’s history •Urls many tweets contain one or more urls As we can see this simple tweet contains no less than 7 different features and that’s not all!
  • 16. TWEET ANALYSIS 3 We want to break up the tweet into the following parts: { 'text': ['PBS addresses mental health needs in the aftermath of the Haiti earthquake'], 'hashtags': ['#Haiti', '#health', '#earthquake'], 'names': ['@directrelief', '@PIH', '@NewsHour'], 'urls': ['http://bit.ly/bNhyK6'], }
  • 17. TWEET ANALYSIS 4 Why do we want to break up the tweet into parts (parsing)? •Because we want to further process the grammatically correct english text •Part of speech tagging would otherwise be corrupted by words it cannot recognize (e.g. urls, hashtags, @names etc.) •We want to save the hashtags for later use •Many of the features are irrelevant to the task of identifying tags (e.g. dots, punctuation, @name, RT)
  • 18. TWEET ANALYSIS 5 •We now take the “text” portion of the tweet and perform part of speech tagging on it •After part of speech tagging, we perform feature extraction •Features are now passed through the keyword classifier which returns a list of keywords / tags •Finally we combine these tags with the hashtags we saved earlier to give the complete tag set
  • 19. HEADLINE AND EMAIL SUBJECT ANALYSIS •This is much simpler to do •Its a subset of the steps in Tweet Analysis •There is no parsing since there are no hashtags, @names etc.
  • 20. FEATURE EXTRACTION • For the active learning algorithm we need to extract features to use in classification • These features should be subject/domain independent • We therefore never use the actual words as features • This would for example give artificially high weights to words such as “earthquake” • We don't want these artificial weights as we can’t foresee future disasters and we want to be as generic with classification as possible • The use of training sets does allow for domain customization if where necessary
  • 21. FEATURE EXTRACTION • Capitalization of individual words: Either first caps, or all caps, this is an important indicator of proper nouns or other important words that make good tag candidates • Position in text: Tags seem to have a greater preponderance near the beginning of text • Part of Speech: Nouns and proper nouns are particularly important but so are some adjectives and adverbs • Capitalization of entire text: sometimes the whole text is capitalized and this should reduce overall weighting of other features • Length of the text: In shorter texts the words are more likely to be tags • The parts of speech of previous and next words (effectively this means we are using trigrams; or a window of 3)
  • 22. TRAINING • Requires user reviewed examples • Lexical analysis, parsing and feature extraction on the examples • Multinomial naïve Bayes algorithm • NB: The granularity we are classifying is at the word level • For each word in the text, we classify it as either a keyword or not • This has pleasant side effect of providing several training examples from each user reviewed text • Even with less than 50 reviewed texts the results are comparable to the simple approach of using nouns only
  • 23. ACTIVE LEARNING •The API also provides a method for users to send back corrected text •The corrected text is saved and then used in the next iteration of training •User may optionally specify a corpus for the example to go into •Training can be performed using any combination of corpora
  • 24. DEVELOPER FRIENDLY •Two levels of API, the web API and the internal Python API •Either one may be used but most users will use the web API •Design is highly modular and maintainable •For very rapid backend processing the native Python API can be used
  • 25. PYTHON CLASSES Most of the classes that make up the library are divided into three types: 1) Tokenizers 2) Parsers 3) Taggers All three types have consistent API's and are interchangeable.
  • 26. PYTHON API •A tagger calls a parser •A parser calls a tokenizer •Output of the tokenizer goes into the parser •Output of the parser goes into the tagger •Output of the tagger goes into the user!
  • 27. CLASSES • BasicTokenizer – This is used for splitting basic (non-tweet) text into individual words • TweetTokenizer – This is used to tokenize a tweet, it may also be used to tokenize plain text since plain text is a subset of tweets • TweetParser – Calls the TweetTokenizer and the parses the output (see previous example) • TweetTagger – Calls the TweetTokenizer and then tags the output of the text part and adds the hashtags • BasicTagger – Calls the BasicTokenizer and then tags the text, should only be used for non-tweet text, uses simple Part of Speech to identify tags • BayesTagger – Same as BasicTagger but uses weights from the naïve Bayes training algorithm
  • 28. DEPENDANCIES •Part of speech tagging is currently performed by the Python NLTK •The Web API uses the Pylons web framework
  • 29. CURRENT STATUS •Tag method of API is ready for use, individual deployments can choose between using the BasicTagger or the BayesTagger •Tell method (for user feedback) will be ready by the time you read this! •Training is possible on corpora of tagged data in .csv format (see examples in distribution)
  • 30. CURRENT LIMITATIONS •Only English text is supported at the moment •Tags are always one of the words in the supplied text ie they can never be a word not in the supplied text •Very few training examples exist at the moment
  • 31. FUTURE WORK •Multilingual, use non-english part of speech taggers •UTF8 compatible •Experiment with different learning algorithms (e.g. neural networks) •Perform external text analysis (e.g. if there is a url, analyze the text in the url as well as in the tweet) •Allow users to specify required density of tags
  • 32. SWIFT RIVER jon@ushahidi.com http://swift.ushahidi.com http://github.com/appfrica/silcc An Ushahidi Initiative by Neville Newey and Jon Gosier