SlideShare a Scribd company logo
1 of 51
Download to read offline
Onderdeel van FD MediagroepOnderdeel van FD Mediagroep
Financial News Mining
PyData Hilversum edition: RTL hosts PyData, 8 Feb 2018
Onderdeel van FD Mediagroep
David Graus
@dvdgrs
Onderdeel van FD Mediagroep
Outline
• Financial News @ FDMG/Company.info
• Entity Linking
• Building an Entity Linker
• Method/Algorithms
• Implementation
• [Applications]
3
Onderdeel van FD Mediagroep
FD Mediagroep
4
Onderdeel van FD Mediagroep5
Onderdeel van FD Mediagroep6
Onderdeel van FD Mediagroep7
Onderdeel van FD Mediagroep8
Onderdeel van FD Mediagroep9
Financial News
Onderdeel van FD Mediagroep10
Onderdeel van FD Mediagroep11
Onderdeel van FD Mediagroep12
Onderdeel van FD Mediagroep13
Onderdeel van FD Mediagroep15
Onderdeel van FD Mediagroep
Link
• News articles:
• >900 sources (Dutch, online)
• From Het Financieele Dagblad to the Groninger Gezinsbode
• Around ~4k articles per day
• Multiple years of archive
• Knowledge Base:
• ~2.8M companies & organization profiles
• Rich metadata: sector information, financial information, people,
buildings, etc…
16
Onderdeel van FD Mediagroep
How?
• Anno 2012: human labor
• Since March 2017: machine
17
Onderdeel van FD Mediagroep18
Entity Linking
Onderdeel van FD Mediagroep19
Onderdeel van FD Mediagroep
Step 1: Named-entity Recognition
20
Onderdeel van FD Mediagroep
Step 2: Entity Linking
21
34225913 0000
32105893 0000
Onderdeel van FD Mediagroep
Step 2: EL
22
342259130000
32105893 0000
Onderdeel van FD Mediagroep
Challenges
• A single entity mention can refer to multiple entities
23
Onderdeel van FD Mediagroep
Challenges
• A single entity can be referred to by multiple entity mentions
24
Onderdeel van FD Mediagroep25
Approach
Onderdeel van FD Mediagroep
NER: Approach
• Sequence classification
• E.g.: “Daarnaast sloot het bedrijf twee nieuwe
overeenkomsten met Xenos en Big Bazar
voor in totaal 2000 vierkante meter voor
een periode van 10 jaar.”
• Predict:
• Beginning of entity mention
• Inside entity mention
• Outside entity mention
26
Daarnaast O
sloot O
het O
bedrijf O
twee O
nieuwe O
overeenkomsten O
met O
Xenos B-ORG
en O
Big B-ORG
Bazar I-ORG
voor O
in O
totaal O
2000 O
vierkante O
meter O
voor O
een O
periode O
van O
10 O
jaar O
. O
Onderdeel van FD Mediagroep
NER: Features
• for token t in sentence s:
• Token-identity: token=Xenos
• Word-shape: TokenIsCaps={1,0},
TokenIsNumber={1,0}, …
• Context: prevToken=met, nextToken=en, …
• Dictionary: TokenInCompanyDict={1,0},
InPersonNameDict={1,0}, …
• Corpus: token’s TF-IDF weight, token’s word-cluster
membership, …
• And more…
• Structured Perceptron
• Predict {B, I, O}
27
Daarnaast O
sloot O
het O
bedrijf O
twee O
nieuwe O
overeenkomsten O
met O
Xenos B-ORG
en O
Big B-ORG
Bazar I-ORG
voor O
in O
totaal O
2000 O
vierkante O
meter O
voor O
een O
periode O
van O
10 O
jaar O
. O
Onderdeel van FD Mediagroep
NER: Implementation
• NER: Sequence Classification
• Custom implementation using seqlearn1: “Sequence learning toolkit for Python”
• Based on [Graus et al., ECIR ‘14]
• Flask App
28
1 https://github.com/larsmans/seqlearn
Onderdeel van FD Mediagroep
EL: Approach
• Common: Linking to Wikipedia
29
Onderdeel van FD Mediagroep
EL: Approach
• Custom KB; Custom implementation
• Binary classification (based on [Meij et al., WSDM ‘12])
• Issue entity mention as query to KB [Elasticsearch]
• Retrieve list of candidate organizations
• For each candidate:
• predict 1 (link), 0 (no-link)
30
Onderdeel van FD Mediagroep
EL: Features
For each <document, mention, entity candidate>:
1. Entity features:
• Turnover,
• Size,
• …
2. Mention features:
• MentionLength,
• …
3. Mention-Entity features:
• RetrievalScorePerField,
• TokenOverlapPerField
• …
4. Doc features:
• WoonplaatsInDocument,
• …
31
Onderdeel van FD Mediagroep
EL: Implementation
• sklearn RandomForestClassifier
• Served in a Flask app
32
Onderdeel van FD Mediagroep
Pipeline
33
1. 0. 1. 1. 0.
Doc
NER mention1 org1
org2
org3
…
org n
Extract
Features
1. 0. 0. 1. 0.
1. 1. 0. 0. 0.
1. 0. 1. 1. 0.
RF
1
0
mention2
mention3
0.647
…
0.873
0.780
0.342
…
Onderdeel van FD Mediagroep
Pipeline
34
1. 0. 1. 1. 0.
NER mention1 org1
org2
org3
org n
Extract
Features
1. 0. 0. 1. 0.
1. 1. 0. 0. 0.
1. 0. 1. 1. 0.
RF
1
0
mention2
mention3
0.647
0.873
0.780
0.342
…… …
Onderdeel van FD Mediagroep
Pipeline
35
1. 0. 1. 1. 0.
NER mention1 org2
org3
org1
org n
Extract
Features
1. 0. 0. 1. 0.
1. 1. 0. 0. 0.
1. 0. 1. 1. 0.
RF
1
0
mention2
mention3
0.873
0.780
0.647
0.342
…… …
Onderdeel van FD Mediagroep
org3 1. 0. 1. 1. 0. 0.780
Pipeline
36
1. 0. 1. 1. 0.
NER mention1
org1
…
org n
Extract
Features
1. 0. 0. 1. 0.
RF
1
0
mention2
mention3 0.647
0.342
…
org2 1. 1. 0. 0. 0. 0.873
…
Onderdeel van FD Mediagroep
Training Data
• Multiple years of (hand-labeled) articles.
• NER:
• Split article into sentences
• Filter sentences with [at least 2] entity mentions
• EL:
• Apply NER to article
• For each mention (m) in doc:
• Query ES (retrieve 40 candidates (c))
• For each <m, c, doc>-tuple:
• Extract features
• If c in groundtruth: label POS, else NEG
37
Onderdeel van FD Mediagroep
Evaluation
• Take data, make train/test-split
• NER: ~85%
• EL: ~85%
• But: Data is noisy/biased
• + Manual inspection
38
Onderdeel van FD Mediagroep
Bonus: Entity Salience
• Based on [Reinanda et al., CIKM ‘16]
• Simple baseline approach:
• Prominence: where in the document is entity first mentioned?
• Frequency: how often is entity mentioned?
• Salience: math.sqrt(Prominence*Frequency)
39
Mention Company Salience
SpotX SpotXchange Benelux B.V. 0.913
RTL Nederland RTL Nederland B.V. 0.369
Onderdeel van FD Mediagroep
Bonus: Entity Salience
• Based on [Reinanda et al., CIKM ‘16]
• Simple baseline approach:
• Prominence: where in the document is entity first mentioned?
• Frequency: how often is entity mentioned?
• Salience: math.sqrt(Prominence*Frequency)
40
Onderdeel van FD Mediagroep
Bonus: Sentiment analysis
• Simple Bag-of-Words binary classifier (Naive Bayes)
• Trained on hand-labeled data (~10k articles) (labeled POS/NEG)
• Given article (TF-IDF weighted vector), predict {POS, NEG}
41
Onderdeel van FD Mediagroep
Document Enrichment Pipeline
• On average; 0.24s/article;
1. NER: Feature extraction + Prediction
2. EL: Retrieve Candidates (one query per mention)
• Caching w/ Redis
3. EL: Feature Extraction+Classification (for each candidate)
4. Entity Salience Scoring
5. Sentiment analysis
• Number of articles per day: approx. +160%
• Number of linked orgs: approx. +310%
• Works 24h/day
• More “long tail” articles
42
Onderdeel van FD Mediagroep43
Applications
Onderdeel van FD Mediagroep
Burst detection/summarization
• Simple burst detection algo:
• Take rolling average of time series
• Take cutoff (e.g., mean+std)
• Any point over cutoff = burst
44
2016-08
• Groen licht voor oliewinning in Drenthe
• Robotkraan RoBorg aan boord van de Kroonborg
• Afvalwater NAM weer door Hardenberg naar Twente
• Minister Kamp: NAM mag weer afvalwater injecteren in Twentse bodem
• Nam hervat volgende maand waterinjectie
• “Vertrouwen in NAM en CVW naar absoluut dieptepunt.”
• Groen licht voor herstart oliewinning in Schoonebeek
• Groen licht voor oliewinning in Drenthe
• Oliewinning in Schoonebeek half september hervat
• TU Delft: 'Schadeonderzoek Arcadis deugt niet'
2017-03
- NAM aansprakelijk voor immateriële schade aardbevingen
- NAM aansprakelijk psychologische schade aardbevingen
- Aardbevingsellende: 'Het vreet aan ons'
- NAM aansprakelijk voor psychische schade bewoners aardbevingsgebied
- NAM aansprakelijk immateriële schade inwoners Groningenveld
- NAM ook aansprakelijk voor immateriële schade door aardbevingen
- Live: Rechtszaak immateriële schade door aardbevingen [afgelopen]
- NAM moet ook immateriële schade aardbevingen vergoeden
- 'Uitspraak is een mokerslag voor NAM en minister Kamp'
Nederlandse Aardolie Maatschappij B.V.
Onderdeel van FD Mediagroep
Burst detection/summarization
• Simple burst detection algo:
• Take rolling average of time series
• Take cutoff (e.g., mean+std)
• Any point over cutoff = burst
45
Nederlandse Aardolie Maatschappij B.V.
Onderdeel van FD Mediagroep
Sentiment+events
46
Onderdeel van FD Mediagroep
Sentiment+events
47
Onderdeel van FD Mediagroep
Sentiment+events
48
Onderdeel van FD Mediagroep
Sentiment: Rankings per sector/alerts?
Top 3 POS:
1. ASN Bank N.V. 0.574
2. Aegon Bank N.V. 0.540
3. de Volksbank N.V. 0.447
Top 3 NEG:
1. The Royal Bank of Scotland N.V. -0.130
2. Deutsche Bank -0.010
3. BinckBank N.V. 0.047
49
Onderdeel van FD Mediagroep
Affiliation Networks
50
Onderdeel van FD Mediagroep
As a feature
51
Onderdeel van FD Mediagroep
Fin
52
Onderdeel van FD Mediagroep
Fin
Questions?
@dvdgrs
www.graus.co
david.graus@fdmediagroep.nl
Refs:
D. Graus, M. Tsagkias, L. Buitinck, and M. de Rijke, “Generating pseudo-ground truth for predicting new concepts in social streams,” ECIR 2014
E. Meij, W. Weerkamp, and M. de Rijke, “Adding semantics to microblog posts,” WSDM 2012
R. Reinanda, E. Meij, and M. de Rijke, “Document Filtering for Long-tail Entities,” CIKM 2016
53

