# pylint: disable=C0103,C0330,C0301

EPS = 1e-5

CANDS = [
    "28-year-old chef found dead in San Francisco mall",
    "A 28-year-old chef who recently moved to San Francisco was found dead in the staircase of a local shopping center.",
    "The victim's brother said he cannot imagine anyone who would want to harm him,\"Finally, it went uphill again at him.\"",
]
REFS = [
    "28-Year-Old Chef Found Dead at San Francisco Mall",
    "A 28-year-old chef who had recently moved to San Francisco was found dead in the stairwell of a local mall this week.",
    "But the victim's brother says he can't think of anyone who would want to hurt him, saying, \"Things were finally going well for him.\""
]

REFS_chrfpp = [
    "Recent offers of evacuation form the regime and Russia had sounded like thinly-veiled threats, said the surgeons paediatricians and other doctors.\n",
    "Doctors said that last month, there were 42 attacks on medical facilities in Syria, 15 of which were hospitals in which they work.\n",
    "What pains us most, as doctors, is choosing who will live and who will die.\n",
    "Young children are sometimes brought into our emergency rooms so badly injured that we have to prioritise those with better chances,\n",
    "or simply do not have the equipment to help them, said the doctors.\n",
    "Two weeks ago, four newborn babies, gasping for air suffocated to death after a blast cut the oxygen supply to their incubators.\n"
    "Gasping for air, their lives ended before they had really begun.\n",
    "In recent weeks, forces loyal to Bashar al-Assad supported by Russian forces have seized control of the rebel-held east Aleppo with over 200,000 people still trapped inside with no food supplies.\n",
    "The rebels, who are under constant attack by Russian and Syrian air force, managed to break through the siege on Saturday and launch a counteroffensive.\n",
    "Both sides have added reinforcements both in the city and the surrounding areas.\n"
]
CANDS_chrfpp = [
    "Recent offers of evacuating residents from the Syrian regime and Russia sound like only thinly veiled threats, pediatricians, surgeons and other doctors have said.\n",
    "Doctors said there had been 42 attacks on medical facilities in Syria over the past month, from 15 to the hospitals in which they work.\n",
    "The most sad is that we have to decide who lives and who dies.\n",
    "There are young children coming to the ER with such serious injuries that we have to pick among them the ones most likely to survive.\n",
    "And sometimes we don't even have the necessary material to help them, the doctors described.\n",
    "Four newborns were suffocated two weeks ago when an explosion interrupted the supply of oxygen to their incubators.\n",
    "They were gasping for breath, and then their lives were over - before they could actually begin, they recalled.\n",
    "An army loyal to President Bashar al-Assad, backed by Russian forces, has besieged the rebel-controlled eastern part of Halaba in past weeks, inside with no food supplies of over 200,000 people.\n",
    "The rebels, who are under constant strikes by the Russian and Syrian air force, managed to break the siege on Saturday after three weeks and launch a counter-offensive.\n",
    "Both sides then had reinforcements in the city and its surrounding area.\n"
]

ARTICLE = """A 28-year-old chef who had recently moved to San Francisco was found dead in the stairwell of a local mall this week. But the victim's brother says he can't think of anyone who would want to hurt him, saying, "Things were finally going well for him." The body found at the Westfield Mall Wednesday morning was identified as 28-year-old San Francisco resident Frank Galicia, the San Francisco Medical Examiner's Office said. The San Francisco Police Department said the death was ruled a homicide and an investigation is ongoing.
The victim's brother, Louis Galicia, told ABC station KGO in San Francisco that Frank, previously a line cook in Boston, had landed his dream job as line chef at San Francisco's Sons & Daughters restaurant six months ago.
Louis Galicia said Frank initially stayed in hostels, but recently, "Things were finally going well for him."
"He found an apartment, he was dating a girl," Louis Galicia told KGO.
Louis Galicia said he could not think of anyone who would want to hurt his younger brother.
"He was a kind spirit with a big heart. His way of connecting with the family was always making us a dish, making us dinner," Louis Galicia said. "He never wanted to be in any kind of altercation. He was the brother that went with the flow."
"With everything else that's going wrong with the world, he was that diamond in the rough that was shining bright every day," he said.
Anyone with information is asked to call the SFPD Tip Line at 415-575-4444."""

ARTICLE_sqa = """Super Bowl 50 was an American football game to determine the champion of the National Football League (NFL) for the 2015 season. The American Football Conference (AFC) champion Denver Broncos defeated the National Football Conference (NFC) champion Carolina Panthers 24–10 to earn their third Super Bowl title. The game was played on February 7, 2016, at Levi's Stadium in the San Francisco Bay Area at Santa Clara, California. As this was the 50th Super Bowl, the league emphasized the "golden anniversary" with various gold-themed initiatives, as well as temporarily suspending the tradition of naming each Super Bowl game with Roman numerals (under which the game would have been known as "Super Bowl L"), so that the logo could prominently feature the Arabic numerals 50."""
SUMM1 = """Super Bowl 50 determined the champion of the champion of NFL for the 2015 season."""
SUMM2 = "what what hello hi"

REFS_l2s = [["The thinning of glaciers and ice shelves, as well as the softening of the permafrost, has accelerated greatly in recent years. "\
"While it is not certain that the man-made greenhouse effect is entirely to blame, it is clear that man must take steps now to address the problem. "\
"Global warming affects everything: oil-platforms, the society of peoples who are indiginous to the polar regions, polar animals, migratory birds, lakes (which are drying up as the permafrost melts), and even tourism."\
"As melting cold fresh water enters the salty sea, it will affect ocean currents and therefore world climate."]]
CANDS_l2s = ["Interior Alaska's permafrost has warmed in some places to the highest level since the ice age ended 10,000 years ago, its temperature now within a degree or two of thawing. "\
"Earth frozen since woolly mammoths and bison wandered Interior steppes has been turning to mush. Lakes have been shrinking. Trees are stressed. Prehistoric ice has melted underground, leaving voids that collapse into sinkholes. "\
"Largely concentrated where people have disturbed the surface, such damage can be expensive, even heartbreaking. It's happening now in Fairbanks: Toppled spruce, roller-coaster bike trails, rippled pavement, homes and buildings that sag into ruin."]

