accountability hack redux

52
Parli-N-Grams Giuseppe Sollazzo @puntofisso Accountability Hack 2014 Redux Portcullis House, 15 January 2015

Upload: giuseppe-sollazzo

Post on 02-Aug-2015

206 views

Category:

Government & Nonprofit


0 download

TRANSCRIPT

Page 1: Accountability Hack Redux

Parli-N-Grams

Giuseppe Sollazzo@puntofisso

Accountability Hack 2014 ReduxPortcullis House, 15 January 2015

Page 2: Accountability Hack Redux

The language used in politicspoints to the

political, cultural, social backgroundof MPs, parties, and their time

Page 3: Accountability Hack Redux

A great search lets you

discover knowledgeby just searching

Page 4: Accountability Hack Redux

Parli-N-Grams

A search and analysis tool for Hansard

Page 5: Accountability Hack Redux

An N-Gram is a sequence of N words extracted from a longer sentence

N-Grams?

Page 6: Accountability Hack Redux

You can split any word sequence in n-grams lists

e.g. “The quick brown fox”

N-Grams?

Page 7: Accountability Hack Redux

“The quick brown fox” | 1-grams

● the● quick● brown● fox

N-Grams?

Page 8: Accountability Hack Redux

“The quick brown fox” | 2-grams

● the quick● quick brown● brown fox

N-Grams?

Page 9: Accountability Hack Redux

“The quick brown fox” | 3-grams

● the quick brown● quick brown fox

N-Grams?

Page 10: Accountability Hack Redux

“The quick brown fox” | 4-grams

● the quick brown fox

N-Grams?

Page 11: Accountability Hack Redux

30” demo

Page 12: Accountability Hack Redux
Page 13: Accountability Hack Redux
Page 14: Accountability Hack Redux
Page 15: Accountability Hack Redux

What can we find out?

Page 16: Accountability Hack Redux
Page 17: Accountability Hack Redux
Page 18: Accountability Hack Redux
Page 19: Accountability Hack Redux
Page 20: Accountability Hack Redux
Page 21: Accountability Hack Redux
Page 22: Accountability Hack Redux

Related Ideas

Page 23: Accountability Hack Redux

1. Create a Markov Chain by analysing text2. Generate text by using the Markov Chain

Markov Text Generation

Page 24: Accountability Hack Redux

photo CC BY-NC by UK Parliament: https://www.flickr.com/photos/uk_parliament/8719647747

Page 25: Accountability Hack Redux

What happens if we apply Markov analysis and generation to the

Queen’s Speeches?

Page 26: Accountability Hack Redux

My Government will be devolved.

Page 27: Accountability Hack Redux

My Government will be devolved.

FALSE

Page 28: Accountability Hack Redux

My Government will work with the Afghan government.

Page 29: Accountability Hack Redux

My Government will work with the Afghan government.

TRUE

Page 30: Accountability Hack Redux

My Government looks forward to an enhanced partnership with India.

Page 31: Accountability Hack Redux

My Government looks forward to an enhanced partnership with India.

FALSE

Page 32: Accountability Hack Redux

And more...

Page 33: Accountability Hack Redux

My Government will be reduced.

Page 34: Accountability Hack Redux

My Government will be strengthened in July.

Page 35: Accountability Hack Redux

My Government will be strengthened in Afghanistan.

Page 36: Accountability Hack Redux

People will be reviewed.

Page 37: Accountability Hack Redux

My Government will introduce fixed term Parliaments of unnecessary laws.

Page 38: Accountability Hack Redux

My Government will introduce fixed term Parliaments of children.

Page 39: Accountability Hack Redux

Legislation will be introduced for a viable Palestinian state existing in Northern Ireland.

Page 40: Accountability Hack Redux

My Government will support the abolition of Wales.

Page 41: Accountability Hack Redux

My Government looks forward to the blessing of Identity Cards and political parties.

Page 42: Accountability Hack Redux

The Almighty God may rest upon the management of the Commons.

Page 43: Accountability Hack Redux

Perception: real but implausibleCan we analyse empathy in language?Can we analyse emotional reactions to speeches?Do speeches by MPs elicit the same reaction?

A language uncanny valley?

Page 44: Accountability Hack Redux

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

Page 45: Accountability Hack Redux

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

Page 46: Accountability Hack Redux

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

Page 47: Accountability Hack Redux

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

Page 48: Accountability Hack Redux

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

Page 49: Accountability Hack Redux

What lies ahead

Page 50: Accountability Hack Redux

Vocabulary Size

Page 51: Accountability Hack Redux

Ongoing Work

Run away from PHP Python + NLTKMake it stable; auto-harvestSearch on N-Grams, N>1Search by MP and political party

-> build each MP’s political historyBuild a base of analysesUI for the public + researchers

Page 52: Accountability Hack Redux

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 ReduxPortcullis House, 15 January 2015