More Related Content

Similar to Financial News Mining @ PyData Amsterdam

Tno rapport-herkenning-van-digitale-informatie-definitief-31-maart-2010-anani...
Tno rapport-herkenning-van-digitale-informatie-definitief-31-maart-2010-anani...Tno rapport-herkenning-van-digitale-informatie-definitief-31-maart-2010-anani...
Tno rapport-herkenning-van-digitale-informatie-definitief-31-maart-2010-anani...
Twittercrisis
 
Internationale clusters in vergelijkend perpsectief
Internationale  clusters in vergelijkend perpsectiefInternationale  clusters in vergelijkend perpsectief
Internationale clusters in vergelijkend perpsectief
Anika Snel
 
C-content
C-contentC-content
C-content
ingron
 
Infosessie proeftuin zorginnovatie : 3/ modaliteiten
Infosessie proeftuin zorginnovatie : 3/ modaliteitenInfosessie proeftuin zorginnovatie : 3/ modaliteiten
Infosessie proeftuin zorginnovatie : 3/ modaliteiten
liesl
 
0240 Spin P Resentatie Jun 2002
0240 Spin P Resentatie Jun 20020240 Spin P Resentatie Jun 2002
0240 Spin P Resentatie Jun 2002
wilmar_de_lange
 

Similar to Financial News Mining @ PyData Amsterdam (20)

Tno rapport-herkenning-van-digitale-informatie-definitief-31-maart-2010-anani...
Tno rapport-herkenning-van-digitale-informatie-definitief-31-maart-2010-anani...Tno rapport-herkenning-van-digitale-informatie-definitief-31-maart-2010-anani...
Tno rapport-herkenning-van-digitale-informatie-definitief-31-maart-2010-anani...
 
Interreg Informatiesessie Cofinanciering
Interreg Informatiesessie CofinancieringInterreg Informatiesessie Cofinanciering
Interreg Informatiesessie Cofinanciering
 
Cinematek presentation open data bootcamp
Cinematek presentation open data bootcampCinematek presentation open data bootcamp
Cinematek presentation open data bootcamp
 
20191018_Cinematek_presentation_open_data_bootcamp
20191018_Cinematek_presentation_open_data_bootcamp20191018_Cinematek_presentation_open_data_bootcamp
20191018_Cinematek_presentation_open_data_bootcamp
 
ICT en Subsidies - De Breed en Partners - 24 maart 2015
ICT en Subsidies - De Breed en Partners - 24 maart 2015ICT en Subsidies - De Breed en Partners - 24 maart 2015
ICT en Subsidies - De Breed en Partners - 24 maart 2015
 
Kansen professioneel beheer in het kader van assetmanagement | Dag van de Ope...
Kansen professioneel beheer in het kader van assetmanagement | Dag van de Ope...Kansen professioneel beheer in het kader van assetmanagement | Dag van de Ope...
Kansen professioneel beheer in het kader van assetmanagement | Dag van de Ope...
 
Opensource zou onbetaalbaar moeten zijn, de kracht van de TYPO3 Community
Opensource zou onbetaalbaar moeten zijn, de kracht van de TYPO3 CommunityOpensource zou onbetaalbaar moeten zijn, de kracht van de TYPO3 Community
Opensource zou onbetaalbaar moeten zijn, de kracht van de TYPO3 Community
 
Geen internet zonder Open Source
Geen internet zonder Open SourceGeen internet zonder Open Source
Geen internet zonder Open Source
 
Internationale clusters in vergelijkend perpsectief
Internationale  clusters in vergelijkend perpsectiefInternationale  clusters in vergelijkend perpsectief
Internationale clusters in vergelijkend perpsectief
 
Informatiesessie cofinanciering v2
Informatiesessie cofinanciering v2Informatiesessie cofinanciering v2
Informatiesessie cofinanciering v2
 
C-content
C-contentC-content
C-content
 
Middagsessie 24 april 2015
Middagsessie 24 april 2015Middagsessie 24 april 2015
Middagsessie 24 april 2015
 
Meten is weten
Meten is wetenMeten is weten
Meten is weten
 
Informatiesessie ehv co financiering
Informatiesessie ehv co financieringInformatiesessie ehv co financiering
Informatiesessie ehv co financiering
 
Big data cbs_piet_daas
Big data cbs_piet_daasBig data cbs_piet_daas
Big data cbs_piet_daas
 
DOCument 2011 Editie 3
DOCument 2011 Editie 3DOCument 2011 Editie 3
DOCument 2011 Editie 3
 
Infosessie proeftuin zorginnovatie : 3/ modaliteiten
Infosessie proeftuin zorginnovatie : 3/ modaliteitenInfosessie proeftuin zorginnovatie : 3/ modaliteiten
Infosessie proeftuin zorginnovatie : 3/ modaliteiten
 
170613 grip op complexiteit ict fysieke domein omgevingscongres v1.0
170613 grip op complexiteit ict fysieke domein omgevingscongres v1.0170613 grip op complexiteit ict fysieke domein omgevingscongres v1.0
170613 grip op complexiteit ict fysieke domein omgevingscongres v1.0
 
Europeana Newspapers LFT Infoday Thompson
Europeana Newspapers LFT Infoday ThompsonEuropeana Newspapers LFT Infoday Thompson
Europeana Newspapers LFT Infoday Thompson
 
0240 Spin P Resentatie Jun 2002
0240 Spin P Resentatie Jun 20020240 Spin P Resentatie Jun 2002
0240 Spin P Resentatie Jun 2002
 

More from David Graus

Dynamic Collective Entity Representations for Entity Ranking
Dynamic Collective Entity Representations for Entity RankingDynamic Collective Entity Representations for Entity Ranking
Dynamic Collective Entity Representations for Entity Ranking
David Graus
 
David Graus - Entity Linking (at SEA), Search Engines Amsterdam, Fri June 27th
David Graus - Entity Linking (at SEA), Search Engines Amsterdam, Fri June 27thDavid Graus - Entity Linking (at SEA), Search Engines Amsterdam, Fri June 27th
David Graus - Entity Linking (at SEA), Search Engines Amsterdam, Fri June 27th
David Graus
 
Understanding Email Traffic (talk @ E-Discovery NL Symposium)
Understanding Email Traffic (talk @ E-Discovery NL Symposium)Understanding Email Traffic (talk @ E-Discovery NL Symposium)
Understanding Email Traffic (talk @ E-Discovery NL Symposium)
David Graus
 
Semantic Search in E-Discovery
Semantic Search in E-DiscoverySemantic Search in E-Discovery
Semantic Search in E-Discovery
David Graus
 

More from David Graus (20)

Pragmatic ethical and fair AI for data scientists
Pragmatic ethical and fair AI for data scientistsPragmatic ethical and fair AI for data scientists
Pragmatic ethical and fair AI for data scientists
 
Bias in Recommendations
Bias in RecommendationsBias in Recommendations
Bias in Recommendations
 
RecSys in the Media Industry: Relevance, Recency, Popularity, and Diversity.
RecSys in the Media Industry: Relevance, Recency, Popularity, and Diversity.RecSys in the Media Industry: Relevance, Recency, Popularity, and Diversity.
RecSys in the Media Industry: Relevance, Recency, Popularity, and Diversity.
 
CAT/AI: Computer Assisted Translation 
Assessment for Impact
CAT/AI: Computer Assisted Translation 
Assessment for ImpactCAT/AI: Computer Assisted Translation 
Assessment for Impact
CAT/AI: Computer Assisted Translation 
Assessment for Impact
 
Opening the Black Box of User Profiles in Content-based Recommender Systems
Opening the Black Box of User Profiles in Content-based Recommender SystemsOpening the Black Box of User Profiles in Content-based Recommender Systems
Opening the Black Box of User Profiles in Content-based Recommender Systems
 
Zoeken, vinden, en aanbevelen: personalisatie vs. privacy
Zoeken, vinden, en aanbevelen: personalisatie vs. privacyZoeken, vinden, en aanbevelen: personalisatie vs. privacy
Zoeken, vinden, en aanbevelen: personalisatie vs. privacy
 
Layman's Talk: Entities of Interest --- Discovery in Digital Traces
Layman's Talk: Entities of Interest --- Discovery in Digital TracesLayman's Talk: Entities of Interest --- Discovery in Digital Traces
Layman's Talk: Entities of Interest --- Discovery in Digital Traces
 
De Macht van Data --- Hoe algoritmen ons leven vormgeven
De Macht van Data --- Hoe algoritmen ons leven vormgevenDe Macht van Data --- Hoe algoritmen ons leven vormgeven
De Macht van Data --- Hoe algoritmen ons leven vormgeven
 
Big Data & Machine Learning - Mogelijkheden & Valkuilen
Big Data & Machine Learning - Mogelijkheden & ValkuilenBig Data & Machine Learning - Mogelijkheden & Valkuilen
Big Data & Machine Learning - Mogelijkheden & Valkuilen
 
Analyzing and Predicting Task Reminders
Analyzing and Predicting Task RemindersAnalyzing and Predicting Task Reminders
Analyzing and Predicting Task Reminders
 
Dynamic Collective Entity Representations for Entity Ranking
Dynamic Collective Entity Representations for Entity RankingDynamic Collective Entity Representations for Entity Ranking
Dynamic Collective Entity Representations for Entity Ranking
 
Dynamic Collective Entity Representations for Entity Ranking
Dynamic Collective Entity Representations for Entity RankingDynamic Collective Entity Representations for Entity Ranking
Dynamic Collective Entity Representations for Entity Ranking
 
Understanding Email Traffic
Understanding Email TrafficUnderstanding Email Traffic
Understanding Email Traffic
 
David Graus - Entity Linking (at SEA), Search Engines Amsterdam, Fri June 27th
David Graus - Entity Linking (at SEA), Search Engines Amsterdam, Fri June 27thDavid Graus - Entity Linking (at SEA), Search Engines Amsterdam, Fri June 27th
David Graus - Entity Linking (at SEA), Search Engines Amsterdam, Fri June 27th
 
