In [3]:
import lxml.etree

In [2]:
src = "hansard/src/debates2016-01-12b.xml"

In [5]:
tree = lxml.etree.parse(src)

In [17]:
s = tree.xpath('/publicwhip/speech')[5]

In [18]:
s


Out[18]:
<Element speech at 0x7f8f6812f048>

In [19]:
s.xpath('p/text()')


Out[19]:
['Before I answer, let me take a few seconds to update the House on the breaking news coming in from Istanbul, where an explosion has occurred in the Sultanahmet area, killing at least 10 people, with many more injured. This is a tourist area of the city and we already know that some tourists are involved in this incident. We are seeking to verify whether any British nationals are involved, and if we get any news on that in the course of the next hour, I will update the House accordingly. In the meantime, I offer my sympathies to the victims, their families and everyone else affected by the attack. [Hon. Members: “Hear, hear.”]',
 'The Government are negotiating reform of the European Union and a new relationship for Britain with the European Union to fix the aspects of our membership that cause so much frustration in Britain. Following a substantive and constructive discussion at the December European Council, member states agreed to work towards mutually satisfactory solutions at the February European Council.']

In [20]:
s.attrib


Out[20]:
{'speakername': 'Philip Hammond', 'id': 'uk.org.publicwhip/debate/2016-01-12b.681.8', 'colnum': '681', 'url': 'http://www.publications.parliament.uk/pa/cm201516/cmhansrd/cm160112/debtext/160112-0001.htm#160112-0001.htm_spmin0', 'time': '11:30:00', 'speakeroffice': 'The Secretary of State for Foreign and Commonwealth Affairs', 'person_id': 'uk.org.publicwhip/person/10257'}

In [22]:
s.attrib.get('speakername', '(no speaker)')


Out[22]:
'Philip Hammond'

In [32]:
import show
import importlib
importlib.reload(show)


Out[32]:
<module 'show' from '/home/takluyver/Code/spotting-stat-claims/show.py'>

In [33]:
for speech in tree.xpath('/publicwhip/speech')[:100]:
    show.show_claims(speech)


[no speaker] at 11:30:00
…ary of State was asked—…

Angela Rayner at 11:30:00
…ssions he has had in the Council of the EU as part of negotiations on the UK’s m…

David Hanson at 11:30:00
…ssions he has had in the Council of the EU on the Prime Minister's letter dated …
…esident of the European Council as part of negotiations on the UK's membership o…

David Nuttall at 11:30:00
…ess the Government has made on the renegotiation of the UK's terms of membership…

Damian Green at 11:30:00
…ess has been made on negotiations to reform the EU and the UK's relationship wit…

Philip Hammond at 11:30:00
…nswer, let me take a few seconds to update the House on the breaking news coming…
…ment are negotiating reform of the European Union and a new relationship for Bri…

Angela Rayner at 11:30:00
… Secretary of State’s sentiments regarding the situation in Istanbul. Does he ac…

Philip Hammond at 11:30:00
…trary—a successful negotiation will set the EU on a clear course to create jobs …

David Hanson at 11:30:00
… of …
… It is also clear that whatever the outcome of the discussions on that letter, n…

Philip Hammond at 11:30:00
…Minister has been clear throughout that once we have an agreed deal, he will mak…

David Nuttall at 11:30:00
…e are suspicious about the seriousness of this renegotiation when three of the s…

Philip Hammond at 11:30:00
… that we have seen, particularly under the present Commission, some very welcome…

Damian Green at 11:30:00
…f the Prime Minister’s demands in these negotiations are important, but making s…

Philip Hammond at 11:30:00
…on. Friend will know, and opinion polling shows, that many people in this countr…

Alex Salmond at 11:30:00
…ts of everyone on these Benches will obviously be with those caught up in the in…
…stand it, the Prime Minister has called for a “united, harmonious and mutually r…

Philip Hammond at 11:30:00
…ht hon. Gentleman knows, that is not what the Bill provides for. But given the t…

Alex Salmond at 11:30:00
…o the Foreign Secretary that if the referendum were held within six weeks after …

Philip Hammond at 11:30:00
…trying to convey to the right hon. Gentleman is that that is not what the Bill p…

Daniel Kawczynski at 11:30:00
…t the Foreign Secretary is aware that the overwhelming majority of the 800,000 P…

Philip Hammond at 11:30:00
…cted to, and have to, address the concerns of the British people, and there are …

John Spellar at 11:30:00
…ough the Secretary of State, thank the Europe Minister for meeting an MPs’ deleg…

Philip Hammond at 11:30:00
…lowing the case closely and we have already made the Portuguese authorities awar…

Mark Field at 11:30:00
…ot raised in the letter of …
…of national security. Would the Foreign Secretary like to tell us a little about…

Philip Hammond at 11:30:00
…t hon. Friend knows, national security is reserved to the member states and we r…

Pat Glass at 11:30:00
…t thank the Secretary of State for the update on the situation in Istanbul? Of c…
…aigning to leave the European Union have made much of the unrealistic argument t…

Philip Hammond at 11:30:00
…st welcome the hon. Lady to her position on the Front Bench. Indeed, let me welc…
…ton South East (Mr McFadden). It is a sad indictment of today’s Labour party tha…
…ar that Britain benefits from access to the single market. If Britain voted to l…

Oliver Dowden at 11:30:00
…t representations he has made to the Iranian Government on the case of Mr Kamal …

Tobias Ellwood at 11:30:00
… Friend is aware, Iran does not recognise dual nationality, so we have not been …

Oliver Dowden at 11:30:00
…i is now 76 years of age, and there are serious concerns about his health, inclu…

Tobias Ellwood at 11:30:00
…ful to my hon. Friend for organising a meeting in December with his constituent,…
…argé d’affaires with the deputy secretary-general of the Iranian High Council fo…

Victoria Prentis at 11:30:00
…matic support the Government are providing to the countries surrounding Syria to…

Philip Hammond at 11:30:00
… provided £559 million to help the 4.6 million Syrian refugees in neighbouring c…

Victoria Prentis at 11:30:00
…ght hon. Friend agree that the UK can be proud of the response to the UN appeal …

Michael Fabricant at 11:30:00
…song!…

Victoria Prentis at 11:30:00
… give the House a song, but I might be able to give the final figure at some tim…
…ght hon. Friend agree that other countries should follow our lead?…

Philip Hammond at 11:30:00
… very much welcome my hon. Friend’s Singing for Syrians initiative. That and ini…
…just ask people to pledge additional money. We will go to the conference with in…

John Woodcock at 11:30:00
… there would be fewer displaced people to Syria’s neighbours if Russia stopped i…

Philip Hammond at 11:30:00
…gular representations to the Russians, first about the indiscriminate nature of …

Nusrat Ghani at 11:30:00
…in Syria and the region requires the removal of Daesh. Will the Secretary of Sta…

Philip Hammond at 11:30:00
…the congratulations to the Iraqi armed forces on their achievement in liberating…

Tasmina Ahmed-Sheikh at 11:30:00
…the Secretary of State for International Development confirmed that yesterday ma…

Philip Hammond at 11:30:00
…on. Friend the Secretary of State for International Development made a statement…

Gisela Stuart at 11:30:00
…currently some 16,000 refugees on the Syrian side of the Jordanian border, and J…

Philip Hammond at 11:30:00
…ping and supporting the Jordanians with the Zaatari refugee camp. As I have said…

Jason McCartney at 11:30:00
…t assessment he has made of the political situation in Ukraine and the prospects…

David Lidington at 11:30:00
… facing multiple challenges, both over domestic reform and the security situatio…

Jason McCartney at 11:30:00
…ed Ukrainian Christmas with Huddersfield and Colne Valley’s Ukrainian community …

David Lidington at 11:30:00
…or the implementation of the ceasefire and the withdrawal of weapons were among …

Conor McGinn at 11:30:00
…Minsk agreement, the Organisation for Security and Co-operation in Europe is cha…

David Lidington at 11:30:00
…cussed those points directly with Michael Link, the director of the OSCE Office …

Jonathan Djanogly at 11:30:00
…ght hon. Friend confirm that, in any discussions the Government have with Russia…

David Lidington at 11:30:00
… my hon. Friend an unqualified assurance on that point. We will continue to talk…

Mr Speaker at 11:30:00
…ell. I call Sir Gerald Howarth.…

Gerald Howarth at 11:30:00
…ful to you, Mr Speaker. As my right hon. Friend knows, corruption is a major pro…

David Lidington at 11:30:00
…iend puts his finger on one of the central challenges facing the Ukrainian Gover…

Meg Hillier at 11:30:00
…ess has been made on reaching an international agreement on terror financing.…

Tobias Ellwood at 11:30:00
…nd of the strategy to defeat Daesh is to cut off its financing. A series of inte…

Meg Hillier at 11:30:00
…e Minister for that response, but will he outline what specific steps are being …

Tobias Ellwood at 11:30:00
…ady is right to highlight the importance of oil sales to Daesh, which accounts f…

Stephen Phillips at 11:30:00
…ational convention for the suppression of the financing of terrorism has receive…

