Skip to content

Instantly share code, notes, and snippets.

@dvsrepo
Last active September 25, 2020 10:06
Show Gist options
  • Save dvsrepo/a33bcd1c4e7074fbf15aefdccca5b46f to your computer and use it in GitHub Desktop.
Save dvsrepo/a33bcd1c4e7074fbf15aefdccca5b46f to your computer and use it in GitHub Desktop.
NER + Relation classification multitask draft
{"text":"A large marble was dropped into the bowl.","entities":[{"start":36,"end":40,"label":"OBJECT","text":"bowl"},{"start":8,"end":14,"label":"SUBJECT","text":"marble"}],"label":"Entity-Destination(e1,e2)"}
{"text":"A portion of the ethernet cable 's outer insulation is in the connector as well.","entities":[{"start":26,"end":31,"label":"OBJECT","text":"cable"},{"start":41,"end":51,"label":"SUBJECT","text":"insulation"}],"label":"Component-Whole(e2,e1)"}
{"text":"A soldier brings oranges he got out from a tank.","entities":[{"start":43,"end":47,"label":"OBJECT","text":"tank"},{"start":17,"end":24,"label":"SUBJECT","text":"oranges"}],"label":"Entity-Origin(e1,e2)"}
{"text":"A train ran into a truck, leaving 14 dead.","entities":[{"start":19,"end":24,"label":"OBJECT","text":"truck"},{"start":2,"end":7,"label":"SUBJECT","text":"train"}],"label":"Entity-Destination(e1,e2)"}
{"text":"The recipes are culled from various restaurant chefs, magazines and Brother Victor-Antoine d'Avila-Latourrette, a monk and cookbook author.","entities":[{"start":132,"end":138,"label":"OBJECT","text":"author"},{"start":114,"end":118,"label":"SUBJECT","text":"monk"}],"label":"Other"}
{"text":"I especially love the way the scroll wheel of the mouse riffles through the tabs; it's so fast and easy.","entities":[{"start":50,"end":55,"label":"OBJECT","text":"mouse"},{"start":30,"end":42,"label":"SUBJECT","text":"scroll wheel"}],"label":"Component-Whole(e1,e2)"}
{"text":"Modern economists have exported equilibrium concepts to political science.","entities":[{"start":66,"end":73,"label":"OBJECT","text":"science"},{"start":44,"end":52,"label":"SUBJECT","text":"concepts"}],"label":"Entity-Destination(e1,e2)"}
{"text":"His mother's body was in a chest freezer in the basement.","entities":[{"start":27,"end":40,"label":"OBJECT","text":"chest freezer"},{"start":13,"end":17,"label":"SUBJECT","text":"body"}],"label":"Content-Container(e1,e2)"}
{"text":"As per traditional Indian thinking, seeing a brood of chickens along with a hen is a bad omen.","entities":[{"start":45,"end":50,"label":"OBJECT","text":"brood"},{"start":54,"end":62,"label":"SUBJECT","text":"chickens"}],"label":"Member-Collection(e2,e1)"}
{"text":"An accident has been caused by the fog.","entities":[{"start":3,"end":11,"label":"OBJECT","text":"accident"},{"start":35,"end":38,"label":"SUBJECT","text":"fog"}],"label":"Cause-Effect(e2,e1)"}
{"text":"And John was able to talk to some people in the U.S. government and verify that the substantive contents of the memo were a reasonably accurate transcription of what had transpired.","entities":[{"start":144,"end":157,"label":"OBJECT","text":"transcription"},{"start":112,"end":116,"label":"SUBJECT","text":"memo"}],"label":"Other"}
{"text":"The Kerala backwaters are a chain of brackish lagoons and lakes lying parallel to the Arabian Sea coast of Kerala state in southern India.","entities":[{"start":28,"end":33,"label":"OBJECT","text":"chain"},{"start":46,"end":53,"label":"SUBJECT","text":"lagoons"}],"label":"Member-Collection(e2,e1)"}
{"text":"In 2009, Daniel Bennett began litigation against the University of Leeds for it having disposed of 5s 7lbs of lizard excrement he had meticulously collected.","entities":[{"start":110,"end":116,"label":"OBJECT","text":"lizard"},{"start":117,"end":126,"label":"SUBJECT","text":"excrement"}],"label":"Product-Producer(e2,e1)"}
{"text":"An album by the same artist has now been put into a folder.","entities":[{"start":52,"end":58,"label":"OBJECT","text":"folder"},{"start":3,"end":8,"label":"SUBJECT","text":"album"}],"label":"Entity-Destination(e1,e2)"}
{"text":"But then one of them got hold of an axe belonging to the carpenter.","entities":[{"start":36,"end":39,"label":"OBJECT","text":"axe"},{"start":57,"end":66,"label":"SUBJECT","text":"carpenter"}],"label":"Instrument-Agency(e2,e1)"}
{"text":"I even placed the dish in a cold oven as directions state.","entities":[{"start":33,"end":37,"label":"OBJECT","text":"oven"},{"start":18,"end":22,"label":"SUBJECT","text":"dish"}],"label":"Entity-Destination(e1,e2)"}
{"text":"The kit includes an on-off-on toggle switch for the clipper switching and modifications.","entities":[{"start":4,"end":7,"label":"OBJECT","text":"kit"},{"start":30,"end":43,"label":"SUBJECT","text":"toggle switch"}],"label":"Component-Whole(e2,e1)"}
{"text":"The block was fetched into the cache.","entities":[{"start":31,"end":36,"label":"OBJECT","text":"cache"},{"start":4,"end":9,"label":"SUBJECT","text":"block"}],"label":"Entity-Destination(e1,e2)"}
{"text":"Since last weekend, it has imported chocolate into that market.","entities":[{"start":56,"end":62,"label":"OBJECT","text":"market"},{"start":36,"end":45,"label":"SUBJECT","text":"chocolate"}],"label":"Entity-Destination(e1,e2)"}
{"text":"The large anti-neutrino component is the source of an irreducible background.","entities":[{"start":66,"end":76,"label":"OBJECT","text":"background"},{"start":24,"end":33,"label":"SUBJECT","text":"component"}],"label":"Cause-Effect(e1,e2)"}
{"text":"Pilot-money manager who bailed out of plane over Shelby County says in letter he \"snapped\".","entities":[{"start":38,"end":43,"label":"OBJECT","text":"plane"},{"start":12,"end":19,"label":"SUBJECT","text":"manager"}],"label":"Entity-Origin(e1,e2)"}
{"text":"The water was in a cup.","entities":[{"start":19,"end":22,"label":"OBJECT","text":"cup"},{"start":4,"end":9,"label":"SUBJECT","text":"water"}],"label":"Content-Container(e1,e2)"}
{"text":"There are a few simple steps you take to ensure you have selected the correct landscape company.","entities":[{"start":88,"end":95,"label":"OBJECT","text":"company"},{"start":78,"end":87,"label":"SUBJECT","text":"landscape"}],"label":"Product-Producer(e1,e2)"}
{"text":"Contractors quickly generate documents that are shared via fax, email, or text message, by using templates.","entities":[{"start":0,"end":11,"label":"OBJECT","text":"Contractors"},{"start":97,"end":106,"label":"SUBJECT","text":"templates"}],"label":"Instrument-Agency(e2,e1)"}
{"text":"The timber fell from the Russian registered vessel the Sinegorsk in the Channel on Monday, 14 miles off of New Haven, Sussex.","entities":[{"start":44,"end":50,"label":"OBJECT","text":"vessel"},{"start":4,"end":10,"label":"SUBJECT","text":"timber"}],"label":"Entity-Origin(e1,e2)"}
{"text":"Well rested from our relaxing day pool side, the tourists had an early departure from the hotel.","entities":[{"start":90,"end":95,"label":"OBJECT","text":"hotel"},{"start":49,"end":57,"label":"SUBJECT","text":"tourists"}],"label":"Entity-Origin(e1,e2)"}
{"text":"Clinicians entered the patients into randomised controlled trials.","entities":[{"start":59,"end":65,"label":"OBJECT","text":"trials"},{"start":23,"end":31,"label":"SUBJECT","text":"patients"}],"label":"Other"}
{"text":"The spread is mainly airborne, via the virus-laden droplets produced by coughing and sneezing.","entities":[{"start":85,"end":93,"label":"OBJECT","text":"sneezing"},{"start":51,"end":59,"label":"SUBJECT","text":"droplets"}],"label":"Other"}
{"text":"We pop our heads out the capped dome of the building.","entities":[{"start":44,"end":52,"label":"OBJECT","text":"building"},{"start":32,"end":36,"label":"SUBJECT","text":"dome"}],"label":"Component-Whole(e1,e2)"}
{"text":"The health medical insurance coverage for allergy kits, abortificants, and prescription drugs produced from blood or blood products is discussed.","entities":[{"start":108,"end":113,"label":"OBJECT","text":"blood"},{"start":88,"end":93,"label":"SUBJECT","text":"drugs"}],"label":"Entity-Origin(e1,e2)"}
{"text":"The microphone converts sound into an electrical signal.","entities":[{"start":49,"end":55,"label":"OBJECT","text":"signal"},{"start":4,"end":14,"label":"SUBJECT","text":"microphone"}],"label":"Cause-Effect(e1,e2)"}
{"text":"My eyes have seen the defeat of my adversaries; my ears have heard the rout of my wicked foes.","entities":[{"start":89,"end":93,"label":"OBJECT","text":"foes"},{"start":71,"end":75,"label":"SUBJECT","text":"rout"}],"label":"Other"}
{"text":"I included sections dealing with labour markets, domestic taxation, economic activation policies, and financial market regulation.","entities":[{"start":40,"end":47,"label":"OBJECT","text":"markets"},{"start":11,"end":19,"label":"SUBJECT","text":"sections"}],"label":"Message-Topic(e1,e2)"}
{"text":"Management Unit personnel marked private lines with blue paint.","entities":[{"start":16,"end":25,"label":"OBJECT","text":"personnel"},{"start":57,"end":62,"label":"SUBJECT","text":"paint"}],"label":"Instrument-Agency(e2,e1)"}
{"text":"A passenger was taken into custody after trying to bring a suitcase full of cocaine onto a plane at Philadelphia International Airport.","entities":[{"start":59,"end":67,"label":"OBJECT","text":"suitcase"},{"start":76,"end":83,"label":"SUBJECT","text":"cocaine"}],"label":"Content-Container(e2,e1)"}
{"text":"Alabama has since enacted legislation, allowing death by lethal injection as an alternative choice to death in the electric chair.","entities":[{"start":48,"end":53,"label":"OBJECT","text":"death"},{"start":64,"end":73,"label":"SUBJECT","text":"injection"}],"label":"Cause-Effect(e2,e1)"}
{"text":"Many marriages do not recover from affairs at all, but at least one-third do find some way to rebuild trust and happiness after an affair.","entities":[{"start":131,"end":137,"label":"OBJECT","text":"affair"},{"start":112,"end":121,"label":"SUBJECT","text":"happiness"}],"label":"Other"}
{"text":"I derive tremendous pleasure and fulfillment from teaching, particularly when I am able to help students understand a previously foreign concept or idea, aid them in seeing a familiar object or event from a new and unusual perspective, guide them with projects they are working on, or encourage the interests they have.","entities":[{"start":33,"end":44,"label":"OBJECT","text":"fulfillment"},{"start":50,"end":58,"label":"SUBJECT","text":"teaching"}],"label":"Cause-Effect(e2,e1)"}
{"text":"You have added keys into the memory on the remote systems.","entities":[{"start":29,"end":35,"label":"OBJECT","text":"memory"},{"start":15,"end":19,"label":"SUBJECT","text":"keys"}],"label":"Entity-Destination(e1,e2)"}
{"text":"The band's mascots are a tiding of black-billed magpies and a beanie baby skeleton called \"Death\".","entities":[{"start":25,"end":31,"label":"OBJECT","text":"tiding"},{"start":48,"end":55,"label":"SUBJECT","text":"magpies"}],"label":"Member-Collection(e2,e1)"}
{"text":"First these hawks made a meal of a diving of teal, then a trimming of finches came last.","entities":[{"start":58,"end":66,"label":"OBJECT","text":"trimming"},{"start":70,"end":77,"label":"SUBJECT","text":"finches"}],"label":"Member-Collection(e2,e1)"}
{"text":"You saw professional chefs using a garlic press.","entities":[{"start":21,"end":26,"label":"OBJECT","text":"chefs"},{"start":42,"end":47,"label":"SUBJECT","text":"press"}],"label":"Instrument-Agency(e2,e1)"}
{"text":"The signal peptide is derived from a protein that is exported by the cell.","entities":[{"start":37,"end":44,"label":"OBJECT","text":"protein"},{"start":11,"end":18,"label":"SUBJECT","text":"peptide"}],"label":"Entity-Origin(e1,e2)"}
{"text":"One of my girlfriends ordered the Lomo de Puerco which was their pork chop in some guava sauce.","entities":[{"start":83,"end":88,"label":"OBJECT","text":"guava"},{"start":89,"end":94,"label":"SUBJECT","text":"sauce"}],"label":"Entity-Origin(e2,e1)"}
{"text":"The drug was put inside a capsule for a reason.","entities":[{"start":26,"end":33,"label":"OBJECT","text":"capsule"},{"start":4,"end":8,"label":"SUBJECT","text":"drug"}],"label":"Entity-Destination(e1,e2)"}
{"text":"The following table indicates the party of elected officials in the U.S. state of California.","entities":[{"start":34,"end":39,"label":"OBJECT","text":"party"},{"start":14,"end":19,"label":"SUBJECT","text":"table"}],"label":"Message-Topic(e1,e2)"}
{"text":"He used a real deck of cards.","entities":[{"start":15,"end":19,"label":"OBJECT","text":"deck"},{"start":23,"end":28,"label":"SUBJECT","text":"cards"}],"label":"Member-Collection(e2,e1)"}
{"text":"Before leaving Peter bought a silver star necklace for Tina.","entities":[{"start":42,"end":50,"label":"OBJECT","text":"necklace"},{"start":30,"end":36,"label":"SUBJECT","text":"silver"}],"label":"Other"}
{"text":"Side play of the spindle is prevented in one direction by the crank of the handle, and in other directions by a piece of brass tube.","entities":[{"start":75,"end":81,"label":"OBJECT","text":"handle"},{"start":62,"end":67,"label":"SUBJECT","text":"crank"}],"label":"Component-Whole(e1,e2)"}
{"text":"The dotted line refers to experimental and simulated data.","entities":[{"start":53,"end":57,"label":"OBJECT","text":"data"},{"start":11,"end":15,"label":"SUBJECT","text":"line"}],"label":"Other"}
{"text":"We catch happiness from friends and family members like an emotional virus.","entities":[{"start":43,"end":50,"label":"OBJECT","text":"members"},{"start":9,"end":18,"label":"SUBJECT","text":"happiness"}],"label":"Other"}
{"text":"In order to gather experimental data, researchers explicitly defined a model describing the process.","entities":[{"start":92,"end":99,"label":"OBJECT","text":"process"},{"start":71,"end":76,"label":"SUBJECT","text":"model"}],"label":"Other"}
{"text":"Typically, the maximum heat generated from 24 fuel assemblies stored in a cask is less than that given off by a typical home heating system in an hour.","entities":[{"start":74,"end":78,"label":"OBJECT","text":"cask"},{"start":51,"end":61,"label":"SUBJECT","text":"assemblies"}],"label":"Content-Container(e1,e2)"}
{"text":"My problem is that the advertisement gives the impression that women in rural Bangladesh have 6 children.","entities":[{"start":47,"end":57,"label":"OBJECT","text":"impression"},{"start":23,"end":36,"label":"SUBJECT","text":"advertisement"}],"label":"Cause-Effect(e1,e2)"}
{"text":"These three-dimensional lithographs are similar to the paper constructions of Red Grooms and an impressive installation piece previously created by the artist.","entities":[{"start":152,"end":158,"label":"OBJECT","text":"artist"},{"start":120,"end":125,"label":"SUBJECT","text":"piece"}],"label":"Product-Producer(e1,e2)"}
{"text":"Much of the impetus behind the formation of the fund came from a wounded Vietnam veteran.","entities":[{"start":81,"end":88,"label":"OBJECT","text":"veteran"},{"start":12,"end":19,"label":"SUBJECT","text":"impetus"}],"label":"Entity-Origin(e1,e2)"}
{"text":"The PRI government crushed a burgeoning student movement with gunfire that killed scores of peaceful demonstrators.","entities":[{"start":8,"end":18,"label":"OBJECT","text":"government"},{"start":62,"end":69,"label":"SUBJECT","text":"gunfire"}],"label":"Instrument-Agency(e2,e1)"}
{"text":"My manager's desk has been moved up to the top floor.","entities":[{"start":47,"end":52,"label":"OBJECT","text":"floor"},{"start":13,"end":17,"label":"SUBJECT","text":"desk"}],"label":"Entity-Destination(e1,e2)"}
{"text":"The video contains a clip from the movie.","entities":[{"start":4,"end":9,"label":"OBJECT","text":"video"},{"start":21,"end":25,"label":"SUBJECT","text":"clip"}],"label":"Component-Whole(e2,e1)"}
{"text":"The metal casing of the refrigerator made it impossible to access them.","entities":[{"start":24,"end":36,"label":"OBJECT","text":"refrigerator"},{"start":10,"end":16,"label":"SUBJECT","text":"casing"}],"label":"Component-Whole(e1,e2)"}
{"text":"A suitcase with a bomb in it is carried around.","entities":[{"start":2,"end":10,"label":"OBJECT","text":"suitcase"},{"start":18,"end":22,"label":"SUBJECT","text":"bomb"}],"label":"Content-Container(e2,e1)"}
{"text":"The bacon is home cured by our local butcher who also supplies the award winning sausages.","entities":[{"start":37,"end":44,"label":"OBJECT","text":"butcher"},{"start":4,"end":9,"label":"SUBJECT","text":"bacon"}],"label":"Other"}
{"text":"The kids got tuckered out from the bouncy castle.","entities":[{"start":42,"end":48,"label":"OBJECT","text":"castle"},{"start":4,"end":8,"label":"SUBJECT","text":"kids"}],"label":"Entity-Origin(e1,e2)"}
{"text":"The experimenters designed the shape and size of the enlarged fiber ends so they don't experience the stresses that usually snap fibers and limit a short-fiber composite's performance.","entities":[{"start":31,"end":36,"label":"OBJECT","text":"shape"},{"start":4,"end":17,"label":"SUBJECT","text":"experimenters"}],"label":"Other"}
{"text":"To use it, a person applies the vinegar to a cotton ball and then swabs the vinegar on the affected area.","entities":[{"start":13,"end":19,"label":"OBJECT","text":"person"},{"start":32,"end":39,"label":"SUBJECT","text":"vinegar"}],"label":"Instrument-Agency(e2,e1)"}
{"text":"Space beer is made from barley grown in space.","entities":[{"start":24,"end":30,"label":"OBJECT","text":"barley"},{"start":6,"end":10,"label":"SUBJECT","text":"beer"}],"label":"Entity-Origin(e1,e2)"}
{"text":"The perpetrator killed the victim with a gun.","entities":[{"start":4,"end":15,"label":"OBJECT","text":"perpetrator"},{"start":41,"end":44,"label":"SUBJECT","text":"gun"}],"label":"Instrument-Agency(e2,e1)"}
{"text":"We store the tops for the containers in a shallow drawer to reduce the clutter.","entities":[{"start":50,"end":56,"label":"OBJECT","text":"drawer"},{"start":13,"end":17,"label":"SUBJECT","text":"tops"}],"label":"Content-Container(e1,e2)"}
{"text":"As a control, cowpea was sealed in double bags without fumigant.","entities":[{"start":35,"end":46,"label":"OBJECT","text":"double bags"},{"start":14,"end":20,"label":"SUBJECT","text":"cowpea"}],"label":"Entity-Destination(e1,e2)"}
{"text":"Scientists have injected human cells into lab animals.","entities":[{"start":46,"end":53,"label":"OBJECT","text":"animals"},{"start":31,"end":36,"label":"SUBJECT","text":"cells"}],"label":"Entity-Destination(e1,e2)"}
{"text":"The excitement comes from Frakes's direction -- his liveliness, and his pleasure in looking at, and showing us, events and images.","entities":[{"start":35,"end":44,"label":"OBJECT","text":"direction"},{"start":4,"end":14,"label":"SUBJECT","text":"excitement"}],"label":"Entity-Origin(e1,e2)"}
{"text":"The pain was radiating from the contraction out to my hips and back and then down both my legs all the way to my toes.","entities":[{"start":4,"end":8,"label":"OBJECT","text":"pain"},{"start":32,"end":43,"label":"SUBJECT","text":"contraction"}],"label":"Cause-Effect(e2,e1)"}
{"text":"The accounts have been prepared on a historical cost basis.","entities":[{"start":53,"end":58,"label":"OBJECT","text":"basis"},{"start":4,"end":12,"label":"SUBJECT","text":"accounts"}],"label":"Message-Topic(e1,e2)"}
{"text":"There was an the outrage from the sexism crusaders.","entities":[{"start":17,"end":24,"label":"OBJECT","text":"outrage"},{"start":41,"end":50,"label":"SUBJECT","text":"crusaders"}],"label":"Cause-Effect(e2,e1)"}
{"text":"The v = 1 emission originates from an 80 AU diameter ring of maser spots centered on radio continuum source I.","entities":[{"start":53,"end":57,"label":"OBJECT","text":"ring"},{"start":10,"end":18,"label":"SUBJECT","text":"emission"}],"label":"Entity-Origin(e1,e2)"}
{"text":"In the sketch at right, the electromagnet formed by the coil of the rotor is represented as a permanent magnet, and the same torque (North attracts South) is seen to be that acting to align the central magnet.","entities":[{"start":68,"end":73,"label":"OBJECT","text":"rotor"},{"start":56,"end":60,"label":"SUBJECT","text":"coil"}],"label":"Component-Whole(e1,e2)"}
{"text":"The volunteers enjoy a sense of satisfaction and personal fulfillment from helping others, and recent findings suggest that this feeling may well be a major reason why many people choose to volunteer.","entities":[{"start":58,"end":69,"label":"OBJECT","text":"fulfillment"},{"start":75,"end":82,"label":"SUBJECT","text":"helping"}],"label":"Cause-Effect(e2,e1)"}
{"text":"The average year round temperature in Denia is 18' centigrade, so the locals have put up a monument to the weather.","entities":[{"start":70,"end":76,"label":"OBJECT","text":"locals"},{"start":91,"end":99,"label":"SUBJECT","text":"monument"}],"label":"Product-Producer(e2,e1)"}
{"text":"Young people from Bridgend made this animated film to highlight the dangers of forest fires.","entities":[{"start":68,"end":75,"label":"OBJECT","text":"dangers"},{"start":46,"end":50,"label":"SUBJECT","text":"film"}],"label":"Message-Topic(e1,e2)"}
{"text":"Thousands of drummers and dancers perform in the streets of Kandy accompanied by a parade of ornamented elephants.","entities":[{"start":83,"end":89,"label":"OBJECT","text":"parade"},{"start":104,"end":113,"label":"SUBJECT","text":"elephants"}],"label":"Member-Collection(e2,e1)"}
{"text":"The detector module including a preamplifier was inside a laboratory oven.","entities":[{"start":58,"end":73,"label":"OBJECT","text":"laboratory oven"},{"start":4,"end":19,"label":"SUBJECT","text":"detector module"}],"label":"Content-Container(e1,e2)"}
{"text":"The current crisis was caused by the housing bubble, and the primary cause of the housing bubble was the Federal Reserve keeping interest rates at 1 percent.","entities":[{"start":12,"end":18,"label":"OBJECT","text":"crisis"},{"start":37,"end":51,"label":"SUBJECT","text":"housing bubble"}],"label":"Cause-Effect(e2,e1)"}
{"text":"Some of that blood was in a bottle in the operating room though the record is not clear as to how it got there.","entities":[{"start":28,"end":34,"label":"OBJECT","text":"bottle"},{"start":13,"end":18,"label":"SUBJECT","text":"blood"}],"label":"Content-Container(e1,e2)"}
{"text":"All they have on their side is the most artful sergeant in the army and a vampire with a lust for coffee.","entities":[{"start":63,"end":67,"label":"OBJECT","text":"army"},{"start":47,"end":55,"label":"SUBJECT","text":"sergeant"}],"label":"Member-Collection(e1,e2)"}
{"text":"We got a ball with catnip inside.","entities":[{"start":9,"end":13,"label":"OBJECT","text":"ball"},{"start":19,"end":25,"label":"SUBJECT","text":"catnip"}],"label":"Component-Whole(e2,e1)"}
{"text":"The universe was made with a plan by a designer.","entities":[{"start":39,"end":47,"label":"OBJECT","text":"designer"},{"start":29,"end":33,"label":"SUBJECT","text":"plan"}],"label":"Product-Producer(e1,e2)"}
{"text":"Having delivered her charge, she had silently returned to her tree deep in the woods.","entities":[{"start":79,"end":84,"label":"OBJECT","text":"woods"},{"start":62,"end":66,"label":"SUBJECT","text":"tree"}],"label":"Other"}
{"text":"The team finishes the season with a 9-11 record, just short of tournament contention.","entities":[{"start":22,"end":28,"label":"OBJECT","text":"season"},{"start":4,"end":8,"label":"SUBJECT","text":"team"}],"label":"Other"}
{"text":"The book by the death-march survivor constitutes the basis of the case.","entities":[{"start":28,"end":36,"label":"OBJECT","text":"survivor"},{"start":4,"end":8,"label":"SUBJECT","text":"book"}],"label":"Product-Producer(e1,e2)"}
{"text":"Republican senators hammered White House science officials about the emails leaked from prominent climate scientists two weeks ago.","entities":[{"start":106,"end":116,"label":"OBJECT","text":"scientists"},{"start":69,"end":75,"label":"SUBJECT","text":"emails"}],"label":"Entity-Origin(e1,e2)"}
{"text":"The picture frame hangs on the wall in my living room, reminding me that I'm the only child of three to be born and live to my parents.","entities":[{"start":12,"end":17,"label":"OBJECT","text":"frame"},{"start":4,"end":11,"label":"SUBJECT","text":"picture"}],"label":"Content-Container(e1,e2)"}
{"text":"Less obedience was extracted from subjects in this case.","entities":[{"start":34,"end":42,"label":"OBJECT","text":"subjects"},{"start":5,"end":14,"label":"SUBJECT","text":"obedience"}],"label":"Other"}
{"text":"My dog has a fever from allergies he was given clavamox and a shot.","entities":[{"start":13,"end":18,"label":"OBJECT","text":"fever"},{"start":24,"end":33,"label":"SUBJECT","text":"allergies"}],"label":"Cause-Effect(e2,e1)"}
{"text":"The invisible hand, also known as the invisible hand of the market, is a metaphor first coined by the economist in The Theory of Moral Sentiments.","entities":[{"start":102,"end":111,"label":"OBJECT","text":"economist"},{"start":73,"end":81,"label":"SUBJECT","text":"metaphor"}],"label":"Product-Producer(e1,e2)"}
{"text":"The foundry utilizes the best horizontal parted molding line for the manufacturing of street castings and features the best environmental control technology available.","entities":[{"start":4,"end":11,"label":"OBJECT","text":"foundry"},{"start":93,"end":101,"label":"SUBJECT","text":"castings"}],"label":"Product-Producer(e2,e1)"}
{"text":"Ten-year-old Huynh Thanh Tung was fortunate to survive when the tiny war relic burst into a ball of flames and flying metal as he stuffed the bomb into a bottle.","entities":[{"start":154,"end":160,"label":"OBJECT","text":"bottle"},{"start":142,"end":146,"label":"SUBJECT","text":"bomb"}],"label":"Entity-Destination(e1,e2)"}
{"text":"This method increases the ship's efficiency through drag reduction while also protecting the ocean from biocides that may leak.","entities":[{"start":5,"end":11,"label":"OBJECT","text":"method"},{"start":57,"end":66,"label":"SUBJECT","text":"reduction"}],"label":"Component-Whole(e2,e1)"}
{"text":"Suicide is one of the leading causes of death among pre-adolescents and teens, and victims of bullying are at an increased risk for committing suicide.","entities":[{"start":40,"end":45,"label":"OBJECT","text":"death"},{"start":0,"end":7,"label":"SUBJECT","text":"Suicide"}],"label":"Cause-Effect(e1,e2)"}
{"text":"The decline has been caused by the immigration of lower ability immigrants.","entities":[{"start":4,"end":11,"label":"OBJECT","text":"decline"},{"start":35,"end":46,"label":"SUBJECT","text":"immigration"}],"label":"Cause-Effect(e2,e1)"}
{"text":"Sean Patrick Flannery and Rod Taylor star in this horrific tale of a small town overrun by a conspiracy of flesh eating ravens.","entities":[{"start":93,"end":103,"label":"OBJECT","text":"conspiracy"},{"start":120,"end":126,"label":"SUBJECT","text":"ravens"}],"label":"Member-Collection(e2,e1)"}
{"text":"Brake cable anchor bolts are the most important fasteners on a bicycle.","entities":[{"start":0,"end":5,"label":"OBJECT","text":"Brake"},{"start":6,"end":11,"label":"SUBJECT","text":"cable"}],"label":"Component-Whole(e2,e1)"}
{"text":"Many builders have approached the colony's building committee for redevelopment projects.","entities":[{"start":43,"end":61,"label":"OBJECT","text":"building committee"},{"start":5,"end":13,"label":"SUBJECT","text":"builders"}],"label":"Entity-Destination(e1,e2)"}
{"text":"Because some of these terms are used in the case study chapters later in the book, they are defined here now.","entities":[{"start":77,"end":81,"label":"OBJECT","text":"book"},{"start":55,"end":63,"label":"SUBJECT","text":"chapters"}],"label":"Component-Whole(e1,e2)"}
{"text":"Miss Clockheart wears a silver heart around her neck with a clock inside.","entities":[{"start":24,"end":36,"label":"OBJECT","text":"silver heart"},{"start":60,"end":65,"label":"SUBJECT","text":"clock"}],"label":"Component-Whole(e2,e1)"}
{"text":"On the other hand, sentry tools are used by sentries in order to defend against spies.","entities":[{"start":44,"end":52,"label":"OBJECT","text":"sentries"},{"start":26,"end":31,"label":"SUBJECT","text":"tools"}],"label":"Instrument-Agency(e1,e2)"}
{"text":"The curvature of the piece was originally from a small bowl or cup.","entities":[{"start":55,"end":59,"label":"OBJECT","text":"bowl"},{"start":4,"end":13,"label":"SUBJECT","text":"curvature"}],"label":"Other"}
{"text":"The students labelled the 13 colonies using a map.","entities":[{"start":4,"end":12,"label":"OBJECT","text":"students"},{"start":46,"end":49,"label":"SUBJECT","text":"map"}],"label":"Instrument-Agency(e2,e1)"}
{"text":"The Mother Superior is a member of the corporation.","entities":[{"start":39,"end":50,"label":"OBJECT","text":"corporation"},{"start":4,"end":19,"label":"SUBJECT","text":"Mother Superior"}],"label":"Member-Collection(e1,e2)"}
{"text":"The president has made taxes and spending the big issues again.","entities":[{"start":23,"end":28,"label":"OBJECT","text":"taxes"},{"start":4,"end":13,"label":"SUBJECT","text":"president"}],"label":"Other"}
{"text":"The stapler comprises a stapling head (2) and an anvil (3).","entities":[{"start":4,"end":11,"label":"OBJECT","text":"stapler"},{"start":49,"end":54,"label":"SUBJECT","text":"anvil"}],"label":"Component-Whole(e2,e1)"}
{"text":"The weapon was hidden in what appears to be a mobile phone.","entities":[{"start":46,"end":58,"label":"OBJECT","text":"mobile phone"},{"start":4,"end":10,"label":"SUBJECT","text":"weapon"}],"label":"Content-Container(e1,e2)"}
{"text":"The original santur was made with tree bark, stones and stringed with goat intestines.","entities":[{"start":39,"end":43,"label":"OBJECT","text":"bark"},{"start":13,"end":19,"label":"SUBJECT","text":"santur"}],"label":"Other"}
{"text":"The housing encloses a double sealed ball bearing, with a lower lip seal for additional protection.","entities":[{"start":42,"end":49,"label":"OBJECT","text":"bearing"},{"start":4,"end":11,"label":"SUBJECT","text":"housing"}],"label":"Other"}
{"text":"A person has just arrived from an affected country and developed flu-like symptoms.","entities":[{"start":43,"end":50,"label":"OBJECT","text":"country"},{"start":2,"end":8,"label":"SUBJECT","text":"person"}],"label":"Entity-Origin(e1,e2)"}
{"text":"The aim of this paper is to present a model for the determination of the monetary values.","entities":[{"start":38,"end":43,"label":"OBJECT","text":"model"},{"start":16,"end":21,"label":"SUBJECT","text":"paper"}],"label":"Message-Topic(e1,e2)"}
{"text":"The infant was born in a condition of shock and died in ten minutes.","entities":[{"start":25,"end":34,"label":"OBJECT","text":"condition"},{"start":4,"end":10,"label":"SUBJECT","text":"infant"}],"label":"Other"}
{"text":"Semi-structured interviews are used by researchers in order to acquire an agent-informed account of policy processes.","entities":[{"start":39,"end":50,"label":"OBJECT","text":"researchers"},{"start":16,"end":26,"label":"SUBJECT","text":"interviews"}],"label":"Instrument-Agency(e1,e2)"}
{"text":"The weather is a constant topic of conversation, especially of course when it comes to climate change.","entities":[{"start":4,"end":11,"label":"OBJECT","text":"weather"},{"start":35,"end":47,"label":"SUBJECT","text":"conversation"}],"label":"Message-Topic(e2,e1)"}
{"text":"Pam Court added to the debate pointing out the need for investment in primary care as part of the long term strategy.","entities":[{"start":47,"end":51,"label":"OBJECT","text":"need"},{"start":23,"end":29,"label":"SUBJECT","text":"debate"}],"label":"Other"}
{"text":"Many of the passengers took the shuttle to town and turned around in ten minutes retreating back to the comfort of the air-conditioned ship.","entities":[{"start":12,"end":22,"label":"OBJECT","text":"passengers"},{"start":32,"end":39,"label":"SUBJECT","text":"shuttle"}],"label":"Instrument-Agency(e2,e1)"}
{"text":"Because of the air pressure, the objects sank into the sand.","entities":[{"start":55,"end":59,"label":"OBJECT","text":"sand"},{"start":33,"end":40,"label":"SUBJECT","text":"objects"}],"label":"Entity-Destination(e1,e2)"}
{"text":"She and colleagues exhaustively tested the sample, sequencing the proteins they found with a new and better mass spectrometer.","entities":[{"start":8,"end":18,"label":"OBJECT","text":"colleagues"},{"start":113,"end":125,"label":"SUBJECT","text":"spectrometer"}],"label":"Instrument-Agency(e2,e1)"}
{"text":"Our political prisoner is falling into oblivion.","entities":[{"start":39,"end":47,"label":"OBJECT","text":"oblivion"},{"start":14,"end":22,"label":"SUBJECT","text":"prisoner"}],"label":"Other"}
{"text":"The moisturizers' primary function is to keep skin moist, minimize wrinkles from dryness, smoothe and soften skin, and to deliver other ingredients, like sunscreen, that benefit the skin.","entities":[{"start":67,"end":75,"label":"OBJECT","text":"wrinkles"},{"start":81,"end":88,"label":"SUBJECT","text":"dryness"}],"label":"Cause-Effect(e2,e1)"}
{"text":"The most suitable callus to establish suspension cell cultures was obtained from seeds.","entities":[{"start":81,"end":86,"label":"OBJECT","text":"seeds"},{"start":18,"end":24,"label":"SUBJECT","text":"callus"}],"label":"Entity-Origin(e1,e2)"}
{"text":"Upon completion of the activity, the employee supervises the exit of the group from the facility.","entities":[{"start":88,"end":96,"label":"OBJECT","text":"facility"},{"start":73,"end":78,"label":"SUBJECT","text":"group"}],"label":"Entity-Origin(e1,e2)"}
{"text":"His site shows some pottery by well known potters.","entities":[{"start":42,"end":49,"label":"OBJECT","text":"potters"},{"start":20,"end":27,"label":"SUBJECT","text":"pottery"}],"label":"Product-Producer(e1,e2)"}
{"text":"The point of the article is that food forms an important part of CNY.","entities":[{"start":33,"end":37,"label":"OBJECT","text":"food"},{"start":17,"end":24,"label":"SUBJECT","text":"article"}],"label":"Message-Topic(e1,e2)"}
{"text":"Professional painters use a 5-gallon bucket with a roller screen.","entities":[{"start":13,"end":21,"label":"OBJECT","text":"painters"},{"start":37,"end":43,"label":"SUBJECT","text":"bucket"}],"label":"Instrument-Agency(e2,e1)"}
{"text":"Additionally, his record as a Vietnam veteran has been documented in a recent book.","entities":[{"start":18,"end":24,"label":"OBJECT","text":"record"},{"start":78,"end":82,"label":"SUBJECT","text":"book"}],"label":"Message-Topic(e2,e1)"}
{"text":"A woman was recovering from a bullet wound after she was caught in the cross-fire of a shootout.","entities":[{"start":37,"end":42,"label":"OBJECT","text":"wound"},{"start":2,"end":7,"label":"SUBJECT","text":"woman"}],"label":"Other"}
{"text":"As delegates gather in Copenhagen for the UN climate summit, a new poll shows growing concern for climate change.","entities":[{"start":98,"end":112,"label":"OBJECT","text":"climate change"},{"start":86,"end":93,"label":"SUBJECT","text":"concern"}],"label":"Other"}
{"text":"The design unveiled yesterday by the architects is on a more human scale than the American and Spanish projects.","entities":[{"start":37,"end":47,"label":"OBJECT","text":"architects"},{"start":4,"end":10,"label":"SUBJECT","text":"design"}],"label":"Product-Producer(e1,e2)"}
{"text":"I carried a bag with condoms in it, and I gave them out.","entities":[{"start":12,"end":15,"label":"OBJECT","text":"bag"},{"start":21,"end":28,"label":"SUBJECT","text":"condoms"}],"label":"Content-Container(e2,e1)"}
{"text":"A University of Washington system named Hubble looks for these black holes and maps them on a Web site, providing an ever-changing constellation of the Internet's weak points.","entities":[{"start":168,"end":174,"label":"OBJECT","text":"points"},{"start":131,"end":144,"label":"SUBJECT","text":"constellation"}],"label":"Other"}
{"text":"I joined the group which took the bus to Jura House Gardens for the start of our walk.","entities":[{"start":13,"end":18,"label":"OBJECT","text":"group"},{"start":34,"end":37,"label":"SUBJECT","text":"bus"}],"label":"Instrument-Agency(e2,e1)"}
{"text":"Hundreds of years ago the island was almost discovered by an explorer called Marco Polo.","entities":[{"start":61,"end":69,"label":"OBJECT","text":"explorer"},{"start":26,"end":32,"label":"SUBJECT","text":"island"}],"label":"Other"}
{"text":"Sorcha, the seventh daughter of a seventh son, had to save her brothers from their stepmother, who turned them into swans for many years.","entities":[{"start":83,"end":93,"label":"OBJECT","text":"stepmother"},{"start":116,"end":121,"label":"SUBJECT","text":"swans"}],"label":"Product-Producer(e2,e1)"}
{"text":"The other shows the goddess of justice as blindfolded, with a sword by her side.","entities":[{"start":20,"end":27,"label":"OBJECT","text":"goddess"},{"start":62,"end":67,"label":"SUBJECT","text":"sword"}],"label":"Instrument-Agency(e2,e1)"}
{"text":"The cup was inside a 9ft oak coffin, carved from a single tree trunk.","entities":[{"start":25,"end":35,"label":"OBJECT","text":"oak coffin"},{"start":4,"end":7,"label":"SUBJECT","text":"cup"}],"label":"Content-Container(e1,e2)"}
{"text":"The kidneys were placed into wild-type hosts.","entities":[{"start":39,"end":44,"label":"OBJECT","text":"hosts"},{"start":4,"end":11,"label":"SUBJECT","text":"kidneys"}],"label":"Entity-Destination(e1,e2)"}
{"text":"The first mathematician derived the new formula for the sum of the fourth power using a method that is readily general for determining the general formula for the sum of any integral powers.","entities":[{"start":10,"end":23,"label":"OBJECT","text":"mathematician"},{"start":40,"end":47,"label":"SUBJECT","text":"formula"}],"label":"Product-Producer(e2,e1)"}
{"text":"The breakdown of the linear relation of J,1 D at peakeffect region indicates that the peakeffect originates from an addition pinning effect.","entities":[{"start":86,"end":96,"label":"OBJECT","text":"peakeffect"},{"start":133,"end":139,"label":"SUBJECT","text":"effect"}],"label":"Cause-Effect(e2,e1)"}
{"text":"Sunflower oil is obtained by extracting oil from sunflower seeds.","entities":[{"start":0,"end":9,"label":"OBJECT","text":"Sunflower"},{"start":10,"end":13,"label":"SUBJECT","text":"oil"}],"label":"Entity-Origin(e2,e1)"}
{"text":"In recent years, opinions on classical drive theory have fallen into contending groups.","entities":[{"start":80,"end":86,"label":"OBJECT","text":"groups"},{"start":17,"end":25,"label":"SUBJECT","text":"opinions"}],"label":"Member-Collection(e1,e2)"}
{"text":"The Dyna-Cam engine originally came from a design by the Blazer brothers, who worked for Studebaker in 1916.","entities":[{"start":64,"end":72,"label":"OBJECT","text":"brothers"},{"start":43,"end":49,"label":"SUBJECT","text":"design"}],"label":"Product-Producer(e1,e2)"}
{"text":"Diet fizzy drinks and meat cause heart disease and diabetes.","entities":[{"start":51,"end":59,"label":"OBJECT","text":"diabetes"},{"start":11,"end":17,"label":"SUBJECT","text":"drinks"}],"label":"Cause-Effect(e1,e2)"}
{"text":"Those who staged the coup appointed a civilian prime minister and a cabinet of civilian technocrats.","entities":[{"start":68,"end":75,"label":"OBJECT","text":"cabinet"},{"start":88,"end":99,"label":"SUBJECT","text":"technocrats"}],"label":"Member-Collection(e2,e1)"}
{"text":"She double clicked the mouse button by placing her finger on the left mouse-button and then quickly pressing and releasing the button two times.","entities":[{"start":23,"end":28,"label":"OBJECT","text":"mouse"},{"start":29,"end":35,"label":"SUBJECT","text":"button"}],"label":"Component-Whole(e2,e1)"}
{"text":"The second example was about memory allocation functions.","entities":[{"start":47,"end":56,"label":"OBJECT","text":"functions"},{"start":11,"end":18,"label":"SUBJECT","text":"example"}],"label":"Message-Topic(e1,e2)"}
{"text":"In summer 2000, an Adventist church in Polotsk, Vitebsk Region, was damaged by a fire started with flammable liquids.","entities":[{"start":81,"end":85,"label":"OBJECT","text":"fire"},{"start":99,"end":116,"label":"SUBJECT","text":"flammable liquids"}],"label":"Cause-Effect(e2,e1)"}
{"text":"South Bade residents have been blown back into primitive lifestyle.","entities":[{"start":57,"end":66,"label":"OBJECT","text":"lifestyle"},{"start":11,"end":20,"label":"SUBJECT","text":"residents"}],"label":"Other"}
{"text":"The social worker has placed the girl into the loving family of a lawyer.","entities":[{"start":54,"end":60,"label":"OBJECT","text":"family"},{"start":33,"end":37,"label":"SUBJECT","text":"girl"}],"label":"Entity-Destination(e1,e2)"}
{"text":"The company has moved into mobile software applications, which connect to enterprise databases.","entities":[{"start":27,"end":55,"label":"OBJECT","text":"mobile software applications"},{"start":4,"end":11,"label":"SUBJECT","text":"company"}],"label":"Other"}
{"text":"The wastes leaked from these tanks have been in contact with surrounding soils and vadose sediments for decades and have undergone significant geochemical and radiological transformations.","entities":[{"start":29,"end":34,"label":"OBJECT","text":"tanks"},{"start":4,"end":10,"label":"SUBJECT","text":"wastes"}],"label":"Entity-Origin(e1,e2)"}
{"text":"The cocaine was concealed inside a teddy bear.","entities":[{"start":35,"end":45,"label":"OBJECT","text":"teddy bear"},{"start":4,"end":11,"label":"SUBJECT","text":"cocaine"}],"label":"Content-Container(e1,e2)"}
{"text":"Your upload has been added to the system.","entities":[{"start":34,"end":40,"label":"OBJECT","text":"system"},{"start":5,"end":11,"label":"SUBJECT","text":"upload"}],"label":"Entity-Destination(e1,e2)"}
{"text":"The dentate gyrus is a part of the hippocampus, the main memory structure, and has been shown to play a role in the forming of new memories.","entities":[{"start":35,"end":46,"label":"OBJECT","text":"hippocampus"},{"start":12,"end":17,"label":"SUBJECT","text":"gyrus"}],"label":"Component-Whole(e1,e2)"}
{"text":"This is the second Italian championship won by Woody with horses bred in his stud.","entities":[{"start":77,"end":81,"label":"OBJECT","text":"stud"},{"start":58,"end":64,"label":"SUBJECT","text":"horses"}],"label":"Other"}
{"text":"A test payment was put into my bank account on October 13th.","entities":[{"start":36,"end":43,"label":"OBJECT","text":"account"},{"start":7,"end":14,"label":"SUBJECT","text":"payment"}],"label":"Entity-Destination(e1,e2)"}
{"text":"Pink Kodiak is coming in like a rake of colts.","entities":[{"start":32,"end":36,"label":"OBJECT","text":"rake"},{"start":40,"end":45,"label":"SUBJECT","text":"colts"}],"label":"Member-Collection(e2,e1)"}
{"text":"Each year, many infants and toddlers die due to suffocation from breathing small objects into their breathing passages and lungs.","entities":[{"start":48,"end":59,"label":"OBJECT","text":"suffocation"},{"start":65,"end":74,"label":"SUBJECT","text":"breathing"}],"label":"Cause-Effect(e2,e1)"}
{"text":"The full featured keyboards had keys 4 times bigger than the traditional keyboard.","entities":[{"start":18,"end":27,"label":"OBJECT","text":"keyboards"},{"start":32,"end":36,"label":"SUBJECT","text":"keys"}],"label":"Component-Whole(e2,e1)"}
{"text":"We present a perception driven autonomous urban vehicle.","entities":[{"start":48,"end":55,"label":"OBJECT","text":"vehicle"},{"start":13,"end":23,"label":"SUBJECT","text":"perception"}],"label":"Instrument-Agency(e1,e2)"}
{"text":"The turtle was slowly pushing the jellyfish in front of his mouth (in the manner of a water-polo player controlling a ball), keeping his prey steady with his flippers.","entities":[{"start":4,"end":10,"label":"OBJECT","text":"turtle"},{"start":60,"end":65,"label":"SUBJECT","text":"mouth"}],"label":"Component-Whole(e2,e1)"}
{"text":"That box was in a chest that had been locked since at least the early 1800s.","entities":[{"start":18,"end":23,"label":"OBJECT","text":"chest"},{"start":5,"end":8,"label":"SUBJECT","text":"box"}],"label":"Content-Container(e1,e2)"}
{"text":"The press release from the respondent's counsel describing the settlement is here.","entities":[{"start":40,"end":47,"label":"OBJECT","text":"counsel"},{"start":4,"end":17,"label":"SUBJECT","text":"press release"}],"label":"Entity-Origin(e1,e2)"}
{"text":"His deeds have thrown thousands of people into eternal financial damnation.","entities":[{"start":65,"end":74,"label":"OBJECT","text":"damnation"},{"start":35,"end":41,"label":"SUBJECT","text":"people"}],"label":"Other"}
{"text":"Boslough and colleagues achieved fame more than a decade ago by accurately predicting that that the fireball caused by the intersection of the comet Shoemaker-Levy 9 with Jupiter is observable from Earth.","entities":[{"start":100,"end":108,"label":"OBJECT","text":"fireball"},{"start":123,"end":135,"label":"SUBJECT","text":"intersection"}],"label":"Cause-Effect(e2,e1)"}
{"text":"The piper made many recordings, including an album called The King of the Highland Pipers.","entities":[{"start":4,"end":9,"label":"OBJECT","text":"piper"},{"start":45,"end":50,"label":"SUBJECT","text":"album"}],"label":"Product-Producer(e2,e1)"}
{"text":"The item is engraved with the English author's initials.","entities":[{"start":47,"end":55,"label":"OBJECT","text":"initials"},{"start":38,"end":44,"label":"SUBJECT","text":"author"}],"label":"Other"}
{"text":"A senior UN official sacked earlier this year had drawn up plans to depose Afghanistan's president Hamid Karzai.","entities":[{"start":12,"end":20,"label":"OBJECT","text":"official"},{"start":59,"end":64,"label":"SUBJECT","text":"plans"}],"label":"Product-Producer(e2,e1)"}
{"text":"Even the fan blades inside the engine are designed to be quieter.","entities":[{"start":31,"end":37,"label":"OBJECT","text":"engine"},{"start":13,"end":19,"label":"SUBJECT","text":"blades"}],"label":"Component-Whole(e1,e2)"}
{"text":"There are enough gills there to serve the oxygen demands of an entire shiver of whale sharks.","entities":[{"start":70,"end":76,"label":"OBJECT","text":"shiver"},{"start":86,"end":92,"label":"SUBJECT","text":"sharks"}],"label":"Member-Collection(e2,e1)"}
{"text":"I was lucky enough to see with my own eyes the recent stock-market crash, where they lost several million dollars, a rabble of dead money that went sliding off into the sea.","entities":[{"start":132,"end":137,"label":"OBJECT","text":"money"},{"start":117,"end":123,"label":"SUBJECT","text":"rabble"}],"label":"Other"}
{"text":"This machine was in a suitcase that was the size of a carry-on bag and weighed less than 10 pounds.","entities":[{"start":22,"end":30,"label":"OBJECT","text":"suitcase"},{"start":5,"end":12,"label":"SUBJECT","text":"machine"}],"label":"Content-Container(e1,e2)"}
{"text":"The scintillator material produces visible light when transversed by the particle's radiated energy.","entities":[{"start":35,"end":48,"label":"OBJECT","text":"visible light"},{"start":4,"end":25,"label":"SUBJECT","text":"scintillator material"}],"label":"Cause-Effect(e1,e2)"}
{"text":"At the same time, the government carefully chose the facts that it gave to the newspapers.","entities":[{"start":22,"end":32,"label":"OBJECT","text":"government"},{"start":53,"end":58,"label":"SUBJECT","text":"facts"}],"label":"Instrument-Agency(e2,e1)"}
{"text":"Autonomic imbalance is one of the multifactorial causes of essential hypertension currently.","entities":[{"start":69,"end":81,"label":"OBJECT","text":"hypertension"},{"start":0,"end":19,"label":"SUBJECT","text":"Autonomic imbalance"}],"label":"Cause-Effect(e1,e2)"}
{"text":"Sudden death from inhalation of petroleum distillates is well recognised in misuses of volatile substances.","entities":[{"start":7,"end":12,"label":"OBJECT","text":"death"},{"start":18,"end":28,"label":"SUBJECT","text":"inhalation"}],"label":"Cause-Effect(e2,e1)"}
{"text":"Since the evacuation was after normal business hours, the on-duty Security Officer and maintenance personnel were responsible for the notification and evacuation of occupants of all buildings.","entities":[{"start":38,"end":52,"label":"OBJECT","text":"business hours"},{"start":10,"end":20,"label":"SUBJECT","text":"evacuation"}],"label":"Other"}
{"text":"This Pacific Chorus frog was found in a Christmas tree being sold in Anchorage, Alaska.","entities":[{"start":50,"end":54,"label":"OBJECT","text":"tree"},{"start":20,"end":24,"label":"SUBJECT","text":"frog"}],"label":"Other"}
{"text":"The day-old baby was taken into intensive care.","entities":[{"start":32,"end":46,"label":"OBJECT","text":"intensive care"},{"start":12,"end":16,"label":"SUBJECT","text":"baby"}],"label":"Other"}
{"text":"Most of the essays originated in writing workshops run by the literary magazine Tin House.","entities":[{"start":41,"end":50,"label":"OBJECT","text":"workshops"},{"start":12,"end":18,"label":"SUBJECT","text":"essays"}],"label":"Entity-Origin(e1,e2)"}
{"text":"This document reflects the best browser settings for use with a Macintosh system.","entities":[{"start":40,"end":48,"label":"OBJECT","text":"settings"},{"start":5,"end":13,"label":"SUBJECT","text":"document"}],"label":"Message-Topic(e1,e2)"}
{"text":"Naturally, they get taken in by a sorority of misfits who teach them that what's on the inside is more important than being cute.","entities":[{"start":34,"end":42,"label":"OBJECT","text":"sorority"},{"start":46,"end":53,"label":"SUBJECT","text":"misfits"}],"label":"Member-Collection(e2,e1)"}
{"text":"The report investigates migration in the context of demographic changes and trends in both growth and inequality.","entities":[{"start":24,"end":33,"label":"OBJECT","text":"migration"},{"start":4,"end":10,"label":"SUBJECT","text":"report"}],"label":"Message-Topic(e1,e2)"}
{"text":"Since the PN signal is generated by an algorithm, knowledge of the algorithm reveals the entire sequence.","entities":[{"start":13,"end":19,"label":"OBJECT","text":"signal"},{"start":39,"end":48,"label":"SUBJECT","text":"algorithm"}],"label":"Cause-Effect(e2,e1)"}
{"text":"Lee's movies have examined race relations, the role of media in contemporary life, urban crime and poverty, and other political issues.","entities":[{"start":27,"end":41,"label":"OBJECT","text":"race relations"},{"start":6,"end":12,"label":"SUBJECT","text":"movies"}],"label":"Message-Topic(e1,e2)"}
{"text":"MEP center specialists provide an array of services to companies, from initial assessments prioritizing opportunities for improvement, to implementation projects guiding companies through process improvements, productivity increases, and growth.","entities":[{"start":34,"end":39,"label":"OBJECT","text":"array"},{"start":43,"end":51,"label":"SUBJECT","text":"services"}],"label":"Member-Collection(e2,e1)"}
{"text":"Given the choice, I much prefer to have products with natural ingredient than have a bottle full of chemicals.","entities":[{"start":85,"end":91,"label":"OBJECT","text":"bottle"},{"start":100,"end":109,"label":"SUBJECT","text":"chemicals"}],"label":"Content-Container(e2,e1)"}
{"text":"The clutter in my house was destroying me.","entities":[{"start":18,"end":23,"label":"OBJECT","text":"house"},{"start":4,"end":11,"label":"SUBJECT","text":"clutter"}],"label":"Other"}
{"text":"Several authors have inserted implants into bone that have been subject to higher radiation doses.","entities":[{"start":44,"end":48,"label":"OBJECT","text":"bone"},{"start":30,"end":38,"label":"SUBJECT","text":"implants"}],"label":"Entity-Destination(e1,e2)"}
{"text":"Jessica Simpson's \"A Public Affair\" video features a group of stars from movies and TV.","entities":[{"start":73,"end":79,"label":"OBJECT","text":"movies"},{"start":62,"end":67,"label":"SUBJECT","text":"stars"}],"label":"Entity-Origin(e1,e2)"}
{"text":"Theocritus was born in Syracuse, Sicily, spent time on the island of Kos and was also a member of the pleiad of Alexandrian poets under Ptolemy II in Alexandria.","entities":[{"start":102,"end":108,"label":"OBJECT","text":"pleiad"},{"start":124,"end":129,"label":"SUBJECT","text":"poets"}],"label":"Member-Collection(e2,e1)"}
{"text":"A letter penned by George Washington praising the new Constitution sold for $3.2 million at an auction, the highest price for a letter by America's first president.","entities":[{"start":154,"end":163,"label":"OBJECT","text":"president"},{"start":128,"end":134,"label":"SUBJECT","text":"letter"}],"label":"Product-Producer(e1,e2)"}
{"text":"The Police has beaten him up, poured water into his ears and nose, and stuffed a shoe in his mouth.","entities":[{"start":52,"end":56,"label":"OBJECT","text":"ears"},{"start":37,"end":42,"label":"SUBJECT","text":"water"}],"label":"Entity-Destination(e1,e2)"}
{"text":"The subject was taken into custody for trespassing.","entities":[{"start":27,"end":34,"label":"OBJECT","text":"custody"},{"start":4,"end":11,"label":"SUBJECT","text":"subject"}],"label":"Other"}
{"text":"With medical ghostwriting, pharmaceutical companies pay both professional writers to produce papers and then pay other scientists or physicans to attach their names to these papers before they are published in a medical or scientific journals.","entities":[{"start":74,"end":81,"label":"OBJECT","text":"writers"},{"start":93,"end":99,"label":"SUBJECT","text":"papers"}],"label":"Product-Producer(e2,e1)"}
{"text":"A nice, big bowl of homemade vegetable soup is one of the best ways to get a lot of the veggies you need all in one dish.","entities":[{"start":29,"end":38,"label":"OBJECT","text":"vegetable"},{"start":39,"end":43,"label":"SUBJECT","text":"soup"}],"label":"Entity-Origin(e2,e1)"}
{"text":"The complement system is important as part of the body's defense mechanism against infection (Fig. 8.2).","entities":[{"start":57,"end":74,"label":"OBJECT","text":"defense mechanism"},{"start":15,"end":21,"label":"SUBJECT","text":"system"}],"label":"Component-Whole(e1,e2)"}
{"text":"Sharpening stones, water stones or whetstones are used to grind and hone the edges of steel tools and implements.","entities":[{"start":11,"end":17,"label":"OBJECT","text":"stones"},{"start":0,"end":10,"label":"SUBJECT","text":"Sharpening"}],"label":"Other"}
{"text":"The presidential candidate arrived to the cheering crowd at Fort Hood.","entities":[{"start":51,"end":56,"label":"OBJECT","text":"crowd"},{"start":17,"end":26,"label":"SUBJECT","text":"candidate"}],"label":"Entity-Destination(e1,e2)"}
{"text":"The spreading riots threw the country into turmoil.","entities":[{"start":43,"end":50,"label":"OBJECT","text":"turmoil"},{"start":30,"end":37,"label":"SUBJECT","text":"country"}],"label":"Other"}
{"text":"The European Ombudsman, P. Nikiforos Diamandouros, has asked the European Commission to correct an administrative error concerning fishing quotas in the West of Scotland.","entities":[{"start":139,"end":145,"label":"OBJECT","text":"quotas"},{"start":114,"end":119,"label":"SUBJECT","text":"error"}],"label":"Other"}
{"text":"He placed the ashes in a jar and divided them equally into eight portions.","entities":[{"start":25,"end":28,"label":"OBJECT","text":"jar"},{"start":14,"end":19,"label":"SUBJECT","text":"ashes"}],"label":"Entity-Destination(e1,e2)"}
{"text":"The day was declared a public holiday, and at noon the train started from the gaily decorated station.","entities":[{"start":94,"end":101,"label":"OBJECT","text":"station"},{"start":55,"end":60,"label":"SUBJECT","text":"train"}],"label":"Entity-Origin(e1,e2)"}
{"text":"One of the largest Internet piracy rings in the world has been shut down in a police operation that resulted in the arrest of 181 people.","entities":[{"start":116,"end":122,"label":"OBJECT","text":"arrest"},{"start":85,"end":94,"label":"SUBJECT","text":"operation"}],"label":"Cause-Effect(e1,e2)"}
{"text":"Hogarth also decorated the walls of the hospital with works of art donated by contemporary British artists.","entities":[{"start":40,"end":48,"label":"OBJECT","text":"hospital"},{"start":27,"end":32,"label":"SUBJECT","text":"walls"}],"label":"Component-Whole(e1,e2)"}
{"text":"In a similar context, this circuit has followed the rule that reinstatement is a basic element of the appropriate remedy in wrongful employee discharge cases.","entities":[{"start":114,"end":120,"label":"OBJECT","text":"remedy"},{"start":62,"end":75,"label":"SUBJECT","text":"reinstatement"}],"label":"Component-Whole(e1,e2)"}
reader_params = {'lines': True, 'orient': 'records'}
train_ds = DataSource(
source=f"{DATA_PATH}train.json",
mapping={'text': 'text', 'entities': 'entities', 'label': 'label'}, # TODO: default_mapping feat has issues when having several optional params
**reader_params
)
2020-09-25 11:08:27,121 - allennlp.training.tensorboard_writer - INFO - Training | Validation
2020-09-25 11:08:27,123 - allennlp.training.tensorboard_writer - INFO - _rel/_fscore/Message-Topic_e1_e2_ | 0.000 | N/A
2020-09-25 11:08:27,126 - allennlp.training.tensorboard_writer - INFO - _rel/_fscore/Product-Producer_e2_e1_ | 0.667 | N/A
2020-09-25 11:08:27,128 - allennlp.training.tensorboard_writer - INFO - _rel/_precision/Message-Topic_e1_e2_ | 0.000 | N/A
2020-09-25 11:08:27,129 - allennlp.training.tensorboard_writer - INFO - _rel/_precision/Product-Producer_e2_e1_ | 0.500 | N/A
2020-09-25 11:08:27,131 - allennlp.training.tensorboard_writer - INFO - _rel/_recall/Message-Topic_e1_e2_ | 0.000 | N/A
2020-09-25 11:08:27,133 - allennlp.training.tensorboard_writer - INFO - _rel/_recall/Product-Producer_e2_e1_ | 1.000 | N/A
2020-09-25 11:08:27,134 - allennlp.training.tensorboard_writer - INFO - loss | 32.103 | N/A
2020-09-25 11:08:27,136 - allennlp.training.tensorboard_writer - INFO - ner/accuracy | 0.188 | N/A
2020-09-25 11:08:27,137 - allennlp.training.tensorboard_writer - INFO - ner/accuracy_1 | 0.188 | N/A
2020-09-25 11:08:27,139 - allennlp.training.tensorboard_writer - INFO - ner/f1-measure-OBJECT | 0.400 | N/A
2020-09-25 11:08:27,140 - allennlp.training.tensorboard_writer - INFO - ner/f1-measure-SUBJECT | 0.000 | N/A
2020-09-25 11:08:27,141 - allennlp.training.tensorboard_writer - INFO - ner/f1-measure-overall | 0.167 | N/A
2020-09-25 11:08:27,143 - allennlp.training.tensorboard_writer - INFO - ner/precision-OBJECT | 0.333 | N/A
2020-09-25 11:08:27,144 - allennlp.training.tensorboard_writer - INFO - ner/precision-SUBJECT | 0.000 | N/A
2020-09-25 11:08:27,145 - allennlp.training.tensorboard_writer - INFO - ner/precision-overall | 0.125 | N/A
2020-09-25 11:08:27,146 - allennlp.training.tensorboard_writer - INFO - ner/recall-OBJECT | 0.500 | N/A
2020-09-25 11:08:27,148 - allennlp.training.tensorboard_writer - INFO - ner/recall-SUBJECT | 0.000 | N/A
2020-09-25 11:08:27,149 - allennlp.training.tensorboard_writer - INFO - ner/recall-overall | 0.250 | N/A
2020-09-25 11:08:27,152 - allennlp.training.tensorboard_writer - INFO - rel/accuracy | 0.500 | N/A
2020-09-25 11:08:27,154 - allennlp.training.tensorboard_writer - INFO - rel/macro/fscore | 0.333 | N/A
2020-09-25 11:08:27,156 - allennlp.training.tensorboard_writer - INFO - rel/macro/precision | 0.250 | N/A
2020-09-25 11:08:27,159 - allennlp.training.tensorboard_writer - INFO - rel/macro/recall | 0.500 | N/A
2020-09-25 11:08:27,163 - allennlp.training.tensorboard_writer - INFO - rel/micro/fscore | 0.500 | N/A
2020-09-25 11:08:27,165 - allennlp.training.tensorboard_writer - INFO - rel/micro/precision | 0.500 | N/A
2020-09-25 11:08:27,166 - allennlp.training.tensorboard_writer - INFO - rel/micro/recall | 0.500 | N/A
2020-09-25 11:08:27,168 - allennlp.training.tensorboard_writer - INFO - worker_0_memory_MB | 4206.531 | N/A
2020-09-25 11:08:27,208 - allennlp.training.checkpointer - INFO - Best validation performance so far. Copying weights to 'runs/testing_multitask_full_v2/best.t
pipeline = Pipeline.from_config({
'name': 'relner_extraction',
'features': {
'word': {
'embedding_dim': 300,
}
},
'encoder': {
'type': 'lstm',
'bidirectional': True,
'hidden_size': 128
},
'head': {
'type': 'RelNer',
'rel': {
'labels':list(labels.value_counts().index),
'entities_embedder': {
'num_embeddings': 20,
'embedding_dim': 64
},
'pooler': {
'type': 'lstm',
'bidirectional': True,
'hidden_size': 64
},
},
'ner': {
'labels': ['OBJECT', 'SUBJECT']
},
}
})
from biome.text import Pipeline
pipe = Pipeline.from_pretrained('runs/testing_multitask_full/model.tar.gz')
pipe.predict(
'The ear of the African elephant is significantly larger--measuring 183 cm by 114 cm in the bush elephant.'
)
'''
{'logits': array([ 3.3793268 , -0.16657348, -3.64118 , -3.9743085 , -0.9529557 ,
-0.38334334, -0.07823397, 5.7748513 , -2.24652 , -0.05780419,
1.1937008 , -0.7791636 , -0.5403181 , -2.505346 , -3.2216177 ,
-5.1313906 , 2.365126 , 0.544214 , -4.704835 ], dtype=float32),
'tags': [['O',
'U-SUBJECT',
'O',
'O',
'O',
'U-OBJECT',
'O',
'O',
'O',
'O',
'O',
'O',
'O',
'O',
'O',
'O',
'O',
'O',
'O',
'U-SUBJECT',
'O']],
'probs': array([7.8852564e-02, 2.2743163e-03, 7.0444752e-05, 5.0486186e-05,
1.0359276e-03, 1.8310871e-03, 2.4843691e-03, 8.6532426e-01,
2.8414588e-04, 2.5356470e-03, 8.8636074e-03, 1.2325549e-03,
1.5650769e-03, 2.1934866e-04, 1.0716719e-04, 1.5872962e-05,
2.8599203e-02, 4.6295826e-03, 2.4316931e-05], dtype=float32),
'classes': {'Component-Whole(e1,e2)': tensor(0.8653),
'Other': tensor(0.0789),
'Instrument-Agency(e1,e2)': tensor(0.0286),
'Content-Container(e1,e2)': tensor(0.0089),
'Member-Collection(e1,e2)': tensor(0.0046),
'Instrument-Agency(e2,e1)': tensor(0.0025),
'Component-Whole(e2,e1)': tensor(0.0025),
'Entity-Destination(e1,e2)': tensor(0.0023),
'Message-Topic(e1,e2)': tensor(0.0018),
'Product-Producer(e1,e2)': tensor(0.0016),
'Cause-Effect(e1,e2)': tensor(0.0012),
'Entity-Origin(e1,e2)': tensor(0.0010),
'Product-Producer(e2,e1)': tensor(0.0003),
'Content-Container(e2,e1)': tensor(0.0002),
'Entity-Origin(e2,e1)': tensor(0.0001),
'Cause-Effect(e2,e1)': tensor(7.0445e-05),
'Member-Collection(e2,e1)': tensor(5.0486e-05),
'Entity-Destination(e2,e1)': tensor(2.4317e-05),
'Message-Topic(e2,e1)': tensor(1.5873e-05)},
'max_class': 'Component-Whole(e1,e2)',
'max_class_prob': tensor(0.8653),
'label': 'Component-Whole(e1,e2)',
'prob': tensor(0.8653)}
'''
from typing import Any, Dict, List, Optional, Union, cast
import torch
from allennlp.data import Instance, TextFieldTensors
from biome.text import vocabulary
from biome.text.backbone import ModelBackbone
from biome.text.modules.configuration import ComponentConfiguration
from biome.text.modules.heads.classification.classification import ClassificationHead
from biome.text.modules.heads.token_classification import (
TokenClassificationConfiguration,
)
from biome.text.modules.heads.classification.relation_classification import (
RelationClassificationConfiguration,
)
from .task_head import TaskOutput
class RelNer(ClassificationHead):
"""
Task head for multitask relation classification and NER
"""
def __init__(
self,
backbone: ModelBackbone,
rel: RelationClassificationConfiguration,
ner: TokenClassificationConfiguration,
) -> None:
super(RelNer, self).__init__(backbone, labels=rel.config["labels"])
self.rel = rel.compile(backbone=self.backbone)
# Just to show the idea:
# we need to setup different label namespaces otherwise they overwrite each other
# this should be handled in the `vocabulary` helper and each head.
vocabulary.LABELS_NAMESPACE = "entity_tags"
self.ner = ner.compile(backbone=self.backbone)
vocabulary.LABELS_NAMESPACE = "gold_labels"
def forward( # type: ignore
self,
text: TextFieldTensors,
entities: torch.IntTensor = None,
label: torch.IntTensor = None,
) -> TaskOutput:
# same as before
vocabulary.LABELS_NAMESPACE = "entity_tags"
ner_out = self.ner.forward(text, entities)
vocabulary.LABELS_NAMESPACE = "gold_labels"
if entities is None:
# at inference time, we get the entities from the NER head
entities = torch.LongTensor(
cast(List[List[int]], [paths[0][0] for paths in ner_out.k_tags])
)
rel_out = self.rel.forward(text, entities, label)
if label is not None:
rel_out.loss = rel_out.loss + ner_out.loss
# same as before
vocabulary.LABELS_NAMESPACE = "entity_tags"
ner_out = self.ner.decode(ner_out)
vocabulary.LABELS_NAMESPACE = "gold_labels"
rel_out.tags = ner_out.as_dict()["tags"]
# we probably want to merge TaskOutputs in a nicer way
return rel_out
def featurize(
self,
text: Any,
label: Optional[Union[int, str, List[Union[int, str]]]] = None,
entities: Optional[List[Dict]] = None,
) -> Optional[Instance]:
# not sure if we need ner.featurize for these heads as they are highly related
# and rel cls already provides what we need
instance_rel = self.rel.featurize(text, entities, label)
return instance_rel
def get_metrics(self, reset: bool = False) -> Dict[str, float]:
metrics = {
**{
f"{'_' if metric.startswith('_') else ''}rel/{metric}": value
for metric, value in self.rel.get_metrics(reset=reset).items()
},
**{
f"{'_' if metric.startswith('_') else ''}ner/{metric}": value
for metric, value in self.ner.get_metrics(reset=reset).items()
},
}
return metrics
class RelNerConfiguration(ComponentConfiguration[RelNer]):
"""Configuration for classification head components"""
pass
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment