SlideShare a Scribd company logo
Parli-N-Grams
Giuseppe Sollazzo
@puntofisso
Accountability Hack 2014 Redux
Portcullis House, 15 January 2015
The language used in politics
points to the
political, cultural, social background
of MPs, parties, and their time
A great search
lets you
discover knowledge
by just searching
Parli-N-Grams
A search and analysis tool for
Hansard
An N-Gram is a sequence of N words
extracted from a longer sentence
N-Grams?
You can split any word sequence in n-grams lists
e.g. “The quick brown fox”
N-Grams?
“The quick brown fox” | 1-grams
● the
● quick
● brown
● fox
N-Grams?
“The quick brown fox” | 2-grams
● the quick
● quick brown
● brown fox
N-Grams?
“The quick brown fox” | 3-grams
● the quick brown
● quick brown fox
N-Grams?
“The quick brown fox” | 4-grams
● the quick brown fox
N-Grams?
30” demo
Accountability Hack Redux
Accountability Hack Redux
Accountability Hack Redux
What can we find out?
Accountability Hack Redux
Accountability Hack Redux
Accountability Hack Redux
Accountability Hack Redux
Accountability Hack Redux
Accountability Hack Redux
Related Ideas
1. Create a Markov Chain by analysing text
2. Generate text by using the Markov Chain
Markov Text Generation
photo CC BY-NC by UK Parliament: https://www.flickr.com/photos/uk_parliament/8719647747
What happens if we apply Markov
analysis and generation to the
Queen’s Speeches?
My Government will be devolved.
My Government will be devolved.
FALSE
My Government will work with the Afghan
government.
My Government will work with the Afghan
government.
TRUE
My Government looks forward to an
enhanced partnership with India.
My Government looks forward to an
enhanced partnership with India.
FALSE
And more...
My Government will be reduced.
My Government will be strengthened in July.
My Government will be strengthened in
Afghanistan.
People will be reviewed.
My Government will introduce fixed term
Parliaments of unnecessary laws.
My Government will introduce fixed term
Parliaments of children.
Legislation will be introduced for a viable
Palestinian state existing in Northern Ireland.
My Government will support the abolition of
Wales.
My Government looks forward to the blessing
of Identity Cards and political parties.
The Almighty God may rest upon the
management of the Commons.
Perception: real but implausible
Can we analyse empathy in language?
Can we analyse emotional reactions to
speeches?
Do speeches by MPs elicit the same
reaction?
A language uncanny valley?
Hubris Syndrome?
P Garrard, D Owen, et al., “Linguistic Biomarkers of Hubris Syndrome, Cortex, Elsevier, 2013
COPYRIGHT BY THE ARTICLE’
S AUTHORS
SEE FOOTNOTE FOR DETAILS
Stylistic similarity in literature
J Hughes et al., “Quantitative patterns of stylistic influence in the evolution of literature”, PNAS, 2012
COPYRIGHT BY THE ARTICLE’
S AUTHORS
SEE FOOTNOTE FOR DETAILS
Vocabulary Size
M Daniels, “The largest vocabulary in Hip-Hop”, http://rappers.mdaniels.com.s3-
website-us-east-1.amazonaws.com/
COPYRIGHT BY THE ARTICLE’S
AUTHORS
SEE FOOTNOTE FOR DETAILS
Reading level
Fox et al., “Who was America’s most well-spoken President?” http://www.vocativ.
com/interactive/usa/us-politics/presidential-readability/
COPYRIGHT BY THE ARTICLE’S
AUTHORS
SEE FOOTNOTE FOR DETAILS
Reading level
Fox et al., “Who was America’s most well-spoken President?” http://www.vocativ.
com/interactive/usa/us-politics/presidential-readability/
COPYRIGHT BY THE ARTICLE’S
AUTHORS
SEE FOOTNOTE FOR DETAILS
What lies ahead
Vocabulary Size
Ongoing Work
Run away from PHP Python + NLTK
Make it stable; auto-harvest
Search on N-Grams, N>1
Search by MP and political party
-> build each MP’s political history
Build a base of analyses
UI for the public + researchers
Questions?
Parli-N-Gram
http://parli-n-grams.puntofisso.net
http://github.com/puntofisso/AccHack14
http://www.slideshare.net/puntofisso
Giuseppe Sollazzo
@puntofisso
Accountability Hack 2014 Redux
Portcullis House, 15 January 2015

More Related Content

PDF
Parliament, Debates and Language
PPTX
Diss Linguistics
PDF
Careers in linguistics
PPTX
Careers in linguistics
KEY
Establishing Linguistic Intersubjectivity
PDF
Providing Funding to Enhance the use of Open Data in the Public Sector
PDF
Mobile Development. A primer.
PDF
A panorama of Open Data
Parliament, Debates and Language
Diss Linguistics
Careers in linguistics
Careers in linguistics
Establishing Linguistic Intersubjectivity
Providing Funding to Enhance the use of Open Data in the Public Sector
Mobile Development. A primer.
A panorama of Open Data

Viewers also liked (18)

PDF
Priorities for Research Data Services
PDF
Accountability Hack 2014 - Parli-N-Grams
PDF
Senate house presentation slideshare
PDF
449429 Kex Pma Brochure Web Final[1]
PDF
From Release to Infrastructure
PDF
DOC
Turner inspiré à la lumière du lorrain
PDF
Berlin General Info
PPT
Aurore Milan - Ile de burano
PDF
Murielle Keyeux Association Culturelle Nonceveux-Aywaille Belgique
PDF
Q2 presentation
PDF
Q4 presentation
PDF
Sweden - Analyst & Journalist Briefing 2014
PDF
Q1 presentation
PDF
Value Champion - Analyst & Journalist Briefing 2014
PDF
Q3 presentation final
PDF
Analyst & Journalist Meeting Tele2 2013 - Joachim Horn - MNO Rollout
PDF
Tele2 Q3 2010 report
Priorities for Research Data Services
Accountability Hack 2014 - Parli-N-Grams
Senate house presentation slideshare
449429 Kex Pma Brochure Web Final[1]
From Release to Infrastructure
Turner inspiré à la lumière du lorrain
Berlin General Info
Aurore Milan - Ile de burano
Murielle Keyeux Association Culturelle Nonceveux-Aywaille Belgique
Q2 presentation
Q4 presentation
Sweden - Analyst & Journalist Briefing 2014
Q1 presentation
Value Champion - Analyst & Journalist Briefing 2014
Q3 presentation final
Analyst & Journalist Meeting Tele2 2013 - Joachim Horn - MNO Rollout
Tele2 Q3 2010 report

Similar to Accountability Hack Redux (20)

PPTX
!Whorf - Linguistic Determinism ver6.pptx
PPTX
Language, Culture, and Mind-Sociolinguistics.pptx
DOCX
Nonverbal CommunicationCommunicating without words.docx
PDF
Week 3 LIN321
PDF
Week 3 LIN321
PDF
Studies In Linguistic Motivation Cognitive Linguistic Research Gunter Radden
PPT
Language, society and culture (map)
DOCX
How Languages WorkAn Introduction to Language and LinguisticsSecond Ed.docx
PPTX
Gendered language
PPTX
Chapter 1 - Class.pptx
PDF
Language evolution: A Brief Survey
PDF
Tracking the Emergence of New Words across Time and Space
PPTX
1519562311.pptx to review more on education.
PDF
Nature and Scope of English Language in Today's World
PPTX
Language_lead_lesson
PDF
Language Is An Innate Function Of Human Nature
DOCX
GSfinaltheorypaper
PPT
Language
PDF
The Role Of Language And Communication In National...
DOC
Style context register final
!Whorf - Linguistic Determinism ver6.pptx
Language, Culture, and Mind-Sociolinguistics.pptx
Nonverbal CommunicationCommunicating without words.docx
Week 3 LIN321
Week 3 LIN321
Studies In Linguistic Motivation Cognitive Linguistic Research Gunter Radden
Language, society and culture (map)
How Languages WorkAn Introduction to Language and LinguisticsSecond Ed.docx
Gendered language
Chapter 1 - Class.pptx
Language evolution: A Brief Survey
Tracking the Emergence of New Words across Time and Space
1519562311.pptx to review more on education.
Nature and Scope of English Language in Today's World
Language_lead_lesson
Language Is An Innate Function Of Human Nature
GSfinaltheorypaper
Language
The Role Of Language And Communication In National...
Style context register final

Recently uploaded (20)

PDF
Item # 2 - 934 Patterson Specific Use Permit (SUP)
PPTX
Developing_An_Advocacy_Agenda_by_Kevin_Karuga.pptx
PPTX
11Sept2023_LTIA-Cluster-Training-Presentation.pptx
PDF
ESG Alignment in Action - The Abhay Bhutada Foundation
PDF
PPT Item # 2 -- Announcements Powerpoint
PDF
Creating Memorable Moments_ Personalized Plant Gifts.pdf
PPTX
DFARS Part 252 - Clauses - Defense Regulations
PDF
PPT - Primary Rules of Interpretation (1).pdf
PDF
About Karen Miner-Romanoff - Academic & nonprofit consultant
PDF
CXPA Finland Webinar: Rated 5 Stars - Delivering Service That Customers Truly...
PPTX
True Fruits_ reportcccccccccccccccc.pptx
PDF
PPT Items # 6&7 - 900 Cambridge Oval Right-of-Way
PPTX
Neurons.pptx and the family in London are you chatgpt
PPTX
SUKANYA SAMRIDDHI YOJANA RESEARCH REPORT AIMS OBJECTIVES ITS PROVISION AND IM...
PPTX
Presentatio koos kokos koko ossssn5.pptx
PDF
The Detrimental Impacts of Hydraulic Fracturing for Oil and Gas_ A Researched...
PDF
Items # 6&7 - 900 Cambridge Oval Right-of-Way
PPTX
SOMANJAN PRAMANIK_3500032 2042.pptx
PDF
eVerify Overview and Detailed Instructions to Set up an account
PPTX
Introduction_to_the_Study_of_Globalization.pptx
Item # 2 - 934 Patterson Specific Use Permit (SUP)
Developing_An_Advocacy_Agenda_by_Kevin_Karuga.pptx
11Sept2023_LTIA-Cluster-Training-Presentation.pptx
ESG Alignment in Action - The Abhay Bhutada Foundation
PPT Item # 2 -- Announcements Powerpoint
Creating Memorable Moments_ Personalized Plant Gifts.pdf
DFARS Part 252 - Clauses - Defense Regulations
PPT - Primary Rules of Interpretation (1).pdf
About Karen Miner-Romanoff - Academic & nonprofit consultant
CXPA Finland Webinar: Rated 5 Stars - Delivering Service That Customers Truly...
True Fruits_ reportcccccccccccccccc.pptx
PPT Items # 6&7 - 900 Cambridge Oval Right-of-Way
Neurons.pptx and the family in London are you chatgpt
SUKANYA SAMRIDDHI YOJANA RESEARCH REPORT AIMS OBJECTIVES ITS PROVISION AND IM...
Presentatio koos kokos koko ossssn5.pptx
The Detrimental Impacts of Hydraulic Fracturing for Oil and Gas_ A Researched...
Items # 6&7 - 900 Cambridge Oval Right-of-Way
SOMANJAN PRAMANIK_3500032 2042.pptx
eVerify Overview and Detailed Instructions to Set up an account
Introduction_to_the_Study_of_Globalization.pptx

Accountability Hack Redux