Tobias Ellwood at 11:30:00
…d learned Friend is right to articulate the loopholes that still exist. We are h…

Graham Jones at 11:30:00
…s clearly flowing out of ISIL towards Afghanistan to fund its huge operations th…

Tobias Ellwood at 11:30:00
…entleman is correct. It is not only finances that are moving out of Iraq and Syr…

Nigel Evans at 11:30:00
…d and eighty-seven countries have ratified the international convention for the …

Tobias Ellwood at 11:30:00
…iend is right to articulate that point. This is the main funding source that is …

Diana R. Johnson at 11:30:00
…on from the question from my hon. Friend …
…ate by Associated Press at the end of October 2015 was that between 40,000 and 5…

Tobias Ellwood at 11:30:00
…clear that there is an estimate that Daesh is receiving between $2.5 million and…

Mike Freer at 11:30:00
… the Government are taking to promote trade and diplomatic connections with othe…

Hugo Swire at 11:30:00
… Kingdom is committed to strengthening its engagement with the Commonwealth. My …

Mike Freer at 11:30:00
…ful for that answer. Given that three quarters of UK-Commonwealth trade is with …

Hugo Swire at 11:30:00
…iend makes a good point. This question affords me the opportunity to pay tribute…
…a, we had the biggest ever Commonwealth business forum, which was organised by m…

Chi Onwurah at 11:30:00
… all-party group, which I chair, recently met governmental and non-governmental …

Hugo Swire at 11:30:00
… trade deals involving 17 Commonwealth countries, and it is currently negotiatin…

Mims Davies at 11:30:00
…inister agree that we cannot just wait for the result of the referendum on our m…

Mr Speaker at 11:30:00
…ger by the hon. Lady.…

Hugo Swire at 11:30:00
… Mr Speaker. We are a key member of the Commonwealth, and we know that trade bet…

Valerie Vaz at 11:30:00
…tly thrown by the Minister’s last words, Mr Speaker.…
…monwealth Heads of Government meeting in November, the first ever women’s forum …

Hugo Swire at 11:30:00
…d the hon. Lady will know, as I do, that the Commonwealth charter focuses on suc…

Andrew Rosindell at 11:30:00
…er will know that Commonwealth countries represent some of the most important fu…

Hugo Swire at 11:30:00
…o my hon. Friend that we want to encourage trade within the Commonwealth, and as…

Fabian Hamilton at 11:30:00
…een Commonwealth member Rwanda and the UK has grown steadily since the end of th…

Hugo Swire at 11:30:00
…the hon. Gentleman to his position on the Front Bench. The Under-Secretary of St…

Craig Williams at 11:30:00
…t assessment he has made of the strength of diplomatic and economic relations be…

Philip Hammond at 11:30:00
…atic and economic relationships with China are stronger than ever. Last year’s s…

Craig Williams at 11:30:00
…my right hon. Friend’s recent visit to China. Does he agree that with China set …

Philip Hammond at 11:30:00
… vital trade partner. It is also an important investment partner, with a huge wi…

Margaret Ritchie at 11:30:00
…tunities will arise for those who wish to export food produce from the United Ki…

Philip Hammond at 11:30:00
…ady puts her finger on a very topical subject. I discussed it again with the Chi…

Richard Graham at 11:30:00
…gic partnership with China is incredibly important, not least to trade and inves…

Philip Hammond at 11:30:00
…n. Friend is absolutely right that a proper rule of law system is vital for the …

Angela Smith at 11:30:00
…ourse right for the Government to pursue a stronger relationship with China, but…

Philip Hammond at 11:30:00
…ady is absolutely right. We raised this issue with President Xi when he was here…

Catherine West at 11:30:00
…late the Secretary of State on the common statement, between the UK and China, o…

Philip Hammond at 11:30:00
…y, such incidents do occur in China, but we have a forum for raising concerns, t…

Mr Speaker at 11:30:00
…sed to wonder why Foreign Office questions took longer. A senior Clerk said to m…

Andrew Gwynne at 11:30:00
…sment he has made of the implications for his policies of the findings of the Wa…

James Duddridge at 11:30:00
…ernment take child safeguarding in the overseas territories extremely seriously.…

Andrew Gwynne at 11:30:00
…eport notes, at paragraph 1.48, that…
… be recognised that Claire Gannon was not properly briefed for the task that con…
… responsibility of the Foreign Office, the Department for International Developm…

James Duddridge at 11:30:00
…ll governors going out to overseas territories, the Foreign Office organises ext…
…ct was central to the Joint Ministerial Council only last month; in fact, it was…


In [ ]: