ireland-news-headlines-new/Untitled.ipynb
2022-06-07 18:00:10 +02:00

98 KiB
Raw Blame History

import lzma
import numpy as np
from gensim import downloader
from gensim.models import Word2Vec
import gensim.downloader
import pandas as pd
import csv
from sklearn import preprocessing
import vowpalwabbit
train_x = pd.read_csv('train/in.tsv', header=None, sep='\t', quoting=csv.QUOTE_NONE, error_bad_lines=False)
train_y = pd.read_csv('train/expected.tsv', header=None, sep='\t', quoting=csv.QUOTE_NONE, error_bad_lines=False)
dev_x = pd.read_csv('dev-0/in.tsv', header=None, sep='\t', quoting=csv.QUOTE_NONE, error_bad_lines=False)
dev_y = pd.read_csv('dev-0/expected.tsv', header=None, sep='\t', quoting=csv.QUOTE_NONE, error_bad_lines=False)
testa_x = pd.read_csv('test-A/in.tsv', header=None, sep='\t',quoting=csv.QUOTE_NONE, error_bad_lines=False)
testb_x = pd.read_csv('test-B/in.tsv', header=None, sep='\t',quoting=csv.QUOTE_NONE, error_bad_lines=False)
train_x[:10]
0 1 2
0 2004.508197 20040705 Sudan claims it is disarming militias
1 2008.442623 20080611 Bluffer's guide to Euro 2008
2 2012.587432 20120803 Ennis tallies her highest first day total
3 2009.071233 20090127 Sri Lanka continues to battle Tamil Tigers
4 1997.345205 19970507 Talks today to avert new health service strike
5 2018.046448 20180118 Sunderland end interest in Jon Walters as inju...
6 2010.605479 20100810 Heatwave threatens Russian recovery
7 2001.800000 20011020 Maher's last wish realised as his body is retu...
8 2004.778082 20041011 Two to appear in court over Dunsink protest
9 2017.005479 20170103 Sinn Féin warns Stormont may collapse over 'ca...
dev_x[:10]
0 1 2
0 2014.936986 20141209 President Higgins and Xi Jinping enjoy product...
1 2009.186301 20090310 German trade surplus at seven-year low
2 2019.553425 20190722 Potatoes have 'huge image issue' among the youth
3 2000.554645 20000722 New home education guidelines favour school te...
4 2019.641096 20190823 Mindhunter drags us back to the place where th...
5 2001.158904 20010228 'Asgard' to escape from Kilmainham Gaol and ap...
6 2004.609290 20040811 Five dead after British bus crashes in Austria
7 2012.368852 20120515 Clane General Hospital expects to return to pr...
8 2008.060109 20080123 NI death cert plan 'won't bring closure'
9 2012.791781 20121016 UK investigation into Icelandic bank fraud aba...
testa_x[:10]
0 1 2
0 2011.158904 20110228 Erratic Wales do it the hard way
1 2018.456284 20180617 Girls in my daughter's class are calling her fat
2 1999.742466 19990929 Russia 'not ready' for Y2K
3 2000.486339 20000627 Those who can't
4 1998.423497 19980605 Loach returns to Irish theme
5 2005.928767 20051206 Eta says bomb planted in Santander airport
6 2002.467213 20020621 Inamoto going back to Japan
7 2015.252055 20150403 Neptune Regatta draws big Easter entry
8 2006.005464 20060103 Brasil One forges ahead
9 2005.569863 20050728 IRA must hand over criminal assets - McDowell
train_y[:10]
0
0 news
1 sport
2 news
3 news
4 news
5 sport
6 news
7 news
8 news
9 news
train_x = train_x[2]
dev_x = dev_x[2]
testa_x = testa_x[2]
testb_x = testb_x[2]
train_x[0]
'Sudan claims it is disarming militias'
train_x
0                   Sudan claims it is disarming militias
1                            Bluffer's guide to Euro 2008
2               Ennis tallies her highest first day total
3              Sri Lanka continues to battle Tamil Tigers
4          Talks today to avert new health service strike
                                ...                      
1186893               Scores of Taliban killed in clashes
1186894                                   Atoms for Peace
1186895          Pope begins biblical pilgrimage in Egypt
1186896               Aer Lingus suspends two more pilots
1186897      Church leaders appeal for restraint and calm
Name: 2, Length: 1186898, dtype: object
train_y[0].unique()
array(['news', 'sport', 'opinion', 'business', 'culture', 'lifestyle',
       'removed'], dtype=object)
le = preprocessing.LabelEncoder()
le.fit(['news', 'sport', 'opinion', 'business', 'culture', 'lifestyle',
       'removed'])
train_y[0] = le.fit_transform(train_y[0])
train_y[:4]
0
0 3
1 6
2 3
3 3
model = vowpalwabbit.Workspace("--oaa 3 --quiet")
train_data = ['{} | headline: {}'.format(y, x) for x,y in zip(train_x,train_y[0])]
type(train_y)
pandas.core.frame.DataFrame
type(train_x)
pandas.core.series.Series
train_data
['3 | headline: Sudan claims it is disarming militias',
 "6 | headline: Bluffer's guide to Euro 2008",
 '3 | headline: Ennis tallies her highest first day total',
 '3 | headline: Sri Lanka continues to battle Tamil Tigers',
 '3 | headline: Talks today to avert new health service strike',
 '6 | headline: Sunderland end interest in Jon Walters as injury strikes again',
 '3 | headline: Heatwave threatens Russian recovery',
 "3 | headline: Maher's last wish realised as his body is returned to Limerick",
 '3 | headline: Two to appear in court over Dunsink protest',
 "3 | headline: Sinn Féin warns Stormont may collapse over 'cash for ash'",
 '3 | headline: Oral hearing into liquid gas pipeline to be held next month',
 '3 | headline: Hopes rise for recovery in chip demand',
 '4 | headline: WELFARE FRAUD',
 "3 | headline: Green Party's key promise up in the air as carbon target appears elusive",
 '6 | headline: It all unravels for Waterford',
 '0 | headline: EU welcomes stability pact but warns of inflationary pressures',
 "4 | headline: Time to expose the charade of 'peaceful protest' over Irish Water",
 '1 | headline: An unholy hour',
 '0 | headline: Industrial output and car sales rise',
 '3 | headline: 101 held after raids on lap-dancing clubs',
 '6 | headline: Robbie Williams centre-stage at Thomond Park',
 '6 | headline: Rodriguez antics costly for Burka',
 '4 | headline: Corruption and aid to Africa',
 '3 | headline: Minister says he was surprised at licensing methods',
 '4 | headline: The creeping arrogance of the coalition',
 '0 | headline: EU ministers meet amidst signs of slowdown ending',
 '3 | headline: Euro jumps within sight of record highs',
 '3 | headline: Taoiseach predicts economy will improve this year',
 '4 | headline: Peter Murtagh: Bright voice on darkest days for Irish in Britain',
 '3 | headline: Gardai appeal over missing Galway student',
 '3 | headline: Portugal sack coach Oliveira',
 '3 | headline: National Broadband plan could hit €3bn; Varadkar tells Dáil',
 '1 | headline: How Irish podcasting hit the mainstream',
 '3 | headline: Danes fine spam e-mail firm €53;000',
 '4 | headline: A bishop; a priest; and the air that they breathed',
 '3 | headline: UN chief stresses human cost of climate change delay',
 '3 | headline: Children of Palestinian refugees have a school to go to  for now',
 '3 | headline: Two residents arrested at Irish Water protest in Cork',
 '3 | headline: French security forces patrol Jewish schools ahead of cabinet meeting',
 '2 | headline: Exert your consumer rights early and firms will notice',
 '3 | headline: Powell to go ahead with talks despite protests from Israel',
 '6 | headline: Kerrigan to put Leinster on track',
 '3 | headline: Guinness hopes for Surge in French sales',
 '2 | headline: Veteran Irish fashion designer Richard Lewis dies at 73',
 '0 | headline: Tetrarch poised for €7.5m first phase at Millennium Park',
 '6 | headline: All Blacks blow Brave Blossoms asunder',
 '3 | headline: Late cancellation of some courses distresses students',
 '6 | headline: Form points to a Limerick victory',
 '3 | headline: Archbishop warns against complacency on child protection',
 '3 | headline: Arson attack on clubhouse',
 '4 | headline: Catholic Church and sex abuse',
 '3 | headline: 25 more prisoners freed',
 "3 | headline: Murphy happy with Big Zeb's form",
 "1 | headline: Browned off in Ballina: The West's Asleep",
 '3 | headline: Peter Fonda dies aged 79',
 '0 | headline: Tusa bank opens three outlets',
 '3 | headline: Garda wanted €30;000 to stop prosecution; court hears',
 '4 | headline: Preparing for a fair budget',
 "6 | headline: Solskjaer's honeymoon comes to an end; D'Arcy on the French rugby crisis",
 '6 | headline: Six Ireland internationals named in Pro 12 team of the season',
 '3 | headline: Pope visit to Ireland discounted',
 '3 | headline: HSE cuts number of psychiatrists in Galway',
 "3 | headline: Justice group says speedier action by RUC could have saved Nelson's life",
 '3 | headline: Cutting the apron strings',
 '3 | headline: Seeking Master Li',
 '3 | headline: Call for counselling for jurors suffering stress',
 '4 | headline: Cobh cathedral',
 '3 | headline: Nobel Prize for Obama hailed by world leaders',
 '6 | headline: Munich to host Grand Prix final',
 '2 | headline: Opel gives Vectra confidence and comfort',
 "0 | headline: Stocktake: Emerging markets looking 'increasingly buyable'",
 '0 | headline: Johnston Press woes laid bare in company accounts',
 '3 | headline: German nurse handed second life sentence for murder of 85 patients',
 '0 | headline: Euro will open borders to credit but also to prospect of debt',
 "3 | headline: 'Almost certain' Sean Quinn family behind €10m asset-stripping of company; says judge",
 '3 | headline: Awards recognise community volunteers',
 '0 | headline: IMF expects Irish economy to expand by 5% in 2016',
 '3 | headline: School lifts suspension over photo',
 '3 | headline: 18 killed in Afghanistan attacks',
 '3 | headline: Dublin fairground fall kills woman',
 '3 | headline: Retired RUC officers to probe cattle smuggling',
 '3 | headline: Uncertainty remains over impeachment',
 '6 | headline: Ballymore remains Cheltenham target for hotpot Samcro',
 "6 | headline: O'Gara shelves talk of retiring",
 '3 | headline: SF knew of IRA operations in 2004; Ahern claims',
 '3 | headline: The lure of a good old browse',
 '3 | headline: People trapped as flames leap high from huge Moscow tower',
 "4 | headline: TANAISTE'S AIR CORPS TRIP",
 '6 | headline: Barnes and Conlan welcome vote to include professionals',
 '3 | headline: Initiative will help WW2 veterans revisit battlefields',
 '3 | headline: Motive for north Belfast murder likely to be drugs',
 '4 | headline: Luring tourists to Ireland',
 '3 | headline: Gays call for war memorial',
 '0 | headline: Standard Chartered set to end 10-year boom with 2013 drop in profit',
 '2 | headline: Shooters Bar',
 '3 | headline: Appeals fail to prevent deportation of Iraqis',
 '6 | headline: Jennings happy with underdog status',
 '4 | headline: Stephen Collins: Two main parties battle over Siteserv and banking inquiry',
 '3 | headline: South Korea fires at North after loudspeaker attack',
 "3 | headline: McLaughlin accepts 'status quo'",
 '1 | headline: Ten trick-or-treating facts for impressive bonfire chats',
 "6 | headline: Liverpool cling on for Jurgen Klopp's first win",
 '6 | headline: All change as Graf takes pole position',
 '3 | headline: Farmer sure Flynn sold CMI scheme',
 '3 | headline: Quake survivor dies in hospital',
 '6 | headline: Italy left with a tough job to advance',
 '0 | headline: Trafford and Green argue over fairness of offer',
 '3 | headline: McCain campaign accuses Obama of flip-flop on Iraq',
 '3 | headline: Maskey settles RUC action',
 '2 | headline: Riverdance pair plan to go underground',
 '1 | headline: Coheed and Cambria are winning The Amory Wars',
 "1 | headline: Peaky Blinders: can Cillian Murphy and the gang still cut it? Here's our verdict",
 '1 | headline: Singing at its best in Puccini',
 '6 | headline: Power of the mind key to curing a team with a stutter',
 '3 | headline: US vote calls for Patten to be enforced',
 '6 | headline: Carr hits nightmare own goal',
 '0 | headline: BoSI sets up internal bad loans unit',
 '3 | headline: Gas explosion demolishes Chinese takeaway in Derry',
 '6 | headline: Recharging the batteries abroad',
 '3 | headline: In Spallen we trust; with bursary award',
 '1 | headline: The End We Start From review: motherhood in a new dystopia',
 "3 | headline: 'Mood music' to target radio's 'lost generation'",
 '3 | headline: Jury to hear claims of past abuse by Jackson',
 "3 | headline: O'Brien's father says tribunal engaged in 'witch-hunt'",
 "1 | headline: 'Most people steal music - God knows I do'",
 '0 | headline: Penalty shoot-outs provide tactical lessons in the game of life',
 '3 | headline: Judge calls for crackdown on people traffickers',
 '6 | headline: Meath advance',
 '4 | headline: CHRISTMAS DINNERS',
 '4 | headline: D-day for Cyprus',
 '6 | headline: Grant comes with mixed fortunes',
 '6 | headline: Givens loses another established defender',
 '4 | headline: New Orleans parties',
 '6 | headline: Leinster carry on regardless to claim PRO12 title',
 '4 | headline: Catholics must accept changing church may take longer than their lifetime',
 '4 | headline: A malign influence from Britain',
 '4 | headline: Local property tax and local councils',
 '3 | headline: Fifteen AIG executives to return bonuses',
 '3 | headline: Ill-feeling at start of health debate',
 '3 | headline: UCD student attacked in US remains critically ill',
 '3 | headline: Bill will require newly-weds to register marriage',
 '6 | headline: Woods just better than the rest',
 '3 | headline: British officials considered redrawing Border; 1984 papers show',
 '3 | headline: Cork Con joined at top of AIL league',
 '0 | headline: DCC to pay €19.3m for two new businesses',
 "3 | headline: Prince's private secretary to quit post over alleged differences of opinion",
 '0 | headline: Sort out finance before getting to work on home improvements',
 '6 | headline: Leeds worried by rising wage bill',
 '3 | headline: Group to challenge constituency revision',
 '3 | headline: Decision later on conviction appeal',
 '0 | headline: Survey ranks investment managers over five years',
 '4 | headline: Plotting a pleasant course through village life on the ocean wave',
 "0 | headline: Stripe warns small firms most at risk from '€57bn' EU security rule",
 "6 | headline: O'Neill travels with shadow squad",
 '6 | headline: Noel McGrath cherishes both the good and bad days with Tipperary',
 '3 | headline: Man remanded on weapons charges',
 '1 | headline: No fakers',
 '6 | headline: Bertha survives brush with law',
 '1 | headline: Drama te bruite',
 '6 | headline: Ireland hit for six of the worst as Trapattoni comes under pressure',
 '3 | headline: Japanese Minister bows to PM',
 '3 | headline: British foot-and-mouth outbreak',
 '4 | headline: Where will Ireland stand in an altered EU?',
 '3 | headline: Mixed response to maths papers as concerns are raised over language',
 '1 | headline: Jimi Hendrix',
 '6 | headline: Games of tournament',
 '3 | headline: Man arrested in Nelson murder inquiry',
 '3 | headline: Get your filthy paws off my fur!',
 '3 | headline: Helping hands',
 "3 | headline: 'No soldier should be charged;' say British veterans",
 '3 | headline: HSE warns of potential €881m funding crisis in 2018',
 '3 | headline: Little artistic freedom in China beyond film festival red carpets',
 "3 | headline: Father questioned over sons' deaths after release from hospital",
 "3 | headline: Murder trial told victim's body had been mutilated by animals",
 '3 | headline: Giant currach with a mission makes waves in Dingle',
 '6 | headline: Rogue Angel could lead Mouse Morris to hat-trick of Grand Nationals',
 "6 | headline: Masters' class drives Cork",
 "2 | headline: Video: All the news that's fit to sing",
 '0 | headline: Credit unions asked to pay €30 million into new stabilisiation fund',
 "6 | headline: Just the ticket for O'Connor",
 '3 | headline: Dallas nurse to leave Atlanta hospital free of Ebola virus',
 '3 | headline: Supermarkets take out British goods',
 '6 | headline: Cristiano Ronaldo recorded goading Atlético Madrid after defeat',
 '3 | headline: Education grant to Cork club written off',
 "3 | headline: SDLP welcomes call to end GAA's Rule 21 ban",
 "3 | headline: 'Trinity News' scoops top media awards",
 "4 | headline: There is a way to bring Bewley's back to life",
 '4 | headline: Cost of YES programme',
 '6 | headline: Vieira agrees to join Inter',
 '3 | headline: Higgins leads congratulations',
 '3 | headline: Munster doctors against move of Cork blood-test centre to Dublin',
 '3 | headline: Bush to press Sharon over settlements',
 '3 | headline: Pentagon eyes eastern Europe as location for new air bases',
 '1 | headline: Sociodesic: A space for the three great loves',
 '3 | headline: West refused leave to appeal',
 "6 | headline: Ex-FA chiefs say organisation full of 'elderly white men'",
 '0 | headline: Accuris wins $1.5m deal in NZ',
 '3 | headline: Bruise weakens suicide theory; Spector trial told',
 "3 | headline: Where's That? - Lettermacaward 1366",
 '4 | headline: PICTURING DEATH',
 '6 | headline: Cork boss Morgan drops his captain',
 '1 | headline: A helping hand to make writers pitch perfect',
 '0 | headline: Talks on world trade collapse',
 '3 | headline: Concern at scale of plans for city centre Cork site',
 '3 | headline: Mitchell and Davis vie for election slogan',
 '6 | headline: Rory McIlroy returns to Sydney with fond memories of title win',
 '3 | headline: We have the people to make a difference',
 '3 | headline: Report discounts cancer risk from pylons',
 '3 | headline: Government to raise €18.4bn in bonds in 2009',
 '3 | headline: The poll day question',
 '3 | headline: Hospitals face closure over shortage of fuel; medicines',
 '4 | headline: THE BENEFITS OF BANKING',
 '3 | headline: Leeds star Smith in bottle-throwing incident',
 '3 | headline: Senator critical of Garda reforms Bill',
 '4 | headline: Attitudes to the death penalty',
 '0 | headline: ACC extends SSIA rate deadline',
 '0 | headline: Looking for solutions from those who got us into mess in first place',
 '3 | headline: Cousins had been shot and stabbed in feud',
 '6 | headline: Galatasaray eye Berbatov',
 "3 | headline: INTO says league tables will have 'chilling' impact",
 "3 | headline: Highlights of Barack Obama's Berlin speech",
 '3 | headline: Irish squad for Wales game unchanged',
 '3 | headline: Breast-feeding bin tax protester released from jail',
 '3 | headline: A question of respect',
 '6 | headline: The days Norman would prefer to forget',
 '6 | headline: UCD in full flight with six-try salvo',
 '0 | headline: First start-up night proves a big draw',
 '4 | headline: We have to fight bigoted republicans for soul of nationalism',
 '3 | headline: Much-needed brakes',
 "6 | headline: 'Old man' the seer in Cragg's odyssey",
 '0 | headline: Director sues AIB over alleged reckless lending',
 '4 | headline: What Bertie did next',
 '3 | headline: VALUE FOR MONEY',
 '0 | headline: DCC board defends stance on Supreme Court ruling',
 "3 | headline: Don't take Yes vote for granted; warns Eamon Ryan",
 '0 | headline: Jefferies tips further acquisitions at Smurfit Kappa',
 '0 | headline: US current account deficit widens sharply in first quarter',
 '6 | headline: Free Eagle set for a memorable Sha Tin swansong',
 '3 | headline: Ghanaians force Liberian refugees back to sea after brief stay in port',
 '0 | headline: Wind and waste to boost Treasury product portfolio',
 "3 | headline: Governments welcome 'positive' report on IRA",
 '3 | headline: The easiest and hardest subjects of Leaving Cert 2016',
 '4 | headline: Going postal',
 '3 | headline: Government backs new radiotherapy proposals',
 '0 | headline: Broadcasters would accept fine system',
 '3 | headline: Consumer sentiment declines',
 '6 | headline: Six Nations: Ireland look primed for a day of days',
 "3 | headline: Berlusconi says new under-age sex claims are 'mud'",
 "0 | headline: China's economic growth slowest since 1993 over trade war",
 '3 | headline: Teaching time in key subjects to be cut for wellbeing classes',
 '3 | headline: US transport plane makes forced landing at Shannon',
 "1 | headline: Flaming hell; it's how long?",
 '6 | headline: Armstrong refuses to tempt fate',
 '3 | headline: Beaumount patients wait for bug test results',
 "2 | headline: Irish aid workers on sex abuse: 'Head office is a long way away'",
 '3 | headline: Haemophiliac compensation deal agreed',
 '0 | headline: Competition commissioner signs off on €48.25m Centocor grant',
 '3 | headline: Syrian security forces kill man as protests continue',
 "3 | headline: People with mental health issues 'waiting 10 years for diagnosis'",
 '3 | headline: Award for 407 people who were 100 last year from President',
 '3 | headline: McManus gets permission to build lake on grounds of Limerick mansion',
 '0 | headline: Bush presents $2;900bn budget',
 '3 | headline: Battle for S Korean democracy pits Bulldozer against Minerva',
 '1 | headline: Need For Speed: Hot Pursuit',
 "6 | headline: There's still a glimmer of hope for us",
 '6 | headline: Safin sees the grass is getting greener',
 '3 | headline: Warning on bugs becoming resistant to drugs',
 '2 | headline: C4 comes to market',
 '3 | headline: We are born to smile; and the practice could save our lives',
 '3 | headline: Court ultimatum in Shelbourne debt case',
 "3 | headline: Badly behaved children don't deserve a place at the cafe table",
 '3 | headline: Giles back on home turf to take the honours',
 '3 | headline: Asylum deal sought at EU meeting in Dublin',
 '6 | headline: Bealin disagrees on burnout issue',
 '3 | headline: Carberry to ride National favourite',
 '3 | headline: Dangers of entering pact stressed by delegates',
 "3 | headline: EU's peace programme begins to yield dividends",
 "4 | headline: Ordination Of Sinead O'Connor",
 '6 | headline: A Day in the Life of Ian Ashbee',
 '4 | headline: BIKE SAFETY',
 '6 | headline: Glentoran face an uphill battle',
 "0 | headline: Who's in charge here?",
 "2 | headline: Savills tunes up for annual Dublin's/Cork's Got Talent fundraiser",
 '3 | headline: McPherson takes on World Cup',
 '0 | headline: BA air link resumes',
 "3 | headline: Women feel need for abortion 'cover stories' for work; survey author says",
 '3 | headline: Law briefs',
 "3 | headline: Murder accused wanted to take dead man's bank card; trial told",
 '3 | headline: South American glaciers melting faster now than for 350 years',
 '3 | headline: Garda enforcement behind fall in number killed on roads',
 '0 | headline: Option Wireless Irish division posts pretax loss of €15.6m',
 '3 | headline: Civil servant union backs nurses',
 '6 | headline: Sindelar turns his season around',
 '6 | headline: Dublin acquisition of Spawell expected by early March',
 '6 | headline: Kerry and Fitzmaurice looking to maintain momentum',
 '3 | headline: £700;000 plan to counter crime',
 '4 | headline: Irish aid and corruption',
 '3 | headline: £80m from EU to fund separate scheme',
 '3 | headline: Six questioned over Antrim assault on man',
 '3 | headline: Woman killed in Westmeath crash',
 '4 | headline: Practising what you preach',
 '3 | headline: French unemployment at 9.9% in September',
 "1 | headline: Julia's Eyes",
 '0 | headline: Aughinish MD to meet ESB on rise',
 '4 | headline: Marine Co-operation',
 '6 | headline: Test for Hassett',
 "3 | headline: Communication with lenders 'vital'",
 "6 | headline: If proven Mourinho can't manage the United job; then who can?",
 '6 | headline: Van Gaal to speak to board before deciding Old Trafford future',
 "3 | headline: Keith Byrne's family welcome his release from custody in US",
 '3 | headline: Japanese emperor Akihito abdicates to end 30-year reign',
 '3 | headline: Postal worker kills six then shoots himself',
 '3 | headline: Intoxicating Liquor Act brings tougher penalties from today',
 '3 | headline: Europe is at a crossroads: will we push forward a united Europe of peace and freedom?',
 '3 | headline: Joyful homecomings aplenty at Dublin Airport',
 '4 | headline: Home truths about Home Rule',
 '3 | headline: Clegg more surprised than most at new popularity',
 "3 | headline: Irish press regulation model may be Leveson's first port of call",
 '3 | headline: Denmark records first case of bird flu',
 "2 | headline: 'Even unwashed and medicated up to my eyes; Martin makes me feel beautiful'",
 '6 | headline: Gilzean makes decisive move',
 '0 | headline: Rabodirect and KBC Bank to cut deposit rates further',
 '3 | headline: Teacher unions under pressure within schools to call off strike',
 '3 | headline: FF transport plan includes regional Luas lines and bus-trams',
 '4 | headline: CHINA AND TAIWAN',
 '1 | headline: Eight soloists of the future acquit themselves well',
 '0 | headline: IL&P to get €2.7 billion injection',
 '3 | headline: Fire safety works yet to be carried out on 19 buildings at risk',
 '6 | headline: Torres finally basking in success',
 "2 | headline: Russborough's secret garden",
 '6 | headline: UUJ concede McKenna Cup clash against Cavan',
 '3 | headline: Woman loses case after claim Lidl cashier called her a liar',
 '2 | headline: Travel Gear: Multi-pocket weekender',
 '6 | headline: Todt and Ecclestone reject plea to cancel Bahrain Grand Prix',
 '2 | headline: Planning',
 "6 | headline: New grounds for optimism for GAA's future in Cork",
 "3 | headline: Brothers awarded their foster parents' farm",
 '3 | headline: Turbulence on the teachers front',
 "6 | headline: Last year's defeat to whip up the champions",
 '3 | headline: New EU energy plan focuses on more connections between States; renewables and tougher negotiations with suppliers',
 '3 | headline: Food poverty hindering literacy',
 '4 | headline: The Northern Iron',
 '1 | headline: Picture of elegance',
 '3 | headline: The Memory of Birds in Time of Revolution; Breyten Breytenbach; Faber; £9.99',
 '3 | headline: DUP calls for the arrest of leading Sinn Fein figures',
 '3 | headline: Voyage to the bottom of the sea',
 '1 | headline: Album review: Noel Langley  Edentide',
 '0 | headline: Bonderman and GPA are old pals',
 "6 | headline: Mize's memorable major win",
 '3 | headline: Spanish suspect sharp practice in $500m ocean trove that ended up in Florida',
 '3 | headline: So much work and such long hours - but I love it',
 '6 | headline: Title race goes to the wire',
 "1 | headline: 'Our first mistake was to trust them . . .We had no idea'",
 '6 | headline: Celtic four adrift after Hearts defeat',
 '6 | headline: Jermyn try is the difference for Munster',
 '3 | headline: Minister expects borrowing to increase',
 '2 | headline: Spring clean on North Circular',
 '4 | headline: Opening shots of the Civil War',
 '1 | headline: Into the groove of a rhythm king',
 "3 | headline: McGinley had 'no input' into letter",
 '3 | headline: Constitution should protect rights of children; report says',
 '3 | headline: Lab technician burned by acid',
 '3 | headline: BOE votes 7-2 for steady rates in March',
 '3 | headline: European banks to get unlimited dollar liquidity',
 "6 | headline: Drogheda fail in O'Brien appeal",
 '2 | headline: Peach and brown butter tart',
 '3 | headline: Strike grips Belgium as EU leaders meet',
 '6 | headline: Europe rescue bleak position',
 '0 | headline: Starbucks paid no tax in UK',
 '3 | headline: Iran rejects UN-drafted nuclear plan',
 '3 | headline: Shopkeeper ready to make another stand over Castlebar RTC',
 '0 | headline: Tech stocks break all the rules',
 '4 | headline: Arts funding',
 '6 | headline: We must go for jugular and replicate Paris',
 '2 | headline: New at the show: AUDI A4',
 '0 | headline: Key prices up; despite fall in inflation',
 '3 | headline: Bruton praises role of King Hussein in defusing political crisis over Hebron',
 '0 | headline: Salvation at hand for take-away fiends',
 '3 | headline: Reading the media',
 '3 | headline: Paris suspect had papers on German nuclear research centre',
 '3 | headline: Hamilton passes the buck',
 '3 | headline: Gardaí investigate serious assault on soldier in Youghal',
 '3 | headline: Long distance lines',
 '6 | headline: Leinster remain on track',
 '3 | headline: French unions strike over pensions',
 '6 | headline: Messi bags a brace as 10-man Valencia make Barca sweat',
 '6 | headline: Giving Celtic back to the supporters',
 '3 | headline: At least 11 illegal immigrants drown off Italy',
 '3 | headline: 53 people suggested by Dublin have North public posts',
 '4 | headline: Will Tubridy inject Botox into old dame of Montrose?',
 '1 | headline: Canny Boy',
 '1 | headline: Fear; Bean nó Idir Eatarthu',
 '2 | headline: Moore Street retail property makes £370;000',
 '3 | headline: Israeli-Arab teenagers arrested over bombing',
 '3 | headline: Walsh guides Chelsea home',
 '3 | headline: 1690 bomb found in river',
 "3 | headline: Leixlip shooting: 'It was only when you see the Garda cars coming that you realised what happened'",
 '3 | headline: Olmert offers talks if soldier is released',
 '3 | headline: Funeral takes place of pensioner who was beaten to death',
 '2 | headline: A tale of tent cities',
 '6 | headline: Rowing Ireland announce new Coastal Championships',
 '3 | headline: First results of university Seanad election count expected today',
 '0 | headline: Insurance increases force firms to ditch cover or go it alone',
 '0 | headline: John Monks',
 "3 | headline: Aid workers seized in Kenya 'freed'",
 '3 | headline: EU leaders to push for global fiscal regulation',
 '6 | headline: Graeme McDowell says mentally he needs another long break',
 "4 | headline: Fintan O'Toole: Women die while outrage after outrage fails to shift attitudes",
 '0 | headline: Musgrave gets the scent for Java Republic coffee company',
 '3 | headline: #120;000 cash recovered in Cork and Kerry',
 '3 | headline: Too few night staff at care home with flu deaths; says Hiqa',
 '0 | headline: ACC secures judgments for €2.3m and €2.55m',
 '3 | headline: The Copycats',
 '3 | headline: Funeral tributes for Bishop Thomas Flynn',
 "3 | headline: Development plan calls for less 'city-led' approach",
 '3 | headline: Wordsworth was a spy for British; professor claims',
 '3 | headline: No respite for troubled Foxconn after fresh suicide bid',
 '3 | headline: Guanabara raises EcoSecurities bid',
 '3 | headline: Some thoughts on judgment writing',
 '3 | headline: Man charged over west Dublin shooting which left baby wounded',
 '3 | headline: Expert says retired garda typed documents alleging corruption',
 '1 | headline: A pump-action blockbuster only the stage could allow',
 "6 | headline: Proven Darren Clarke the perfect fit for Ryder Cup captain's role",
 '3 | headline: Revenue seizes 10;000 contraband cigarettes at Dublin Airport',
 '3 | headline: Role of cardiac death donors may reduce kidney wait list',
 '1 | headline: Heritage hot spots History; nature; art; environment',
 '3 | headline: Snoop Dogg to play Glastonbury',
 '3 | headline: County council inquiry details not to be disclosed',
 '6 | headline: Pride the watchword as players look ahead',
 '6 | headline: Scotland and Wales name their Six Nations squads',
 '3 | headline: Injured climber rescued after mountain accident',
 "6 | headline: It's up to you New York; New York - isn't it?",
 '2 | headline: One of the last gentlemen press photographers in Ireland',
 '6 | headline: Report calls for salary cap',
 '2 | headline: Croí highlights pulse and stroke link',
 "6 | headline: Michael Watt bows out as one of Ireland's most successful hockey players",
 "0 | headline: Patrick's Day blitz on shopping channel",
 '0 | headline: Easyjet founder plans to list hotel chain on stock market',
 "3 | headline: SF will do 'everything' for peace - McLaughlin",
 '6 | headline: Early gains propel Nemo',
 '0 | headline: German business sentiment climbs to its highest point in 17 months',
 '2 | headline: Spacious on the inside in Glasthule for €345;000',
 '0 | headline: ESB not ruling out closing two peat-burning plants',
 '1 | headline: British soldier scandalised by 1918 Fermoy',
 '3 | headline: Man held over Bangor machete murder',
 '3 | headline: Opposition wary of geeks bearing gifts',
 '3 | headline: Musharraf set for victory in Pakistan referendum',
 '6 | headline: Tour veteran to lead German team in Rás',
 '6 | headline: McKenzie answers the call for Harlequins',
 '1 | headline: The chasm between Graham Norton and the Late Late Show',
 '4 | headline: Dynamite divorce Bill scares politicians',
 "3 | headline: US intelligence chief James Clapper resigns after Trump's election",
 '3 | headline: Medal Winners',
 '3 | headline: Man to appear in court over double stabbing incident',
 '3 | headline: Avoca River pledge',
 '1 | headline: OFF HIS ROCKER',
 "0 | headline: Poland 'facing labour shortage' for infrastructure development",
 '3 | headline: Workers threaten strike over CIE break-up',
 "6 | headline: Ulster's cup double",
 "0 | headline: 'High level of concern' amongst Republicans about proposed steel tariffs",
 '3 | headline: Financial union warns of job cuts',
 '4 | headline: No thank you for the music',
 '4 | headline: Christianity and Islam',
 '4 | headline: Rugby World Cup defeat',
 "6 | headline: 'We've been beating ourselves'",
 '4 | headline: Crime And Punishment',
 '3 | headline: Family secrets uncovered',
 '4 | headline: Irish citizenship law',
 '3 | headline: Unionists return to Stormont to protest abortion law changes',
 '3 | headline: Armagh to play Louth in GOAL match',
 '0 | headline: Brent crude slips below $111',
 '0 | headline: Thousands of Dunnes Stores staff go on strike',
 '3 | headline: Up to 60;000 keep it country for 25th anniversary of Tullamore Show',
 '3 | headline: Former leading judge dies',
 '3 | headline: Vodafone to end England cricket deal',
 '3 | headline: Man with alleged links to terrorism loses deportation case',
 '5 | headline: Border - official trailer',
 '3 | headline: Gillane is bound to keep the peace for attack on Garda car',
 '4 | headline: Magdalen graveyard',
 '6 | headline: Arsenal crazy to appoint me; says Wenger',
 '6 | headline: Death Duty steps up to the highest level at Naas',
 '3 | headline: Southerners join the £40m gold rush as UK lottery fever hots up',
 '3 | headline: Two men and a woman arrested after drugs worth €1.6m seized',
 '6 | headline: Landis digs in for long battle',
 '0 | headline: New look Swan Centre in Rathmines expands its retail offering',
 '6 | headline: Muller has chance to survey options',
 "4 | headline: Where is Ireland's Ancient East?",
 '4 | headline: A time to defend the reading of Ecclesiastes at funerals',
 "3 | headline: It's nothing personal . . .",
 '3 | headline: Aer Lingus passengers face delays',
 '3 | headline: Ward claims junior title in Armenia',
 '0 | headline: Mixed-use investment in Sandymount',
 '3 | headline: Man in court over Dublin hatchet attack',
 '3 | headline: Rural water dispute leaves a bitter taste',
 '3 | headline: Budget Travel: the work; rest and play tourists',
 "3 | headline: 'The end of the story of my daughter; my wife': the victims of the Sri Lanka attacks",
 "3 | headline: O'Callaghan may have to testify in ex IRA man's case",
 "0 | headline: Mortgage arrears deterioration 'damning indictment' of banks and regulator; conference told",
 '3 | headline: THORP drops air emissions rise plan',
 '3 | headline: Taking the high road out of Mexico',
 '3 | headline: Rugby player acquitted',
 '6 | headline: An Post Rás: Italian team bounces back after expulsion',
 "3 | headline: Syria 'grants uprising amnesty'",
 '4 | headline: Nuclear reductions',
 '3 | headline: National broadcaster pays tribute to Alan McQuillan',
 '3 | headline: Five charged with sexual assault on girl',
 '6 | headline: Newslines: McIlroy calls up Griffin',
 '3 | headline: US strike in Pakistan kills up to 20',
 '4 | headline: Time to buy Irish?',
 '0 | headline: Three bank investments to yield over 8%',
 '3 | headline: The struggle to rescue Islam from its ardent zealots',
 '6 | headline: Parting of the ways proved inevitable Newcastle manager',
 '3 | headline: Cubans vindicated by US policy change; says Gerry Adams',
 '0 | headline: AIB to reveal details of next phase of restructuring today',
 "6 | headline: Finn Lynch's Rio hopes may be hampered by fiscal restraints",
 '6 | headline: Adebayor turns the game for Arsenal',
 '1 | headline: Festival Fit: follow the laughter lines to Corofin and Tedfest',
 '3 | headline: Attempt to amend equality Bill fails',
 '0 | headline: Telecoms and banks send FTSE 100 down',
 '3 | headline: Two die in Clare; Tyrone collisions',
 '3 | headline: Government fears legal challenges after repeal of Eighth Amendment',
 '4 | headline: Shearing of hedges',
 '0 | headline: Xelector sheds more jobs but still confident',
 '4 | headline: The dangers of Brexit',
 '6 | headline: Caldwell keeps Lawrie in his sights',
 '0 | headline: Company announces plans for secure Net payment system',
 '2 | headline: Widows of war',
 '3 | headline: Driver killed as his truck leaves road in Co Offaly',
 '3 | headline: Hauliers to meet Minister as motorists face fuel price hike',
 '3 | headline: Subpoena of US ambassador to EU focus of Democrat efforts',
 '0 | headline: Credit growth slows marginally',
 '6 | headline: Hard-working Copenhagen thwart Barcelona',
 '3 | headline: Woman arrested over drug seizure',
 "3 | headline: Legionnaires' disease: what causes it",
 '3 | headline: Cannabis worth €200;000 seized',
 '3 | headline: Tourists fall victim to crime almost every day',
 '0 | headline: A checklist will save you from getting ticked off on holiday',
 '3 | headline: £13.30 stolen from phone; court told',
 '6 | headline: Looking South in Straffan',
 '6 | headline: Gambling Girl capable of big run in €70;000 feature',
 '3 | headline: Hillsborough relatives end case',
 '6 | headline: England look to be on the fast track',
 '6 | headline: FAI appointee Noel Mooney denies role in pivotal Hall report',
 '0 | headline: Exchequer surplus to approach €500m',
 "6 | headline: High times for O'Brien as Chaparral edges it",
 "3 | headline: Italy's centre-left closes gap as new leader shows his mettle",
 '3 | headline: Fire crews winning battle to quench oil blaze',
 '3 | headline: Prince William and his fiancee name the day for a spring wedding',
 "3 | headline: Garda reform to focus on 'a few key areas'",
 '3 | headline: English soccer fan faces trial',
 '0 | headline: C&C proves an exception during quiet session',
 '3 | headline: UN condemns Bahrain verdicts',
 '2 | headline: Best poetry around',
 '3 | headline: Madrid; Rabat in brief talks on tense relations',
 '3 | headline: Humanitarian crisis looms as first snow falls',
 '3 | headline: Amazon unveils new Kindle',
 '6 | headline: Senna losing patience with United',
 "3 | headline: 'Smart' cards may be used to prevent electoral fraud",
 '3 | headline: Edwards says he would consider offer from Obama',
 '0 | headline: Alphyra merger talks with ATM firm continue',
 '6 | headline: Wachman holds off on Again decision',
 "3 | headline: Why did Google bet $3.2bn on the 'internet of things'?",
 '6 | headline: England opt for inexperience to face Wales',
 "0 | headline: RBS 'rights issue' suit planned",
 '1 | headline: Costume Drama',
 '3 | headline: Domestic growth accelerates in Q3',
 '0 | headline: Merkel and Sarkozy agree to move on rate of corporate tax',
 '0 | headline: More tech sector profit warnings',
 '3 | headline: Second resignation over Trident',
 '6 | headline: German stations drop coverage',
 '3 | headline: More than style on parade as judged by some tetchy repartee',
 '6 | headline: Republic in second group of seeds',
 '3 | headline: Pratt appointed chairman of Bank of Scotland Ireland',
 '3 | headline: Noisy organ-player told to pipe down',
 '3 | headline: Gilmore defends nurse jobs scheme',
 '6 | headline: Pioneer plots for Croke Park',
 '3 | headline: Dublin charities spearhead drive for more volunteers',
 "6 | headline: Justin Rose aiming to emulate Curtis Strange's back-to-back US Open success",
 '3 | headline: FG assistant press officer',
 '6 | headline: Hamilton names squad',
 '3 | headline: Limited training fuelling jobs crisis; says Shortall',
 '0 | headline: Outlook grim but a cut in stamp duty will help',
 '6 | headline: Hasselbaink brace seals it for Boro',
 '3 | headline: Ambulance drivers hurt in Dublin assault',
 '6 | headline: Even gods have their dark days',
 '3 | headline: Mother of all sport horses',
 '3 | headline: Mild but breezy conditions forecast for most parades',
 '3 | headline: German woman (40) accused of killing nine of her babies',
 "1 | headline: My friend said: 'Heroin will get rid of the pain.' And it did",
 '0 | headline: Cliff Taylor: Government will be lucky to pass one Budget - never mind five',
 '6 | headline: Mark English eases heat at European Indoors',
 '3 | headline: FF and PD backers hoard land; says leader of Greens',
 "3 | headline: Single mothers 'most socially isolated'",
 '3 | headline: The wandering womb',
 '0 | headline: CRH part-owned firm in Polish lime plant deal',
 '3 | headline: German parliament elects Merkel to fourth term as chancellor',
 '3 | headline: Call for Galway bridge to go ahead',
 '2 | headline: These glorious autumn days are perfect for running',
 '3 | headline: Peace deal opponents predict most MPs will desert Trimble',
 '0 | headline: Quinn denies knowledge of steps taken to move assets',
 "3 | headline: Some representatives' activities have tainted politics; says O'Donoghue",
 '6 | headline: Defending champion Pat Murray bows out of South of Ireland championship',
 '3 | headline: Victims haunted by childhood experience',
 '2 | headline: Extension to Pearse Street hotel appealed',
 '4 | headline: Standing up for geekiness',
 '3 | headline: Ibrahim Halawa: Kenny says will raise case again with al-Sisi',
 '3 | headline: Deal agreed on pay restoration for health and social services staff',
 '6 | headline: Queeney shines in Donnycarney',
 '6 | headline: Dempsey holds all the aces at Kirkistown',
 "3 | headline: Harris criticises 'over-hyped' criticism of Varadkar wind farm call",
 '0 | headline: Hanging up: How I consciously uncoupled from my smartphone',
 '3 | headline: Basque group wins EU rights prize',
 "6 | headline: Bad boys; bad boys: Citings disrupt England's Test plans",
 '6 | headline: Kilrush keeps on growing',
 '3 | headline: Major Irish art auction goes on public view',
 "3 | headline: EU's economic outlook not bright; says Van Rompuy",
 '0 | headline: Number on Live Register hits 8-year low as labour market improves',
 '4 | headline: The life-support case and the Redmond case show the need for fresh legal thinking',
 '3 | headline: Polls show drop in Peres lead',
 '3 | headline: Hollywood actors look close to reaching deal',
 '3 | headline: Public service pay cuts yield €1.4bn annually in savings; Dáil told',
 "3 | headline: Beating left victim 'like jelly'; court told",
 '1 | headline: Forthcoming Fair',
 '3 | headline: EU extends Russian sanctions by six months; overcoming Greek concerns',
 '0 | headline: Some cryptic notations on employee evaluations',
 '3 | headline: Penalties for 57;000 but no driver yet disqualified',
 "3 | headline: Central England hit with month's rainfall in 24 hours",
 "1 | headline: Kylie Jenner to be youngest 'self-made billionaire'",
 '6 | headline: UCD curse their luck as chances slip by',
 '3 | headline: Call for checks on motorcycles',
 "4 | headline: Japan's avoidable accidents make folly of nuclear energy clear",
 "2 | headline: Hollywood's JFK",
 '3 | headline: HSE apologises to abuse victims',
 '3 | headline: Aid agencies call for solution to asylum ship crisis',
 '1 | headline: TV preview: Six shows to watch on television this week',
 '6 | headline: Championship form favours Cork but rivals Waterford not short of motivation',
 "6 | headline: Ronaldo's brace sparks United",
 '3 | headline: Sun brings crowds to Virginia Show',
 '3 | headline: Iraq claims women and children die in US air strike',
 '1 | headline: Gate Theatre needs to take risks  and so does its audience',
 "3 | headline: People who make themselves homeless 'are exceptional cases' - Taoiseach",
 "1 | headline: Initiative on 'affordable housing' could face problems",
 '4 | headline: Problems with the property tax',
 "6 | headline: Daithí Burke's goal seals fourth straight final for Corofin",
 '3 | headline: Sinn Fein to mark hunger striker anniversary',
 '6 | headline: Munster claim title',
 '3 | headline: Watford leave it late but bypass Burnley',
 '3 | headline: Man dies in fire at Fairview flat',
 '0 | headline: In praise of the old reliable bicycle',
 '3 | headline: The Battle; by Richard Overy (Penguin; £5.99 in UK)',
 '6 | headline: Marnitz Boshoff included in Connacht squad for Cardiff Blues',
 '4 | headline: Suspicion Apostolic visitation report will ignore deep problems',
 '0 | headline: Banking inquiry analysis: Political enthusiasm obscured view of flaws',
 '3 | headline: Varadkar looks to steady the ship',
 '2 | headline: Six new from old thatched house',
 '0 | headline: US health firm to create 20 jobs in Falls Road',
 '3 | headline: EU; Balkan states move to stem flow of fighters joining jihad',
 '0 | headline: More than €500;000 key money for shop on Henry Street',
 "6 | headline: Irish rugby's new deal",
 '3 | headline: Teenager drowns in NI reservoir',
 '3 | headline: Aer Lingus pilots expected to endorse deal brokered by LRC',
 "3 | headline: Rice visit to Libya repays Gadafy's anti-extremism",
 '4 | headline: Labelling Sinn Féin',
 '6 | headline: Digpast to win again for Jones',
 '6 | headline: Joe Brolly was like Marmite but be careful what you wish for',
 '3 | headline: Church has talked too much of rules - prelate',
 '6 | headline: Verdict very much in the balance',
 '3 | headline: Soldiers; garda claim on alleged stress injury',
 '0 | headline: Deutsche seals deal for €300m Project Lee portfolio from Nama',
 '3 | headline: Mother and son convicted of attack on woman',
 "3 | headline: Mary Lou sets out her SF agenda: 'Opportunities for all; not just the few'",
 "3 | headline: Tributes paid to Ó Sé's 'great contribution'",
 '6 | headline: Jason Ryan optimistic as Kildare injury worries ease',
 '3 | headline: Orange Hail arson attack investigated',
 '4 | headline: Erskine B. Childers',
 '3 | headline: Government on road to taxi deregulation',
 '3 | headline: Four projects to get €70;000 for urban renewal',
 "3 | headline: Curtin was examined by 'repugnant' procedures",
 '6 | headline: Six Nations line-ups for Week 3',
 '6 | headline: Strange mix of foreign invader',
 "4 | headline: Let's not teach children to flinch and to fear",
 '3 | headline: Postal staff in NI consider strike after death threats',
 '6 | headline: Arsenal hopes fade in dirty dozen minutes',
 '3 | headline: Fears UK hosepipe ban to be extended',
 '4 | headline: A loophole in household charge?',
 '3 | headline: Indonesian soldiers arrested in connection with UN deaths',
 '3 | headline: Israeli woman stabbed to death in West Bank attack',
 "3 | headline: Tusla: Child benefit link to school attendance 'not an effective tool'",
 "0 | headline: Siptu's accounts ignore standard",
 '3 | headline: Police and firefighters attacked in Ballymena',
 '3 | headline: Tax defaulters pay Revenue €157 million',
 '0 | headline: Irish start-up HeyStaks gets €1.5m Digicel investment',
 '6 | headline: Luis Suarez leaves no gnawing doubts as to his intentions',
 "0 | headline: Renewable energy commitments 'could cost extra €200m'",
 '3 | headline: Bail for chicken thief sought by Romania',
 "3 | headline: Inquest into young jockey's death adjourned as key witness absent",
 '3 | headline: Trimble; Mallon accuse each other of blocking deal',
 '3 | headline: Cork teenagers win Young Scientist award',
 '0 | headline: Over 900 jobs recorded in Irish spin-out tech firms last year',
 '2 | headline: 10 things you should know about the Basques',
 '2 | headline: Ed Sheeran wows intimate crowd at London Irish Centre',
 "6 | headline: Gerry Thornley: Let's hear it for the Pro14 revival",
 '0 | headline: UK building society seeks windfall claimants',
 '3 | headline: Government urged to open up energy market',
 '6 | headline: Tour de France: Dan Martin fighting fit as he sets his sights high',
 '3 | headline: Holles Street welcomes first baby of 2014',
 '3 | headline: School given more time to consider expulsions over cannabis smoking',
 "6 | headline: Klopp: 'I see you are feeling sorry for us but we are fine'",
 '3 | headline: Photographic negatives',
 "3 | headline: Collectors set to flock to Ireland's first ever rock and pop memorabilia auction",
 '3 | headline: Relatives of MH370 passengers protest in Malaysia',
 '0 | headline: Eircom met Government on broadband roll-out',
 '6 | headline: Below-par Ireland not good enough',
 '6 | headline: Rooney makes second Everton debut in unconvincing win',
 '3 | headline: Gardaí arrest 35 in operation targeting transient criminals',
 '4 | headline: Regulation of Dáil Éireann bar',
 '0 | headline: Peace in sight between feuding REO investors',
 '3 | headline: Men charged over Belfast protest',
 '6 | headline: United need win for peace of mind',
 '4 | headline: Coming to terms with Budget 2018',
 '0 | headline: Three firms sign up to offer 3G services',
 '3 | headline: Higgins and union official in row over website',
 '1 | headline: Bua an Phiarsaigh',
 '3 | headline: Netanyahu sees EU economic role in Middle East',
 '2 | headline: New Japanese study links slow eating to losing weight',
 '2 | headline: Unassuming Sandycove mews has wow factor for €1.275m',
 '0 | headline: Company offers lump sum to over 70s for share in homes',
 '3 | headline: Helpline for men who are abused',
 '3 | headline: 41% of architects set to lose their jobs - report',
 '0 | headline: Eircom lost 20;000 fixed line customers to rivals - ComReg',
 "4 | headline: Why Ireland's not working",
 '6 | headline: How James Tarkowski became a passing fancy for Gareth Southgate',
 '4 | headline: Trees felled in Dun Laoghaire',
 '6 | headline: Champions play Rest of Ireland',
 '6 | headline: Heavyweights ease into cup semi-finals',
 '3 | headline: Queen of comedy',
 '3 | headline: Russian opposition leader Boris Nemtsov shot dead in Moscow',
 '3 | headline: Merkel and Orban call for unity at border where Iron Curtain cracked',
 '3 | headline: Schools say changes must be voluntary',
 '2 | headline: Strong interest reported in planned Cork centre',
 '6 | headline: Leinster Lightning regain Interprovincial Twenty20 Cup despite defeat',
 '6 | headline: Prize for buoyant Banner remains the same  only the backdrop changes',
 '4 | headline: Zimbabwe and its neighbours',
 '3 | headline: Vaccine only answer to AIDS',
 '3 | headline: Daunted by the search for love in a bygone era',
 '3 | headline: Fruit of the Loom staff hold one-day strike',
 '6 | headline: Cork to name new manager next week as JBM resigns',
 '1 | headline: Metá Metá - MM3 review: an intelligently edgy trio who are dancing past the genre trap',
 '2 | headline: Rathgar Victorian with impeccable French polish for €3.25m',
 '3 | headline: Female pedestrian killed on Cork road',
 '0 | headline: RSA to integrate as all-island entity',
 '3 | headline: Businesses oppose Dairygold move',
 '2 | headline: £151;000 houses have private access to beach',
 '4 | headline: To the waters and the wild',
 "0 | headline: Office space in Cork's south docklands to rent at just €20 per sq ft",
 '3 | headline: The other key names',
 '4 | headline: Salaries for parenting',
 '3 | headline: Two Irish writers longlisted for Impac prize',
 '1 | headline: Footlights',
 '3 | headline: Garda criticised over lack of action on tackling hate crimes',
 "3 | headline: Lawyers' group criticises referendum process",
 '3 | headline: Blue pools where mermaids play',
 "3 | headline: Foreign pathologist's work under scrutiny",
 '4 | headline: Beggars back on the streets',
 '0 | headline: John FitzGerald: Migration is still central to the Irish experience',
 '4 | headline: The new pension framework',
 '6 | headline: Kilkenny now just one win away',
 '3 | headline: Taking care closer to home',
 '2 | headline: Cool Finnish design full of northern light',
 '3 | headline: Toxic incinerator plan generates controversy',
 '3 | headline: Three Science Week events worth seeing on Monday',
 '6 | headline: Smyth makes himself at home',
 '3 | headline: Baby in right-to-life case dies in Britain',
 "3 | headline: To confess is 'above; beyond all else'",
 '6 | headline: Lara again anchor in dramatic win',
 '3 | headline: Police investigate suspicious death in Belfast',
 '3 | headline: New bill will allow harvesting of personal data for elections; experts say',
 '6 | headline: Campese centre stage again',
 "3 | headline: Boris Johnson rules out electoral pact with Farage's Brexit Party",
 '3 | headline: US troops kill 50 insurgents in Iraq raids',
 "6 | headline: D'Arcy doubt for Tests",
 '6 | headline: Rafael Benítez open to job offers after frustrating summer',
 '0 | headline: Wall St surrenders early gain',
 "2 | headline: I didn't realise that the Lone Ranger was an actor",
 '0 | headline: Consumers splash out on Easter eggs',
 '1 | headline: Writing the book on an epic battle',
 '3 | headline: Man exposed himself to girls at GAA club',
 '3 | headline: Living standards',
 '3 | headline: Six arrests follow raids on drug gangs',
 '3 | headline: Man guilty of kidnap remanded',
 '3 | headline: Concern as breast cancer tests reassessed in North',
 "3 | headline: Women's life spans above EU average",
 '2 | headline: Good food; good service are secret of staying power (Part 3)',
 '3 | headline: Doctors seek supermarket alcohol ban',
 "3 | headline: Varadkar and Johnson 'planning to meet'; says Minister",
 '0 | headline: Seen or heard',
 '6 | headline: Loughnane cuts team',
 '4 | headline: IMPLICATION',
 '3 | headline: Iraq draft constitution to be sent to UN',
 '2 | headline: Chinese in Ireland most active property buyers',
 '4 | headline: Abortion and the law',
 "6 | headline: Former Leinster centre Ben Te'o joins Japan's Sunwolves",
 '2 | headline: Fancy foot work',
 "3 | headline: Travels in the White Man's Grave; by Donald MacIntosh. (Abacus; £9.99 in UK)",
 "3 | headline: Bishops reaffirm 'wholehearted support' for child protection watchdog; 'financial and otherwise'",
 '4 | headline: Cystic fibrosis unit funding',
 "4 | headline: Republic of the rich and mean turns its back on world's poor",
 '1 | headline: Review: The Nose',
 '3 | headline: President escapes injury as ceiling collapses',
 '3 | headline: Need a passport in a hurry? Conor Pope has all the answers',
 '3 | headline: A lost generation of Irish manhood',
 '2 | headline: Donal Skehan: Spiced Mussels with Gubbeen Chorizo and Irish Cider',
 "0 | headline: Cantillon: Blow for Denis O'Brien's ad-blocking campaign",
 '6 | headline: National Indoor Arena as far away as Morocco',
 '3 | headline: Two US congresswomen denied entry to Israel after Trump plea',
 '4 | headline: Soup and tills',
 "1 | headline: FitzGerald's political strife and family life",
 '3 | headline: Chinese journalist could be executed if found guilty',
 '3 | headline: Heritage hot spots History; nature; art; environment',
 '3 | headline: Burma named as Asean chair',
 "3 | headline: Tánaiste calls TD Pádraig Mac Lochlainn a 'barroom brawler'",
 '0 | headline: Accountancy firms merge practices',
 '2 | headline: 32: Audi Q8  Mean; menacing and oh-so-good',
 "0 | headline: Ireland 'compliant' with bailout",
 "1 | headline: Hennessy New Irish Writing: February 2019's winning poems",
 '3 | headline: Man charged with larceny',
 '3 | headline: Family planning morality defended',
 '4 | headline: Disturbing study on sexual slavery exposes barbarity at heart of globalisation',
 '0 | headline: Leeside high-flier',
 '3 | headline: Seanad abolition savings cannot be established; says commission',
 '0 | headline: NYSE closed until tomorrow; at least',
 '4 | headline: Common cents?',
 '3 | headline: Israel to return Gaza flotilla ship',
 '3 | headline: Tax break for private clinics',
 '1 | headline: Do we really need strict rules on busking?',
 '3 | headline: Business anger at Luas works',
 '6 | headline: Just like home for Sussex at Ormeau',
 '3 | headline: Fianna Fáil to avoid negative campaigning; says Martin',
 '3 | headline: Ethiopia suspend Bekele over training camps',
 '1 | headline: Songs that sing against censorship',
 '6 | headline: Relaxed Henshaw very much at home at the Sportsground',
 "6 | headline: D'Arcy ready for challenges of 17th season with Leinster",
 '3 | headline: Hopes fade in Philippines after deadly mudslide',
 '6 | headline: Accordion Etoile looks the pick',
 "3 | headline: Saudis fear 'Arab-Afghan' prisoners will be massacred",
 '3 | headline: Labour Court awards teachers €40;000',
 '3 | headline: Greencore to see Government documents on sugar aid',
 '6 | headline: Errani shocks Stosur to reach final',
 '0 | headline: PolarLake reveals new products',
 '6 | headline: Monster putt gives Power cup',
 '3 | headline: Couple mentally scarred for life by attack',
 '3 | headline: Hurricane heading for east landfall',
 '4 | headline: Following an adult agenda',
 "3 | headline: Thousands protest against Algeria's president for fifth day running",
 '3 | headline: Tax relief for schools',
 '3 | headline: Abu Ghraib whistleblower soldier gets award',
 '3 | headline: Number of Polish weekend schools doubles to 24 over past three years',
 '3 | headline: Debate rages in Mexico over proposals to change abortion laws',
 '6 | headline: Ulster backline expected to shine as Pro12 kicks off',
 '0 | headline: Facebook co-founder says company should be split in three',
 '4 | headline: Life is even more precious because we are on our own',
 '6 | headline: IRFU warn of banned substances potentially lurking in some supplements',
 '3 | headline: Belfast man in critical condition after attack',
 '2 | headline: River cottage flows beautifully',
 '0 | headline: Dow movers and shakers brighten report season',
 '3 | headline: Gadafy loyalists repel attacks',
 "0 | headline: Fyffes's chief in US to petition over merger",
 '3 | headline: Woman killed in Co Waterford collision',
 '6 | headline: Winning return for Ahern',
 '3 | headline: Court jails man who threw petrol bombs in parade riot',
 '3 | headline: Kim appears for supreme leader vote',
 "0 | headline: Cost of crane drivers' pay dispute could soon top €1.5m a week",
 '3 | headline: Mother jailed after her son (8) missed 230 days of school',
 '4 | headline: The Dostoevsky Question',
 '3 | headline: Young women more likely to have degrees than male peers',
 '6 | headline: Bowlers leave Pakistan on edge of victory',
 "3 | headline: Garda boss undertakes not to access information on newspaper editor's phone",
 '0 | headline: Euro falls to lowest level since 2010',
 '0 | headline: Candy Crush maker raises $500m in IPO',
 '3 | headline: Dublin to Cork motorway target to be missed',
 '3 | headline: Digital dentistry: getting your teeth into video games',
 '3 | headline: Three defeated candidates pledge support for leader',
 '6 | headline: Henman exerts peer pressure',
 '3 | headline: German serial killer nurse faces third trial over 106 deaths',
 '3 | headline: It helps on the farm if you really love cows',
 '3 | headline: Lenihan rules out Vat reduction',
 '0 | headline: Trustee wants money back from fraudsters',
 '0 | headline: Examiner appointed to sandwich bar chain',
 '3 | headline: Algerian with knife remanded',
 '3 | headline: Irish Film Board appoints Loughran to run new US office',
 '3 | headline: Poetry world mourns death of Donaghy',
 '2 | headline: Peas and broad beans; like green summer pearls',
 '3 | headline: 10 killed in Algeria',
 '3 | headline: Police colluded with UVF; report confirms',
 "2 | headline: Weight-loss: 'I gained four pounds. My fear of failure returned'",
 "3 | headline: Trump has 'no idea' if deal can be made on border wall funding",
 '6 | headline: Envoy says South Africa is ready',
 '4 | headline: Feed the seals; face a €5;000 fine',
 "6 | headline: Elwood leaps to Connacht's defence",
 '3 | headline: Lawsuit threatened to close ruling AK Party in Turkey',
 '3 | headline: Judgment reserved in case where architect said he was bullied from job',
 '6 | headline: Jerome keeps run going',
 '6 | headline: FIA decision expected today',
 "3 | headline: 'He never left me alone': Woman recalls abuse as uncle jailed for rape",
 "3 | headline: Jury's manslaughter verdict quashed after it ignored insanity evidence",
 '3 | headline: Heaven can wait but Valhalla here to stay',
 "4 | headline: West's period of mastery may be on the wane",
 '0 | headline: Journal Media records €846;000 loss for 2014',
 '4 | headline: Fossil fuel divestment Bill',
 '4 | headline: Eastern Europeans  forgotten minorities',
 '3 | headline: Self-rule to form key plank of SNP election campaign',
 '3 | headline: Berlusconi facing tax threat',
 '0 | headline: Caravan cover costs are no picnic',
 '3 | headline: Lough Derg anglers call off events',
 '3 | headline: Gardaí treat Cork death as murder',
 '3 | headline: Preparation of master plan for Dublin Bay',
 "6 | headline: Drogba's departure eclipses routine win for league champions",
 '0 | headline: New institute aims to boost digital learning',
 '3 | headline: New talks rejected until Israeli settlements suspended',
 "3 | headline: PSNI launch new bid to trace baby's mother",
 '3 | headline: $1m bribe paid for CRH; Polish inquiry told',
 "0 | headline: Fishers' share capital",
 '6 | headline: Spain a real test for Irish',
 '6 | headline: Perpignan pay heavy penalty',
 '6 | headline: Kildare finish the stronger',
 '3 | headline: Journalism Awards: The winners',
 '3 | headline: Bread prices set to increase',
 "0 | headline: 'There remains a significant volume of assets still to be brought to the market from banks/NAMA deleveraging'",
 '4 | headline: A Cardinal Resigns',
 '1 | headline: Does life imitate Grand Theft Auto?',
 '2 | headline: GIVING UP',
 '3 | headline: Consumer interest in venison falls dramatically',
 '2 | headline: Health tip of the day: Lay off the guilt',
 "3 | headline: Farming 'losing out in boom'",
 "3 | headline: Council 'expressed concern' over number of Garth Brooks concerts",
 '3 | headline: Violent outburst as man is cleared of car deaths',
 '0 | headline: Getting inside the minds of top business leaders',
 "0 | headline: Pretax profit of €170m at world's largest online bike shop",
 '3 | headline: Trichet hints at 0.5% ECB rate cut next month',
 '6 | headline: Bolger and Manning look to end year on a high note',
 '6 | headline: Makeshift Ireland force a draw',
 '2 | headline: Period property with potential in Glasnevin for €400;000',
 '0 | headline: Tyrone takes the call of Americans in distress',
 '3 | headline: Military funeral for soldier in Kerry',
 '0 | headline: Danes on hunt for prime Dublin site',
 '3 | headline: Man jailed for 10 years over role in murder of Noel Kirwan',
 "6 | headline: Michelle O'Neill was 'born ready' for World Cup final",
 '3 | headline: Indonesia urges Opec to maintain output',
 '3 | headline: 10 killed in Kazakhstan violence',
 '3 | headline: UN envoy to co-chair reform group',
 '4 | headline: Send in the clowns?',
 "3 | headline: India's top court rules sex with an underage wife is rape",
 '3 | headline: 2.45m spent in taxi scheme',
 '1 | headline: Suffragette review: unimpeachable; well-dressed; a bit too glossy',
 '4 | headline: UNIONIST DEMOCRACY',
 '4 | headline: News from NI hopeful; but sidelining of SDLP a worry',
 '3 | headline: Heart of Goldberg',
 "6 | headline: Wood's return helps energise proceedings",
 '6 | headline: Paddy Jackson returns from injury for Ulster clash with Connacht',
 '0 | headline: Travelodge to write off €300m of bank debt',
 '3 | headline: 70 years of infant education',
 '0 | headline: Ebeon founders deny role in collapse',
 '4 | headline: Government faces taxing time over property levy',
 '3 | headline: McGrath urges Minister for Housing to focus on reducing bureaucracy',
 '3 | headline: Netherlands and Australia favour UN plan to secure MH17 crash site',
 '1 | headline: Thousands come to show and tell at World War One Roadshow',
 '4 | headline: Questionable Donations',
 "1 | headline: Boy George: The bits 'Who Do You Think You Are' didn't tell you about singer's Irish family",
 '6 | headline: Inca stays on festival warpath',
 '3 | headline: EU farm commissioner hints at more rural aid',
 '6 | headline: Ronaldo ready to answer his critics',
 '3 | headline: Publicans among occupations barred from Garda reserve',
 "0 | headline: Retired couple sues Bloxham for €470;450 'lost on bond'",
 "4 | headline: Comfort zone for Cowen's Budget",
 "1 | headline: If it's funny there; it's funny anywhere",
 "3 | headline: One in ten Alzheimer's sufferers under 65 - report",
 '0 | headline: Home phones to lose out as Internet option thrives',
 '2 | headline: Head to the slopes; and London',
 '3 | headline: £62m for research pledged to colleges',
 "1 | headline: This kid's not all right; he's a drip",
 '3 | headline: Suicide casts a shadow on the Sunshine policy',
 '0 | headline: Thousands set to get refunds after collapse of Enterprise Insurance',
 '4 | headline: Violence in South Africa',
 "3 | headline: Cameron's bestowal of honours exposes UK's cosy elitism",
 '3 | headline: Friends; family of fatally stabbed lecturer bid him adieu',
 '2 | headline: Elegant Victorian terraced home in D4',
 '3 | headline: Ugandan rebels kill 26 in ambush',
 '6 | headline: Swedish upset',
 '3 | headline: Irish team develops improved whooping cough vaccine',
 '0 | headline: Wall Street encourages retreat',
 '3 | headline: New piers to link Blasket island to mainland',
 '3 | headline: Angolan President plans to retire',
 '3 | headline: Standing charge for water likely to be under €50 a year',
 "3 | headline: Donald Trump deletes baffling late-night 'covfefe' tweet",
 '0 | headline: Seven of top 10 city shops are Irish',
 "6 | headline: King's new-look side earn draw in Cyprus",
 '6 | headline: Dublin - 2-9; Westmeath - 0-8',
 '3 | headline: Derry fire being treated as arson',
 '3 | headline: Up to 100 Irish aid workers head for ravaged regions',
 '3 | headline: Battalion to be disbanded',
 ...]