CAND_R = "analysis suggests there is up to 100billion barrels of the fossil fuel under the home counties. \n the potential goldmine in the weald basin, across surrey, sussex, hampshire and kent, could meet up to a third of britain's oil demand within 15 years, according to the consortium exploring the area. \n uk oil & gas investments say they have discovered 100billion barrels worth of oil reserves in the weald basin, near gatwick airport (pictured, the well head at horse hill)."
REF_R = "weald basin estimated to contain 100billion barrels of oil , new report says . \n uk oil & gas investments claims the site could supply 30 % of uk 's needs . \n if the maximum amount of oil is extracted it will be worth # 600billion . \n but some experts warn the site in sussex will be difficult to exploit ."
rouge_output = {'rouge_1_recall': 0.46154, 'rouge_1_recall_cb': 0.46154, 'rouge_1_recall_ce': 0.46154, 'rouge_1_precision': 0.30769, 'rouge_1_precision_cb': 0.30769, 'rouge_1_precision_ce': 0.30769, 'rouge_1_f_score': 0.36923, 'rouge_1_f_score_cb': 0.36923, 'rouge_1_f_score_ce': 0.36923, 'rouge_2_recall': 0.13725, 'rouge_2_recall_cb': 0.13725, 'rouge_2_recall_ce': 0.13725, 'rouge_2_precision': 0.09091, 'rouge_2_precision_cb': 0.09091, 'rouge_2_precision_ce': 0.09091, 'rouge_2_f_score': 0.10937, 'rouge_2_f_score_cb': 0.10937, 'rouge_2_f_score_ce': 0.10937, 'rouge_3_recall': 0.06, 'rouge_3_recall_cb': 0.06, 'rouge_3_recall_ce': 0.06, 'rouge_3_precision': 0.03947, 'rouge_3_precision_cb': 0.03947, 'rouge_3_precision_ce': 0.03947, 'rouge_3_f_score': 0.04762, 'rouge_3_f_score_cb': 0.04762, 'rouge_3_f_score_ce': 0.04762, 'rouge_4_recall': 0.02041, 'rouge_4_recall_cb': 0.02041, 'rouge_4_recall_ce': 0.02041, 'rouge_4_precision': 0.01333, 'rouge_4_precision_cb': 0.01333, 'rouge_4_precision_ce': 0.01333, 'rouge_4_f_score': 0.01613, 'rouge_4_f_score_cb': 0.01613, 'rouge_4_f_score_ce': 0.01613, 'rouge_l_recall': 0.42308, 'rouge_l_recall_cb': 0.42308, 'rouge_l_recall_ce': 0.42308, 'rouge_l_precision': 0.28205, 'rouge_l_precision_cb': 0.28205, 'rouge_l_precision_ce': 0.28205, 'rouge_l_f_score': 0.33846, 'rouge_l_f_score_cb': 0.33846, 'rouge_l_f_score_ce': 0.33846, 'rouge_w_1.2_recall': 0.17078, 'rouge_w_1.2_recall_cb': 0.17078, 'rouge_w_1.2_recall_ce': 0.17078, 'rouge_w_1.2_precision': 0.19023, 'rouge_w_1.2_precision_cb': 0.19023, 'rouge_w_1.2_precision_ce': 0.19023, 'rouge_w_1.2_f_score': 0.17998, 'rouge_w_1.2_f_score_cb': 0.17998, 'rouge_w_1.2_f_score_ce': 0.17998, 'rouge_s*_recall': 0.16817, 'rouge_s*_recall_cb': 0.16817, 'rouge_s*_recall_ce': 0.16817, 'rouge_s*_precision': 0.07426, 'rouge_s*_precision_cb': 0.07426, 'rouge_s*_precision_ce': 0.07426, 'rouge_s*_f_score': 0.10303, 'rouge_s*_f_score_cb': 0.10303, 'rouge_s*_f_score_ce': 0.10303, 'rouge_su*_recall': 0.17938, 'rouge_su*_recall_cb': 0.17938, 'rouge_su*_recall_ce': 0.17938, 'rouge_su*_precision': 0.08019, 'rouge_su*_precision_cb': 0.08019, 'rouge_su*_precision_ce': 0.08019, 'rouge_su*_f_score': 0.11083, 'rouge_su*_f_score_cb': 0.11083, 'rouge_su*_f_score_ce': 0.11083}
rouge_output_batch = {'rouge_1_recall': 0.73063, 'rouge_1_recall_cb': 0.5, 'rouge_1_recall_ce': 0.9, 'rouge_1_precision': 0.78487, 'rouge_1_precision_cb': 0.59091, 'rouge_1_precision_ce': 0.9, 'rouge_1_f_score': 0.75597, 'rouge_1_f_score_cb': 0.54167, 'rouge_1_f_score_ce': 0.9, 'rouge_2_recall': 0.58453, 'rouge_2_recall_cb': 0.28, 'rouge_2_recall_ce': 0.77778, 'rouge_2_precision': 0.62435, 'rouge_2_precision_cb': 0.33333, 'rouge_2_precision_ce': 0.77778, 'rouge_2_f_score': 0.60317, 'rouge_2_f_score_cb': 0.30435, 'rouge_2_f_score_ce': 0.77778, 'rouge_3_recall': 0.47477, 'rouge_3_recall_cb': 0.20833, 'rouge_3_recall_ce': 0.625, 'rouge_3_precision': 0.50832, 'rouge_3_precision_cb': 0.25, 'rouge_3_precision_ce': 0.65, 'rouge_3_f_score': 0.49044, 'rouge_3_f_score_cb': 0.22727, 'rouge_3_f_score_ce': 0.625, 'rouge_4_recall': 0.34503, 'rouge_4_recall_cb': 0.13043, 'rouge_4_recall_ce': 0.47619, 'rouge_4_precision': 0.37086, 'rouge_4_precision_cb': 0.15789, 'rouge_4_precision_ce': 0.52632, 'rouge_4_f_score': 0.35709, 'rouge_4_f_score_cb': 0.14285, 'rouge_4_f_score_ce': 0.5, 'rouge_l_recall': 0.73063, 'rouge_l_recall_cb': 0.5, 'rouge_l_recall_ce': 0.9, 'rouge_l_precision': 0.78487, 'rouge_l_precision_cb': 0.59091, 'rouge_l_precision_ce': 0.9, 'rouge_l_f_score': 0.75597, 'rouge_l_f_score_cb': 0.54167, 'rouge_l_f_score_ce': 0.9, 'rouge_w_1.2_recall': 0.3574, 'rouge_w_1.2_recall_cb': 0.20391, 'rouge_w_1.2_recall_ce': 0.5116, 'rouge_w_1.2_precision': 0.66915, 'rouge_w_1.2_precision_cb': 0.46237, 'rouge_w_1.2_precision_ce': 0.81083, 'rouge_w_1.2_f_score': 0.4635, 'rouge_w_1.2_f_score_cb': 0.28301, 'rouge_w_1.2_f_score_ce': 0.62736, 'rouge_s*_recall': 0.55331, 'rouge_s*_recall_cb': 0.24, 'rouge_s*_recall_ce': 0.8, 'rouge_s*_precision': 0.62601, 'rouge_s*_precision_cb': 0.33766, 'rouge_s*_precision_ce': 0.8, 'rouge_s*_f_score': 0.58513, 'rouge_s*_f_score_cb': 0.28057, 'rouge_s*_f_score_ce': 0.8, 'rouge_su*_recall': 0.56925, 'rouge_su*_recall_cb': 0.25714, 'rouge_su*_recall_ce': 0.81481, 'rouge_su*_precision': 0.64201, 'rouge_su*_precision_cb': 0.35714, 'rouge_su*_precision_ce': 0.81481, 'rouge_su*_f_score': 0.60124, 'rouge_su*_f_score_cb': 0.299, 'rouge_su*_f_score_ce': 0.81481}
rouge_empty = {'rouge_1_recall': 0.0, 'rouge_1_recall_cb': 0.0, 'rouge_1_recall_ce': 0.0, 'rouge_1_precision': 0.0, 'rouge_1_precision_cb': 0.0, 'rouge_1_precision_ce': 0.0, 'rouge_1_f_score': 0.0, 'rouge_1_f_score_cb': 0.0, 'rouge_1_f_score_ce': 0.0, 'rouge_2_recall': 0.0, 'rouge_2_recall_cb': 0.0, 'rouge_2_recall_ce': 0.0, 'rouge_2_precision': 0.0, 'rouge_2_precision_cb': 0.0, 'rouge_2_precision_ce': 0.0, 'rouge_2_f_score': 0.0, 'rouge_2_f_score_cb': 0.0, 'rouge_2_f_score_ce': 0.0, 'rouge_3_recall': 0.0, 'rouge_3_recall_cb': 0.0, 'rouge_3_recall_ce': 0.0, 'rouge_3_precision': 0.0, 'rouge_3_precision_cb': 0.0, 'rouge_3_precision_ce': 0.0, 'rouge_3_f_score': 0.0, 'rouge_3_f_score_cb': 0.0, 'rouge_3_f_score_ce': 0.0, 'rouge_4_recall': 0.0, 'rouge_4_recall_cb': 0.0, 'rouge_4_recall_ce': 0.0, 'rouge_4_precision': 0.0, 'rouge_4_precision_cb': 0.0, 'rouge_4_precision_ce': 0.0, 'rouge_4_f_score': 0.0, 'rouge_4_f_score_cb': 0.0, 'rouge_4_f_score_ce': 0.0, 'rouge_l_recall': 0.0, 'rouge_l_recall_cb': 0.0, 'rouge_l_recall_ce': 0.0, 'rouge_l_precision': 0.0, 'rouge_l_precision_cb': 0.0, 'rouge_l_precision_ce': 0.0, 'rouge_l_f_score': 0.0, 'rouge_l_f_score_cb': 0.0, 'rouge_l_f_score_ce': 0.0, 'rouge_w_1.2_recall': 0.0, 'rouge_w_1.2_recall_cb': 0.0, 'rouge_w_1.2_recall_ce': 0.0, 'rouge_w_1.2_precision': 0.0, 'rouge_w_1.2_precision_cb': 0.0, 'rouge_w_1.2_precision_ce': 0.0, 'rouge_w_1.2_f_score': 0.0, 'rouge_w_1.2_f_score_cb': 0.0, 'rouge_w_1.2_f_score_ce': 0.0, 'rouge_s*_recall': 0.0, 'rouge_s*_recall_cb': 0.0, 'rouge_s*_recall_ce': 0.0, 'rouge_s*_precision': 0.0, 'rouge_s*_precision_cb': 0.0, 'rouge_s*_precision_ce': 0.0, 'rouge_s*_f_score': 0.0, 'rouge_s*_f_score_cb': 0.0, 'rouge_s*_f_score_ce': 0.0, 'rouge_su*_recall': 0.0, 'rouge_su*_recall_cb': 0.0, 'rouge_su*_recall_ce': 0.0, 'rouge_su*_precision': 0.0, 'rouge_su*_precision_cb': 0.0, 'rouge_su*_precision_ce': 0.0, 'rouge_su*_f_score': 0.0, 'rouge_su*_f_score_cb': 0.0, 'rouge_su*_f_score_ce': 0.0}
