In [ ]:
import requests
Set the annotation url
In [ ]:
annotate_url_prod = 'http://cv.ap.org/annotations'
Set the document
In [ ]:
document = {
"meta": {"features": [
{"name": "ap","authorities":["Subject","Organization","Person","Geography"] },
{"name": "iab"}
]}, "document":"US-North Korea roller coaster ties add to summit uncertainty HANOI, Vietnam (AP) — Before he was elected president, Donald Trump said he could see himself having burgers and chatting with North Korea's Kim Jong Un. About a year later, after Kim tested a long-range missile that could possibly hit U.S. cities, Trump warned that any attack would be met with fire, fury and frankly power — the likes of which the world has never seen before. Since then, Trump has said that he and Kim fell in love. So goes the roller coaster of relations between Washington and Pyongyang. The ups and downs have rattled Americans and allies alike, and the two leaders' past erratic statements have raised uncertainty about the horse trading they might do on nuclear-tipped weapons, economic sanctions and other critical matters at their second summit meeting this week in Vietnam. The North Korean leader has gone from questioning Trump's sanity and warning he would tame the mentally deranged U.S. dotard with fire to writing Trump gushing letters and pledging to denuclearize his nation and turn his energy toward developing his country's economy. And Trump has gone from calling North Korea a menace that threatens our world to working to transform decades of hostile relations between the two nations. Where next? Perhaps the two leaders could agree to set up diplomatic offices in each other's capitals or move to declare an end to the Korean War. The fighting stopped in 1953, but a peace treaty never was signed. We are not going to invade North Korea. We are not seeking to topple the North Korean regime, Trump's North Korea envoy, Stephen Biegun, said in a January speech at Stanford University in California. President Trump is ready to end this war. It is over. It is done. Indeed there is wide sentiment to discard the more than 65-year-old armistice and get on with making a real peace treaty. Robert Carlin, a visiting scholar and North Korea expert at Stanford University, calls the armistice creaky — akin to a 1957 Chevrolet still rumbling down the roads of Cuba. But what would Trump get in exchange for such an agreement? That's where the questions multiply. What, in Trump's eyes, would Kim have to offer to get the U.S. to ease some of the harsh economic sanctions hobbling North Korea's aspirations for economic growth? And are the 28,500 U.S. troops stationed in South Korea in play if Kim takes concrete steps toward denuclearization? Trump said flatly last week that troop reductions are not on the table. But that hasn't completely squelched speculation he might move in that direction. Some experts say North Korea likely wants to trade the destruction of its nuclear development and research center at Yongbyon for a U.S. promise to formally declare the end of the war, open a liaison office in Pyongyang and allow the North to resume some lucrative economic projects with South Korea. Victor Cha, a North Korea expert at the Center for Strategic and International Studies, thinks Trump might not be satisfied with an announcement of only incremental progress. He envisions Trump's national security staff negotiating measured, initial steps and the president coming in and abruptly announcing: This is small ball. I want big steps. So I'm going to put big stuff on the table. The president already has broken away from the format of past talks with North Korea. Instead of insisting on denuclearization first before the U.S. considers any concessions, Biegun says, the U.S. is simultaneously pursuing denuclearization, establishing new U.S.-North Korea relations and working toward a lasting peace on the Korean Peninsula. That different negotiating approach has raised concern that Trump, anxious for a deal, will give away too much to North Korea, which has a history of backing out of agreements. The White House, in briefing reporters ahead of the summit, suggested the Trump administration is looking to move the negotiations forward in big bites. But Trump himself has said he's in no rush for a denuclearization deal. Sue Mi Terry, a former Korea analyst at the CIA who formerly worked at the National Security Council, noted how Trump at the Singapore summit last year made dramatic on-the-spot concessions to Kim that his own advisers had urged him against, including a halt on U.S.-South Korea military exercises. Trump's on-the-spot decisions are truly the wild card, she said. Kim takes a long view of these talks, but Trump could be sidetracked if he gets immersed in his re-election campaign, says Kim Joon-hyung, a professor at Handong Global University in Pohang, South Korea. The second half of this year is critical for moving forward quickly, he said, adding that while the North Korea talks might help Trump win re-election, it's probably not a decisive issue for American voters. That's what I actually worry about the most, he said. What if Trump loses interest in this?" }
Set apikey
In [ ]:
params = {'apikey' : 'apikey' }
Set headers
In [ ]:
headers = {'Accept': 'application/rdf+xml'}
Make request
In [ ]:
r = requests.post(annotate_url_prod,json=document,params=params,headers=headers)
rjson = r.json()
In [ ]:
print(rjson)
In [ ]:
output = rjson['annotation']
Print output
In [ ]:
print(output)