|
from collections import namedtuple |
|
|
|
Snippet = namedtuple('Snippet', ['text_input', 'entity_types', 'predicates']) |
|
|
|
snippets = { |
|
'paris': Snippet( |
|
text_input="""Paris is the capital of France. It has a population of two million people. |
|
The Eiffel Tower, located in Paris, is a famous landmark with a height of 324 meters. |
|
Paris is known for its romantic atmosphere.""", |
|
entity_types="LOCATION, POPULATION, STYLE", |
|
predicates="HAS, IS" |
|
), |
|
|
|
'dickens': Snippet( |
|
text_input="""It was the best of times, it was the worst of times, it was the age of wisdom, |
|
it was the age of foolishness, it was the epoch of belief, it was the epoch of incredulity, |
|
it was the season of Light, it was the season of Darkness, it was the spring of hope, |
|
it was the winter of despair, we had everything before us, we had nothing before us, |
|
we were all going direct to Heaven, we were all going direct the other way – in short, |
|
the period was so far like the present period, that some of its noisiest authorities |
|
insisted on its being received, for good or for evil, in the superlative degree of comparison only.""", |
|
entity_types="EMOTION, EVENT, OUTCOME, PLACE", |
|
predicates="WAS, HAD, WERE, IS" |
|
), |
|
|
|
'tech_company': Snippet( |
|
text_input="""Apple Inc. was founded by Steve Jobs, Steve Wozniak, and Ronald Wayne in 1976. |
|
Headquartered in Cupertino, California, Apple designs and produces consumer electronics, |
|
software, and online services. The company's flagship products include the iPhone smartphone, |
|
iPad tablet, and Mac personal computer. As of 2023, Apple has over 150000 employees worldwide |
|
and generates annual revenue exceeding $350 billion.""", |
|
entity_types="COMPANY, PERSON, PRODUCT, LOCATION, DATE, EVENT", |
|
predicates="FOUNDED, PRODUCES, HAS, IN, EMPLOYEES, " |
|
), |
|
|
|
'climate_change': Snippet( |
|
text_input="""Global warming is causing significant changes to Earth's climate. The average global |
|
temperature has increased by approximately 1C since the pre-industrial era. This warming is |
|
primarily caused by human activities, particularly the emission of greenhouse gases like carbon dioxide. |
|
The Paris Agreement, signed in 2015, aims to limit global temperature increase to well below 2°C above |
|
pre-industrial levels. To achieve this goal, many countries are implementing policies to reduce carbon |
|
emissions and transition to renewable energy sources.""", |
|
entity_types="PHENOMENON, PLANET, TEMPERATURE, CAUSE, CHEMICAL, AGREEMENT, DATE, GOAL, POLICY", |
|
predicates="CAUSES, INCREASED_BY, CAUSED_BY, SIGNED_IN, AIMS_TO, IMPLEMENTING" |
|
) |
|
} |
|
|