Understanding Email Traffic (talk @ E-Discovery NL Symposium)
Understanding Email Traffic (talk @ E-Discovery NL Symposium)Understanding Email Traffic (talk @ E-Discovery NL Symposium)
Understanding Email Traffic (talk @ E-Discovery NL Symposium)
 
Generating Pseudo-ground Truth for Detecting New Concepts in Social Streams
Generating Pseudo-ground Truth for Detecting New Concepts in Social StreamsGenerating Pseudo-ground Truth for Detecting New Concepts in Social Streams
Generating Pseudo-ground Truth for Detecting New Concepts in Social Streams
 
yourHistory - entity linking for a personalized timeline of historic events
yourHistory - entity linking for a personalized timeline of historic eventsyourHistory - entity linking for a personalized timeline of historic events
yourHistory - entity linking for a personalized timeline of historic events
 
Semantic Search in E-Discovery
Semantic Search in E-DiscoverySemantic Search in E-Discovery
Semantic Search in E-Discovery
 
Semantic Annotation of the Cyttron Database
Semantic Annotation of the Cyttron DatabaseSemantic Annotation of the Cyttron Database
Semantic Annotation of the Cyttron Database
 
Semantic annotation, clustering and visualization
Semantic annotation, clustering and visualizationSemantic annotation, clustering and visualization
Semantic annotation, clustering and visualization
 