for example in train_data:
    model.learn(example)
def test_set(test_data):
    test = ['| headline: {}'.format(x) for x in test_data]
    return test
    
dev_x = test_set(dev_x)
testa_x = test_set(testa_x)
testb_x = test_set(testb_x)
dev_x[:10]
['| headline: President Higgins and Xi Jinping enjoy productive talks',
 '| headline: German trade surplus at seven-year low',
 "| headline: Potatoes have 'huge image issue' among the youth",
 "| headline: New home education guidelines favour school teachers; says parents' group",
 '| headline: Mindhunter drags us back to the place where the serial killer craze began',
 "| headline: 'Asgard' to escape from Kilmainham Gaol and appear at RDS boat show next week",
 '| headline: Five dead after British bus crashes in Austria',
 '| headline: Clane General Hospital expects to return to profit this year',
 "| headline: NI death cert plan 'won't bring closure'",
 '| headline: UK investigation into Icelandic bank fraud abandoned']
testa_x[:4]
['| headline: Erratic Wales do it the hard way',
 "| headline: Girls in my daughter's class are calling her fat",
 "| headline: Russia 'not ready' for Y2K",
 "| headline: Those who can't"]
def predictions(test_data, out):
    preds = []
    for x in test_data:
        prediction = model.predict(x)
        preds.append(prediction)
    preds = le.inverse_transform(preds)
    file = open(out, 'w')
    for x in preds:
        file.write(f'{x}\n')
    file.close()
predictions(dev_x, 'dev-0\out.tsv')
predictions(testa_x, 'test-A\out.tsv')
predictions(testb_x, 'test-B\out.tsv')