Financial News Mining @ PyData Amsterdam

  • 1. Onderdeel van FD MediagroepOnderdeel van FD Mediagroep Financial News Mining PyData Hilversum edition: RTL hosts PyData, 8 Feb 2018 Onderdeel van FD Mediagroep David Graus @dvdgrs
  • 2. Onderdeel van FD Mediagroep Outline • Financial News @ FDMG/Company.info • Entity Linking • Building an Entity Linker • Method/Algorithms • Implementation • [Applications] 3
  • 3. Onderdeel van FD Mediagroep FD Mediagroep 4
  • 4. Onderdeel van FD Mediagroep5
  • 5. Onderdeel van FD Mediagroep6
  • 6. Onderdeel van FD Mediagroep7
  • 7. Onderdeel van FD Mediagroep8
  • 8. Onderdeel van FD Mediagroep9 Financial News
  • 9. Onderdeel van FD Mediagroep10
  • 10. Onderdeel van FD Mediagroep11
  • 11. Onderdeel van FD Mediagroep12
  • 12. Onderdeel van FD Mediagroep13
  • 13. Onderdeel van FD Mediagroep15
  • 14. Onderdeel van FD Mediagroep Link • News articles: • >900 sources (Dutch, online) • From Het Financieele Dagblad to the Groninger Gezinsbode • Around ~4k articles per day • Multiple years of archive • Knowledge Base: • ~2.8M companies & organization profiles • Rich metadata: sector information, financial information, people, buildings, etc… 16
  • 15. Onderdeel van FD Mediagroep How? • Anno 2012: human labor • Since March 2017: machine 17
  • 16. Onderdeel van FD Mediagroep18 Entity Linking
  • 17. Onderdeel van FD Mediagroep19
  • 18. Onderdeel van FD Mediagroep Step 1: Named-entity Recognition 20
  • 19. Onderdeel van FD Mediagroep Step 2: Entity Linking 21 34225913 0000 32105893 0000
  • 20. Onderdeel van FD Mediagroep Step 2: EL 22 342259130000 32105893 0000
  • 21. Onderdeel van FD Mediagroep Challenges • A single entity mention can refer to multiple entities 23
  • 22. Onderdeel van FD Mediagroep Challenges • A single entity can be referred to by multiple entity mentions 24
  • 23. Onderdeel van FD Mediagroep25 Approach
  • 24. Onderdeel van FD Mediagroep NER: Approach • Sequence classification • E.g.: “Daarnaast sloot het bedrijf twee nieuwe overeenkomsten met Xenos en Big Bazar voor in totaal 2000 vierkante meter voor een periode van 10 jaar.” • Predict: • Beginning of entity mention • Inside entity mention • Outside entity mention 26 Daarnaast O sloot O het O bedrijf O twee O nieuwe O overeenkomsten O met O Xenos B-ORG en O Big B-ORG Bazar I-ORG voor O in O totaal O 2000 O vierkante O meter O voor O een O periode O van O 10 O jaar O . O
  • 25. Onderdeel van FD Mediagroep NER: Features • for token t in sentence s: • Token-identity: token=Xenos • Word-shape: TokenIsCaps={1,0}, TokenIsNumber={1,0}, … • Context: prevToken=met, nextToken=en, … • Dictionary: TokenInCompanyDict={1,0}, InPersonNameDict={1,0}, … • Corpus: token’s TF-IDF weight, token’s word-cluster membership, … • And more… • Structured Perceptron • Predict {B, I, O} 27 Daarnaast O sloot O het O bedrijf O twee O nieuwe O overeenkomsten O met O Xenos B-ORG en O Big B-ORG Bazar I-ORG voor O in O totaal O 2000 O vierkante O meter O voor O een O periode O van O 10 O jaar O . O
  • 26. Onderdeel van FD Mediagroep NER: Implementation • NER: Sequence Classification • Custom implementation using seqlearn1: “Sequence learning toolkit for Python” • Based on [Graus et al., ECIR ‘14] • Flask App 28 1 https://github.com/larsmans/seqlearn
  • 27. Onderdeel van FD Mediagroep EL: Approach • Common: Linking to Wikipedia 29
  • 28. Onderdeel van FD Mediagroep EL: Approach • Custom KB; Custom implementation • Binary classification (based on [Meij et al., WSDM ‘12]) • Issue entity mention as query to KB [Elasticsearch] • Retrieve list of candidate organizations • For each candidate: • predict 1 (link), 0 (no-link) 30
  • 29. Onderdeel van FD Mediagroep EL: Features For each <document, mention, entity candidate>: 1. Entity features: • Turnover, • Size, • … 2. Mention features: • MentionLength, • … 3. Mention-Entity features: • RetrievalScorePerField, • TokenOverlapPerField • … 4. Doc features: • WoonplaatsInDocument, • … 31
  • 30. Onderdeel van FD Mediagroep EL: Implementation • sklearn RandomForestClassifier • Served in a Flask app 32
  • 31. Onderdeel van FD Mediagroep Pipeline 33 1. 0. 1. 1. 0. Doc NER mention1 org1 org2 org3 … org n Extract Features 1. 0. 0. 1. 0. 1. 1. 0. 0. 0. 1. 0. 1. 1. 0. RF 1 0 mention2 mention3 0.647 … 0.873 0.780 0.342 …
  • 32. Onderdeel van FD Mediagroep Pipeline 34 1. 0. 1. 1. 0. NER mention1 org1 org2 org3 org n Extract Features 1. 0. 0. 1. 0. 1. 1. 0. 0. 0. 1. 0. 1. 1. 0. RF 1 0 mention2 mention3 0.647 0.873 0.780 0.342 …… …
  • 33. Onderdeel van FD Mediagroep Pipeline 35 1. 0. 1. 1. 0. NER mention1 org2 org3 org1 org n Extract Features 1. 0. 0. 1. 0. 1. 1. 0. 0. 0. 1. 0. 1. 1. 0. RF 1 0 mention2 mention3 0.873 0.780 0.647 0.342 …… …
  • 34. Onderdeel van FD Mediagroep org3 1. 0. 1. 1. 0. 0.780 Pipeline 36 1. 0. 1. 1. 0. NER mention1 org1 … org n Extract Features 1. 0. 0. 1. 0. RF 1 0 mention2 mention3 0.647 0.342 … org2 1. 1. 0. 0. 0. 0.873 …
  • 35. Onderdeel van FD Mediagroep Training Data • Multiple years of (hand-labeled) articles. • NER: • Split article into sentences • Filter sentences with [at least 2] entity mentions • EL: • Apply NER to article • For each mention (m) in doc: • Query ES (retrieve 40 candidates (c)) • For each <m, c, doc>-tuple: • Extract features • If c in groundtruth: label POS, else NEG 37
  • 36. Onderdeel van FD Mediagroep Evaluation • Take data, make train/test-split • NER: ~85% • EL: ~85% • But: Data is noisy/biased • + Manual inspection 38
  • 37. Onderdeel van FD Mediagroep Bonus: Entity Salience • Based on [Reinanda et al., CIKM ‘16] • Simple baseline approach: • Prominence: where in the document is entity first mentioned? • Frequency: how often is entity mentioned? • Salience: math.sqrt(Prominence*Frequency) 39 Mention Company Salience SpotX SpotXchange Benelux B.V. 0.913 RTL Nederland RTL Nederland B.V. 0.369
  • 38. Onderdeel van FD Mediagroep Bonus: Entity Salience • Based on [Reinanda et al., CIKM ‘16] • Simple baseline approach: • Prominence: where in the document is entity first mentioned? • Frequency: how often is entity mentioned? • Salience: math.sqrt(Prominence*Frequency) 40
  • 39. Onderdeel van FD Mediagroep Bonus: Sentiment analysis • Simple Bag-of-Words binary classifier (Naive Bayes) • Trained on hand-labeled data (~10k articles) (labeled POS/NEG) • Given article (TF-IDF weighted vector), predict {POS, NEG} 41
  • 40. Onderdeel van FD Mediagroep Document Enrichment Pipeline • On average; 0.24s/article; 1. NER: Feature extraction + Prediction 2. EL: Retrieve Candidates (one query per mention) • Caching w/ Redis 3. EL: Feature Extraction+Classification (for each candidate) 4. Entity Salience Scoring 5. Sentiment analysis • Number of articles per day: approx. +160% • Number of linked orgs: approx. +310% • Works 24h/day • More “long tail” articles 42
  • 41. Onderdeel van FD Mediagroep43 Applications
  • 42. Onderdeel van FD Mediagroep Burst detection/summarization • Simple burst detection algo: • Take rolling average of time series • Take cutoff (e.g., mean+std) • Any point over cutoff = burst 44 2016-08 • Groen licht voor oliewinning in Drenthe • Robotkraan RoBorg aan boord van de Kroonborg • Afvalwater NAM weer door Hardenberg naar Twente • Minister Kamp: NAM mag weer afvalwater injecteren in Twentse bodem • Nam hervat volgende maand waterinjectie • “Vertrouwen in NAM en CVW naar absoluut dieptepunt.” • Groen licht voor herstart oliewinning in Schoonebeek • Groen licht voor oliewinning in Drenthe • Oliewinning in Schoonebeek half september hervat • TU Delft: 'Schadeonderzoek Arcadis deugt niet' 2017-03 - NAM aansprakelijk voor immateriële schade aardbevingen - NAM aansprakelijk psychologische schade aardbevingen - Aardbevingsellende: 'Het vreet aan ons' - NAM aansprakelijk voor psychische schade bewoners aardbevingsgebied - NAM aansprakelijk immateriële schade inwoners Groningenveld - NAM ook aansprakelijk voor immateriële schade door aardbevingen - Live: Rechtszaak immateriële schade door aardbevingen [afgelopen] - NAM moet ook immateriële schade aardbevingen vergoeden - 'Uitspraak is een mokerslag voor NAM en minister Kamp' Nederlandse Aardolie Maatschappij B.V.
  • 43. Onderdeel van FD Mediagroep Burst detection/summarization • Simple burst detection algo: • Take rolling average of time series • Take cutoff (e.g., mean+std) • Any point over cutoff = burst 45 Nederlandse Aardolie Maatschappij B.V.
  • 44. Onderdeel van FD Mediagroep Sentiment+events 46
  • 45. Onderdeel van FD Mediagroep Sentiment+events 47
  • 46. Onderdeel van FD Mediagroep Sentiment+events 48
  • 47. Onderdeel van FD Mediagroep Sentiment: Rankings per sector/alerts? Top 3 POS: 1. ASN Bank N.V. 0.574 2. Aegon Bank N.V. 0.540 3. de Volksbank N.V. 0.447 Top 3 NEG: 1. The Royal Bank of Scotland N.V. -0.130 2. Deutsche Bank -0.010 3. BinckBank N.V. 0.047 49
  • 48. Onderdeel van FD Mediagroep Affiliation Networks 50
  • 49. Onderdeel van FD Mediagroep As a feature 51
  • 50. Onderdeel van FD Mediagroep Fin 52
  • 51. Onderdeel van FD Mediagroep Fin Questions? @dvdgrs www.graus.co david.graus@fdmediagroep.nl Refs: D. Graus, M. Tsagkias, L. Buitinck, and M. de Rijke, “Generating pseudo-ground truth for predicting new concepts in social streams,” ECIR 2014 E. Meij, W. Weerkamp, and M. de Rijke, “Adding semantics to microblog posts,” WSDM 2012 R. Reinanda, E. Meij, and M. de Rijke, “Document Filtering for Long-tail Entities,” CIKM 2016 53