31.07.2013 Views

Controlling logical scope in text generation

Controlling logical scope in text generation

Controlling logical scope in text generation

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

<strong>Controll<strong>in</strong>g</strong><strong>logical</strong><strong>scope</strong><strong>in</strong><strong>text</strong><strong>generation</strong><br />

RichardPower<br />

ITRI,UniversityofBrighton<br />

LewesRoad,BrightonBN24AT,UK<br />

Richard.Power@itri.bton.ac.uk<br />

Abstract<br />

ManyapplicationsofNaturalLanguageGen-<br />

erationemployobject-orientedknowledge<br />

representationformalismssuchasloom.<br />

Eachentity<strong>in</strong>thedoma<strong>in</strong>isrepresentedby<br />

anobjectbelong<strong>in</strong>gtoaspeciedclassand<br />

possess<strong>in</strong>gattributessuitableforthatclass.<br />

Froma<strong>logical</strong>viewpo<strong>in</strong>t,doma<strong>in</strong>entitiescor-<br />

respondtoexistentiallyquantiedvariables,<br />

buts<strong>in</strong>celoomandk<strong>in</strong>dredformalismspro-<br />

videnoscop<strong>in</strong>gmechanisms,ithastobeas-<br />

sumedthatallvariableshavewide<strong>scope</strong>.For<br />

technicalmaterial<strong>in</strong>clud<strong>in</strong>gconditional,neg-<br />

ativeormodalcon<strong>text</strong>sthisisaseriouslimi-<br />

tation.Wesuggestasimpleextensiontostan-<br />

dardobject-orientedformalismswhichallows<br />

encod<strong>in</strong>gof<strong>logical</strong><strong>scope</strong>,andshowhowlog-<br />

icallycomplexmaterialcanbeeditedus<strong>in</strong>g<br />

the`wysiwym'approach.<br />

1 Introduction<br />

ManyNaturalLanguageGeneration(nlg)<br />

applications(Parisetal.,1995;Bateman,<br />

1996)encodethecontentofthegenerated<br />

<strong>text</strong>s<strong>in</strong>anobject-orientedknowledgerepre-<br />

sentationformalism,suchasloom(MacGre-<br />

gorandBates,1987).Inloomandk<strong>in</strong>dred<br />

languages,adist<strong>in</strong>ctionismadebetweenthe<br />

`T-box',whichdenestheclassestowhichob-<br />

jectsmaybelong,andthe`A-box',whichde-<br />

ThisworkissupportedbytheEng<strong>in</strong>eer<strong>in</strong>gand<br />

PhysicalSciencesResearchCouncil(epsrc)Grant<br />

L77102.<br />

conta<strong>in</strong> cream<br />

patient<br />

SUBJECT OWNER<br />

OBJECT<br />

agent<br />

antiviral<br />

aciclovir<br />

NAME<br />

Figure1:A-boxforsimpleassertion<br />

scribesthepropertiesofspecicentitiesbe-<br />

long<strong>in</strong>gtotheseclasses.TheT-boxserves<br />

asanontologythatdeterm<strong>in</strong>esthesemantic<br />

coverageofthesystem;theA-boxrepresents<br />

thecontentofagenerated<strong>text</strong>,orperhaps<br />

awiderbodyofknowledgefromwhichthis<br />

contentisdrawn.<br />

Thesemanticnetwork<strong>in</strong>gure1showsa<br />

simpleA-boxunderly<strong>in</strong>gthesentence1:<br />

Yourcreamconta<strong>in</strong>sanantiviral<br />

agentcalledaciclovir<br />

Eachnodeofthenetworkrepresentsanen-<br />

tity;thenodelabelrepresentstheclassofthe<br />

entity;outgo<strong>in</strong>garcsrepresentitsproperties.<br />

Inalanguagelikeloom,theA-boxwouldbe<br />

encodedthroughasetofassertions:<br />

(tell(conta<strong>in</strong>u1)<br />

(subjectu1u2)<br />

(creamu2)<br />

(owneru2u3)<br />

1Throughoutthepaper,ourexampleswillbetaken<br />

fromthedoma<strong>in</strong>ofPatientInformationLeaets,the<br />

<strong>in</strong>structionslips<strong>in</strong>sidemedic<strong>in</strong>epackets.


(patientu3)<br />

(objectu1u4)<br />

(antiviral-agentu4)<br />

(nameu4u5)<br />

(acicloviru5))<br />

Howshouldsuchasetofassertionsbe<strong>in</strong>-<br />

terpreted<strong>logical</strong>ly?Theusualassumptionis<br />

thatthe`entities'u1,u2etc.(orthenodes<br />

<strong>in</strong>gure1)shouldbetreatedasexistentially<br />

quantiedvariableswithwide<strong>scope</strong>.Under<br />

thisassumption,thecontentoftheA-box<br />

couldberepresentedbyas<strong>in</strong>glepredicatecal-<br />

culusformula:<br />

[9u19u29u39u49u5conta<strong>in</strong>(u1)<br />

&subject(u1;u2)&cream(u2)<br />

&owner(u2;u3)&patient(u3)<br />

&object(u1;u4)&antiviral(u4)<br />

&name(u4;u5)&aciclovir(u5)]<br />

Sofarsogood,butwhathappenswhenan<br />

assertionconta<strong>in</strong>sanvariablewithnarrow<br />

<strong>scope</strong>?Thishappensoften<strong>in</strong><strong>in</strong>structional<br />

doma<strong>in</strong>ssuchaspatient<strong>in</strong>formationleaets,<br />

<strong>in</strong>whichconditional,negativeandmodalcon-<br />

<strong>text</strong>sabound.Considerforexamplethe<strong>in</strong>-<br />

struction<br />

Ifyoudeveloparash,youshould<br />

consultyourdoctor.<br />

forwhichaplausible<strong>logical</strong>formis<br />

[9p9ddoctor(p;d)&<br />

[[9rrash(r)&develop(p;r)]!<br />

2consult(p;d)]]<br />

Therashrcannotbeassignedwide<strong>scope</strong>here<br />

withoutimply<strong>in</strong>gthatitisa`real'entity,like<br />

thepatientandthedoctor,ratherthanahy-<br />

potheticalentityboundtotheantecedentof<br />

theconditional.<br />

Attemptshavebeenmadetogeneratesuch<br />

sentencesfromaloomknowledgebase.The<br />

penmanGeneralizedUpperModel(Bate-<br />

manetal.,1995)allowsabstractentities<br />

represent<strong>in</strong>g<strong>logical</strong>relations,byprovid<strong>in</strong>g<br />

classesequivalenttothe<strong>logical</strong>operatorsof<br />

implicationandobligation(theconcept<br />

CONSEQUENT<br />

ANTECEDENT<br />

develop consult<br />

ACTOR ACTEE<br />

ACTOR<br />

ACTEE<br />

CONTENT<br />

u0<br />

u1<br />

u2<br />

u3<br />

implication obligation<br />

OWNER<br />

u4<br />

rash<br />

u5<br />

patient<br />

u6<br />

doctor<br />

Figure2:A-boxforconditional<strong>in</strong>struction<br />

namesactuallyused<strong>in</strong>theUpperModelare<br />

<strong>logical</strong>-conditionandnecessity).AnA-<br />

boxthatapproximatelyrepresentsthemean-<br />

<strong>in</strong>goftheconditional<strong>in</strong>structioncanthere-<br />

forebedened,as<strong>in</strong>gure2.However,this<br />

A-boxfailsto<strong>in</strong>dicatethatthepatientand<br />

doctorentitieshavewide<strong>scope</strong>whilethe<br />

rashentityhasnarrow<strong>scope</strong>.<br />

Thispaperhastwoaims.First,wepropose<br />

asimplemethodbywhichanobject-oriented<br />

knowledgeformalismlikeloomcanbeaug-<br />

mented<strong>in</strong>ordertorepresent<strong>scope</strong>dist<strong>in</strong>c-<br />

tions.Secondly,weshowhowtheaugmented<br />

knowledgerepresentationcanbeeditedbythe<br />

`wysiwym'method(PowerandScott,1998;<br />

Scottetal.,1998),soallow<strong>in</strong>gauthorswho<br />

arenotlogiciansorknowledgeeng<strong>in</strong>eersto<br />

encode<strong>logical</strong>lycomplexknowledge.<br />

2 Logicalcon<strong>text</strong><br />

S<strong>in</strong>cethebeg<strong>in</strong>n<strong>in</strong>gofmodernlogic,net-<br />

workdiagramshavebeenemployedascon-<br />

venientrepresentationsof<strong>logical</strong>formwith<br />

implicitexistentialquantication.Pierce's<br />

ExistentialGraphs(Roberts,1973)were<strong>in</strong>-<br />

troduced<strong>in</strong>1897;accord<strong>in</strong>gtoSowa(1995)<br />

theyareformallyequivalenttoDiscourseRep-<br />

resentationStructures(drss)(Kamp,1981).<br />

Inbothnotations,scop<strong>in</strong>gassignmentsare<br />

madebyb<strong>in</strong>d<strong>in</strong>gentitiesandrelationshipsto<br />

<strong>logical</strong>con<strong>text</strong>s,representedby`ovalenclo-


sures'<strong>in</strong>ExistentialGraphsandby`boxes'<br />

(ordrss)<strong>in</strong>DiscourseRepresentationThe-<br />

ory(drt).Sowa'smoreelaborateConcep-<br />

tualGraphnotationrepresents<strong>logical</strong>con-<br />

<strong>text</strong>sthroughcomplex`proposition'nodes<br />

whichenclosesub-networks.Hendrix(1975)<br />

hasproposedasimilarnotation<strong>in</strong>whichthe<br />

nodesandarcsofasemanticnetworkareas-<br />

signedto`spaces',buts<strong>in</strong>ceheallowsthese<br />

spacestooverlap,hisdiagramscannotalways<br />

bedrawnunambiguouslyonaplane.<br />

Alltheserepresentationsarecapableof<br />

express<strong>in</strong>g<strong>scope</strong>dist<strong>in</strong>ctions,sothechoice<br />

amongthemisdictatedma<strong>in</strong>lybyconve-<br />

nience.Wewilladoptherethedrtframe-<br />

work,whichhasbeenemployed<strong>in</strong>muchre-<br />

centwork<strong>in</strong>l<strong>in</strong>guistics.Figure3showsa<br />

drtdiagramforthesentence`Ifyoudevelop<br />

arashyoushouldconsultyourdoctor'.For<br />

readersunfamiliarwithdrt,theconventions<br />

ofthediagramwillbeexpla<strong>in</strong>edbriey.It<br />

conta<strong>in</strong>sfourboxeslabelledK0..K3,vedis-<br />

coursereferents(u1,u3,u4,u5,u6)eachas-<br />

signedtotheuniverseofabox,tensimple<br />

conditions<strong>in</strong>predicate-argumentform,and<br />

twocomplexconditionsbasedonthe<strong>logical</strong><br />

operatorsofimplication())andnecessity<br />

(2).Intuitively,eachboxrepresentsa<strong>logical</strong><br />

con<strong>text</strong><strong>in</strong>volv<strong>in</strong>gsomeentities(discourseref-<br />

erents)thatbelongtoitsuniverse.Theouter<br />

boxK0representsthecon<strong>text</strong>armedbythe<br />

authorofthepatient<strong>in</strong>formationleaet;it<strong>in</strong>-<br />

cludesthepatientu5,thepatient'sdoctoru6,<br />

threesimpleconditionpresent<strong>in</strong>gproperties<br />

ofthesereferents,andacomplexcondition<br />

present<strong>in</strong>gtheconditional<strong>in</strong>struction.The<br />

<strong>in</strong>struction<strong>in</strong>itsturnconta<strong>in</strong>saboxK1de-<br />

scrib<strong>in</strong>gahypotheticalcon<strong>text</strong><strong>in</strong>whichthe<br />

patientdevelopsarash.Acrucialidea<strong>in</strong>drt<br />

isthatareferentmaybecitedonly<strong>in</strong><strong>logical</strong><br />

con<strong>text</strong>sthatareaccessiblefromtheboxto<br />

whichitisbound.For<strong>in</strong>stancetherashu4,<br />

whichisboundtothehypotheticalcon<strong>text</strong><br />

K1,couldoccurwith<strong>in</strong>asimplecondition<strong>in</strong><br />

anyoftheboxessubord<strong>in</strong>atedtoK1(i.e.K2<br />

andK3),butnot<strong>in</strong>theouterboxK0.Intu-<br />

itively,tociteu4with<strong>in</strong>K0wouldimplythat<br />

therashdenitelyexisted,<strong>in</strong>whichcaseu4<br />

shouldhavebeenboundtoK0,nottoK1.<br />

3 Scopedsemanticnetwork<br />

Whatisthem<strong>in</strong>imum<strong>in</strong>formationthatneed<br />

beaddedtotheA-box<strong>in</strong>gure2<strong>in</strong>order<br />

torepresentfullythe<strong>logical</strong>formofthecon-<br />

ditional<strong>in</strong>struction,asshownbythedrs<strong>in</strong><br />

gure3?Thisquestioncanbeaddressedby<br />

seek<strong>in</strong>gaprocedurefor<strong>in</strong>terpret<strong>in</strong>gaseman-<br />

ticnetworklikegure2asadrs,andnot<strong>in</strong>g<br />

exactlywherethisprocedurestalls.<br />

Therststep<strong>in</strong><strong>in</strong>terpret<strong>in</strong>ggure2asa<br />

drsistodist<strong>in</strong>guishnodesthatexpresssim-<br />

pleconditionsfromonesthatexpresscom-<br />

plexconditions.Thisisstraightforward:the<br />

T-boxclassicationshoulddist<strong>in</strong>guish<strong>logical</strong><br />

operatorslikeimplicationandobligation<br />

fromnon-<strong>logical</strong>entitieslikeactionsorphysi-<br />

calobjects,so<strong>in</strong>gure2wecanconcludethat<br />

u0andu2expresscomplexconditionswhileall<br />

othernodesexpresssimpleconditions.<br />

Thesecondstepistopairsomenodeswith<br />

drtboxes;thiscanbedonebyapply<strong>in</strong>gtwo<br />

rules.Therootofthenetworkispairedwith<br />

theouterboxK0.<br />

Ifanodeexpressesacomplexcondition,<br />

itsdirectdescendents(i.e.thevaluesof<br />

itsattributes)arepairedwithboxes.<br />

Ingure2,theserulesyieldfourboxes:K0<br />

ispairedwithu0,therootofthenetwork;K1<br />

andK2arepairedwithu1andu2,thedirect<br />

descendentsoftheimplicationu0;andK3is<br />

pairedwithu3,thedirectdescendentofthe<br />

obligationu2.<br />

Thethirdstepistoplaceeachcomplexcon-<br />

dition<strong>in</strong>thecorrectbox,soobta<strong>in</strong><strong>in</strong>gthebox<br />

structure<strong>in</strong>gure3.Aga<strong>in</strong>tworulessuce:<br />

IfanodeuAexpress<strong>in</strong>gacomplexcondi-<br />

tionispairedwithaboxKA,thecomplex<br />

conditionshouldbeplaced<strong>in</strong>KA.


K0:u5u6<br />

patient(u5)<br />

doctor(u6)<br />

owner(u6,u5)<br />

K1:u1u4<br />

develop(u1)<br />

rash(u4)<br />

actor(u1,u5)<br />

actee(u1,u4) ) K2:<br />

2K3:u3<br />

consult(u3)<br />

actor(u3,u5)<br />

actee(u3,u6)<br />

Figure3:DRSforaconditional<strong>in</strong>struction<br />

IfuAisnotpairedwithabox,wendthe<br />

nearestancestoruBthatispairedwitha<br />

boxKB,andplacethecomplexcondition<br />

expressedbyuA<strong>in</strong>KB.(Theremustbea<br />

uniquenearestancestor,s<strong>in</strong>ceanetwork<br />

isill-formediftherearetwopathslead<strong>in</strong>g<br />

fromtherootnodetoanodeexpress<strong>in</strong>g<br />

acomplexcondition.)<br />

Apply<strong>in</strong>gtheserulestogure2,wecanplace<br />

theimplicationu0<strong>in</strong>K0,andtheobligation<br />

u2<strong>in</strong>K2,theconsequentoftheimplication.<br />

Thefourthstepistob<strong>in</strong>deachreferentrep-<br />

resentedbyanode<strong>in</strong>gure2tothecorrect<br />

box.Wecanignorethenodesexpress<strong>in</strong>gcom-<br />

plexconditions(u0andu2),s<strong>in</strong>ceabstracten-<br />

titiesofthisk<strong>in</strong>dareusuallyomittedfrom<br />

drtdiagrams.Amongtheothernodes,we<br />

candist<strong>in</strong>guishnodespairedwithboxes(u1<br />

andu3)fromtherest(u4,u5andu6).The<br />

formerwillbecalledxedreferents,thelat-<br />

teroat<strong>in</strong>greferents.The<strong>scope</strong>ofaxed<br />

referentisdeterm<strong>in</strong>ed:itmustbeboundto<br />

theboxitispairedwith.Thusu1mustbe<br />

assignedtotheuniverseofK1,andu3must<br />

beassignedtotheuniverseofK3.Foroat-<br />

<strong>in</strong>greferentstheremaybeachoice.Byap-<br />

ply<strong>in</strong>gdrtaccessibilityrules,asetofpoten-<br />

tial<strong>scope</strong>scanbecalculatedforeachoat<strong>in</strong>g<br />

referent;ifthissetconta<strong>in</strong>smorethanone<br />

boxthe<strong>scope</strong>ofthenetworkisunderspeci-<br />

ed,andsothenetworkfailstodeterm<strong>in</strong>ea<br />

uniquedrs.<br />

Wenowhaveananswertoourorig<strong>in</strong>al<br />

question:to<strong>in</strong>terpretanA-boxlikegure2as<br />

adrs,eachoat<strong>in</strong>greferentmustbeassigned<br />

a<strong>scope</strong>.S<strong>in</strong>cexedreferentsarepairedwith<br />

boxes,thiscanbedonebyl<strong>in</strong>k<strong>in</strong>geachoat-<br />

<strong>in</strong>greferenttoaxedreferentthatbelongsto<br />

itssetofpotential<strong>scope</strong>s;wewillcallthere-<br />

sulta`<strong>scope</strong>dsemanticnetwork'.Ingure4,<br />

<strong>scope</strong>assignmentsareshownbydottedarcs;<br />

asanaidtovisualization,oat<strong>in</strong>greferents<br />

arerepresentedbyovalsandxedreferents<br />

(pairedwithboxes)byrectangles.<br />

Hav<strong>in</strong>gassignedeachreferenttoabox,the<br />

fthandnalstepistoplacethesimplecon-<br />

ditions<strong>in</strong>thecorrectboxes.Simplecondi-<br />

tionsareoftwok<strong>in</strong>ds,assertionsofclassmem-<br />

bershipsuchasconsult(u3)andattributions<br />

suchasactor(u3;u5),theformerexpressed<br />

bynodes<strong>in</strong>thenetworkandthelatterby<br />

arcs.Weassumethatifareferentuisbound<br />

toaboxK,thenallsimpleconditionsde-


CONSEQUENT<br />

ANTECEDENT<br />

develop<br />

OWNER<br />

consult<br />

ACTOR ACTEE<br />

ACTOR<br />

ACTEE<br />

CONTENT<br />

u0<br />

u1<br />

u2<br />

u3<br />

implication obligation<br />

u4<br />

rash doctor<br />

u6<br />

u5<br />

patient<br />

Figure4:A-boxwith<strong>scope</strong>assignments<br />

scrib<strong>in</strong>gpropertiesofu(i.e.itsclassand<br />

itsattributes)shouldbeplaced<strong>in</strong>K.Thus<br />

actor(u3;u5)isplaced<strong>in</strong>K3becauseitde-<br />

scribesapropertyofu3,whichisboundto<br />

K3.Ingeneral,anysimpleconditionofthe<br />

formr(uA;uB)isplaced<strong>in</strong>theboxtowhich<br />

uAisbound,evenifuBisboundtoadierent<br />

box.<br />

Itmightseemthatthisassumptionistoo<br />

strong.Bycomparison,Hendrix(1975)b<strong>in</strong>ds<br />

eacharcaswellaseachnodetoa<strong>logical</strong><br />

con<strong>text</strong>;consequently,apartionedsemantic<br />

networkwouldallowthesimpleconditions<br />

consult(u3),actor(u3;u5)andactee(u3;u6)to<br />

beboundtothreedierentboxes,whereas<br />

a<strong>scope</strong>dsemanticnetworkconstra<strong>in</strong>sthem<br />

toappear<strong>in</strong>thesamebox.However,this<br />

apparentlimitationisactuallyausefulsim-<br />

plication<strong>in</strong>anA-boxthatreiesrelations<br />

likedevelopandconsult.Inalogic<strong>text</strong>-<br />

book,thethreesimpleconditions<strong>in</strong>K3would<br />

typicallybecollapsed<strong>in</strong>toas<strong>in</strong>gleformula<br />

consult(u5;u6);<strong>in</strong>drtthenotationu3:<br />

consult(u5;u6)issometimesusedifthereisa<br />

subsequentreferencetotheconsult<strong>in</strong>gevent<br />

itself.Obviouslythiss<strong>in</strong>gleconditioncannot<br />

bedistributedamongseveralboxes,soouras-<br />

sumptioncausesnolossofexpressivepower<br />

comparedwiththenormaldrtnotation.<br />

4 Scopeconstra<strong>in</strong>ts<br />

Inwysiwymedit<strong>in</strong>ganA-boxisbuilttop-<br />

downstart<strong>in</strong>gfromtherootnode.Hav<strong>in</strong>g<br />

decidedthattherootnodeshouldbe(say)<br />

anentityoftypeimplication,theauthoris<br />

presentedwithafeedback<strong>text</strong><strong>in</strong>dicat<strong>in</strong>gthat<br />

anantecedentandaconsequentmustbespec-<br />

ied:Ifthissituationholds,thiscon-<br />

sequenceresults.<br />

Thephrases<strong>in</strong>boldfacearemouse-sensitive<br />

anchorsmark<strong>in</strong>gunlledattributes;byclick-<br />

<strong>in</strong>gonananchor,theauthorcanviewthe<br />

classestowhichasuitablellermaybelong,<br />

andchooseoneofthemtocreatetheller.<br />

Everytimeachoiceismade,thefeedback<br />

<strong>text</strong>isupdatedandnewedit<strong>in</strong>goptionsare<br />

oered.Bysuccessivechoicesonanchors,the<br />

authorcanbuildupacompletenetworksuch<br />

asgure2.However,aswehaveseen,for<br />

<strong>logical</strong>lycomplexmaterialastandardA-box<br />

suchasgure2is<strong>in</strong>sucient.Todenethe<br />

desiredmean<strong>in</strong>gcompletely,theauthormust<br />

somehowassign<strong>scope</strong>stotheoat<strong>in</strong>grefer-<br />

ents,as<strong>in</strong>gure4.<br />

Thecontrolof<strong>scope</strong>dur<strong>in</strong>gedit<strong>in</strong>graises<br />

severaltrickyproblems:<br />

1.Whenshouldtheoptionsbepresented?<br />

Shouldascop<strong>in</strong>gdecisionberequired<br />

wheneveranewentityis<strong>in</strong>troduced,or<br />

shouldthesystemallowthe<strong>scope</strong>tobe<br />

lefttemporarilyunspecied?<br />

2.Howcanthedecisionbepresented<strong>in</strong>a<br />

waythatnon-logicianscanunderstand?<br />

3.Howshouldtheedit<strong>in</strong>goperationsofCut<br />

andPasteaectscop<strong>in</strong>gassignments?<br />

Supposeforexamplethat<strong>in</strong>gure2u5<br />

wasassignedthe<strong>scope</strong>u1,whatwould<br />

happenifeitheru1oru5wereremoved<br />

fromthema<strong>in</strong>networkbyaCutopera-<br />

tion?<br />

4.Howshouldthesystemreactiftheau-<br />

thorattemptsanedit<strong>in</strong>goperationthat


wouldbeillegalunderthecurrentscop-<br />

<strong>in</strong>gassignments?Shoulditforbidtheop-<br />

eration,oroertheoperationoncondi-<br />

tionthatsome<strong>scope</strong>sarereassigned?<br />

Asanillustrationofthelastproblem,suppose<br />

thattheauthorhasconstructedthenetwork<br />

<strong>in</strong>gure2,exceptthattheactorarcfrom<br />

u1hasnotyetbeendirectedtothepatient<br />

nodeu5;andsupposefurtherthattheauthor<br />

(probablybymistake)hasboundu5tothe<br />

localcon<strong>text</strong>K3.Theresult<strong>in</strong>gfeedback<strong>text</strong><br />

mightbe<br />

Ifthispersondevelopsarash,apa-<br />

tientshouldconsulthis/herdoctor.<br />

Inwysiwymedit<strong>in</strong>g,anexist<strong>in</strong>gentitycan<br />

becopied<strong>in</strong>toanunlledattributebyselect-<br />

<strong>in</strong>gaphrasedenot<strong>in</strong>gtheentity(e.g.`the<br />

patient'),choos<strong>in</strong>g`Copy'fromthepop-up<br />

menu,select<strong>in</strong>gtheanchordenot<strong>in</strong>gtheun-<br />

lledattribute(thisperson)andchoos<strong>in</strong>g<br />

`Paste'(vanDeemterandPower,1998).Al-<br />

low<strong>in</strong>gthisoperationwould<strong>in</strong>stallthepatient<br />

astheactorofthedevelopactionu1;un-<br />

fortunatelyitwouldalsoviolatedrtscop<strong>in</strong>g<br />

rules,s<strong>in</strong>ceasimpleconditionactor(u1;u5)<strong>in</strong><br />

K1wouldnowciteareferentu5boundtoa<br />

box(K3)thatis<strong>in</strong>accessiblefromK1.<br />

Allfourproblemslistedabovecanbesolved<br />

(oratleastalleviated)by<strong>in</strong>troduc<strong>in</strong>gafur-<br />

thersimplify<strong>in</strong>gassumption:<br />

Everyoat<strong>in</strong>greferentmusteither<br />

beboundtotheouterboxK0,<br />

ormustbe<strong>in</strong>terpreted<strong>in</strong>situ(i.e.<br />

boundtothenarrowestofitspoten-<br />

tial<strong>scope</strong>s).<br />

Withthisassumption,theauthorneedno<br />

longerprovideanexactscop<strong>in</strong>gdecision;it<br />

sucestodist<strong>in</strong>guish`Global<strong>scope</strong>'(assign-<br />

menttoK0)from`Free<strong>scope</strong>'.Byadopt<strong>in</strong>g<br />

free<strong>scope</strong>asadefault,allwerequirefrom<br />

theauthorisadecisionoverwhichoat<strong>in</strong>g<br />

variablesshouldbeboundtoK0.Suchade-<br />

cisioncannotviolateaccessibilityconstra<strong>in</strong>ts,<br />

s<strong>in</strong>cetheouterboxisalwaysamongthepo-<br />

tential<strong>scope</strong>sofaoat<strong>in</strong>greferent.Itcanalso<br />

bepresented<strong>in</strong>awaymorefamiliartonon-<br />

logicians,asadist<strong>in</strong>ctionbetween`real'enti-<br />

ties,which(accord<strong>in</strong>gtothe<strong>text</strong>)denitely<br />

exist,and`hypothetical'entities,whichmight<br />

ormightnotexist.Referentsthathavebeen<br />

cuttothebuercanreta<strong>in</strong>theirglobal/free<br />

status,and<strong>in</strong>terpretedaccord<strong>in</strong>glyifthey<br />

arepastedback<strong>in</strong>tothema<strong>in</strong>network.Fi-<br />

nally,<strong>in</strong>thesituationdescribedabove,the<br />

patientreferentu5,withits<strong>scope</strong>leftfree,<br />

couldbecopiedwithout<strong>in</strong>consistency<strong>in</strong>tothe<br />

actorattributeonu1;byremov<strong>in</strong>gK2and<br />

K3fromitssetofpotential<strong>scope</strong>s,thisoper-<br />

ationwould<strong>in</strong>eectchangetheexact<strong>scope</strong><br />

assignedtou5fromK3toK1.<br />

5 <strong>Controll<strong>in</strong>g</strong><strong>scope</strong>dur<strong>in</strong>g<br />

edit<strong>in</strong>g<br />

Wenowshow<strong>in</strong>detailhowanauthormight<br />

constructthe<strong>scope</strong>dnetwork<strong>in</strong>gure4<br />

(equivalenttothedrs<strong>in</strong>gure3)bywysi-<br />

wymedit<strong>in</strong>g.Themethoddescribedabove<br />

hasbeenimplementedfully<strong>in</strong>theicono-<br />

clastsystem,whichgeneratespatient<strong>in</strong>for-<br />

mationleaets;forsimplicityweassumethat<br />

thesystemhasbeenconguredtogeneratea<br />

s<strong>in</strong>gle<strong>in</strong>structiononlyratherthanacomplete<br />

leaet.Onstart<strong>in</strong>ganewA-box,theauthor<br />

seesthefeedback<strong>text</strong><br />

Followthis<strong>in</strong>struction.<br />

imply<strong>in</strong>gthattherootofthenetworkshould<br />

besomek<strong>in</strong>dof<strong>in</strong>struction;ofcoursetheaim<br />

ofwysiwymtopresentsuch<strong>in</strong>formation<strong>in</strong><br />

ord<strong>in</strong>aryEnglish(orord<strong>in</strong>aryFrench,etc.),<br />

avoid<strong>in</strong>gtechnicaltermslike`network'or`A-<br />

box'.Open<strong>in</strong>gtheanchoryieldsalistof<strong>in</strong>-<br />

structiontypes<br />

action<br />

conditional<br />

procedure<br />

warn<strong>in</strong>g<br />

...


fromwhichtheauthorshouldselect`condi-<br />

tional';probablythesealternativescouldbe<br />

worded<strong>in</strong>awaythatwasmoreaccessibleto<br />

the<strong>in</strong>tendedusers,butwewillnotpursuethis<br />

issuehere.TheA-boxisnowupdatedbycre-<br />

at<strong>in</strong>ganimplicationentitywithundened<br />

antecedentandconsequent,andthefeedback<br />

<strong>text</strong>isregeneratedtoshowthenewedit<strong>in</strong>g<br />

options:<br />

Ifthissituationholds,thiscon-<br />

sequenceresults.<br />

Theanchorsmaybedeveloped<strong>in</strong>anyorder,<br />

butweassumethattheauthorclicksrston<br />

thissituation2<br />

allergic<br />

develop<br />

pregnant<br />

...<br />

andchoosesasituationoftypedevelop,thus<br />

specify<strong>in</strong>gthenodeu1<strong>in</strong>gure4.S<strong>in</strong>ceit<br />

descendsdirectlyfromacomplexcondition,<br />

u1isaxedreferent,sothereisnoneedto<br />

oertheauthoranedit<strong>in</strong>goperationforcon-<br />

troll<strong>in</strong>gits<strong>scope</strong>.Thefeedback<strong>text</strong>changes<br />

toIfthispersondevelopsthissymp-<br />

tom,thisconsequenceresults.<br />

whereupontheauthormightclickonthis<br />

persondoctor<br />

nurse<br />

patient<br />

pharmacist<br />

...<br />

andchoose`patient',thusspecify<strong>in</strong>gu5(g-<br />

ure4).Thistime,thenewlyspeciednode<br />

descendsfromasimplecondition,soitrep-<br />

resentsaoat<strong>in</strong>greferent.Thecurrentnet-<br />

workimpliesthreeboxes,l<strong>in</strong>kedtothenodes<br />

u0(theroot),u1(theantecedentofacom-<br />

plexcondition)andu2(theconsequent);by<br />

2Tosavespace,justafewalternativesareshown.<br />

CONSEQUENT<br />

ANTECEDENT<br />

develop<br />

ACTOR<br />

ACTEE<br />

u0<br />

u1<br />

u2<br />

implication<br />

u4 u5<br />

patient<br />

Figure5:Scopednetworkdur<strong>in</strong>gedit<strong>in</strong>g<br />

drtrules,u5couldbeboundeithertoK0<br />

orK1(represented<strong>in</strong>thenetworkbyu0and<br />

u1respectively).However,s<strong>in</strong>ceanewly<strong>in</strong>-<br />

troducedreferenthasfree<strong>scope</strong>,itis<strong>in</strong>itially<br />

boundtou1,thenarrowestofitspotential<br />

<strong>scope</strong>s.Theresult<strong>in</strong>gnetwork(gure5)is<br />

presentedthroughanupdatedfeedback<strong>text</strong><br />

Ifapatientdevelopsthissymp-<br />

tom,thisconsequenceresults.<br />

<strong>in</strong>whichthe<strong>in</strong>denitedescription`apatient'<br />

suggeststhatthe<strong>in</strong>structionisaddressedto<br />

anypatient,notspecicallytothepatient<br />

read<strong>in</strong>gtheleaet.S<strong>in</strong>cethisisnotthede-<br />

siredmean<strong>in</strong>g,theauthorcannowclickon`a<br />

patient':<br />

Cut<br />

Copy<br />

Global<strong>scope</strong><br />

Whena<strong>text</strong>spanexpressesanodeofspec-<br />

iedtype(i.e.itisnotananchor),theas-<br />

sociatedmenualwaysoerstheoptions`Cut'<br />

and`Copy';<strong>in</strong>addition,foraoat<strong>in</strong>grefer-<br />

ent,itoers`Global<strong>scope</strong>'ifthereferentis<br />

currentlyunconstra<strong>in</strong>ed,and`Free<strong>scope</strong>'if<br />

itisconstra<strong>in</strong>ed.(Aga<strong>in</strong>,wewilleventually<br />

wordthisoption<strong>in</strong>amoreaccessibleway.)<br />

Select<strong>in</strong>g`Global<strong>scope</strong>'modiesgure5by<br />

redirect<strong>in</strong>gthedottedarctou0,thusb<strong>in</strong>d<strong>in</strong>g


u5totheouterboxK0<strong>in</strong>thecorrespond<strong>in</strong>g<br />

drs.Mak<strong>in</strong>gthereasonableassumptionthat<br />

apatiententity<strong>in</strong>K0denotesthereader,the<br />

systemcannowupdatethefeedback<strong>text</strong>as<br />

follows:<br />

Ifyoudevelopthissymptom,this<br />

consequenceresults.<br />

Tocompletetheantecedent,theauthorclicks<br />

onthissymptomandchooses`rash'.<br />

Ifyoudeveloparash,thisconse-<br />

quenceresults.<br />

Thistime,thedefault<strong>scope</strong>assignedtothe<br />

newlyspeciedreferentu4isappropriate,so<br />

theauthordevelopstheconsequentbychoos-<br />

<strong>in</strong>g`obligation'andthen`consult':<br />

Ifyoudeveloparash,thisaction<br />

shouldbeperformed.<br />

Ifyoudeveloparash,thisperson<br />

shouldconsultthisperson.<br />

Atthispo<strong>in</strong>t,an<strong>in</strong>experiencedauthormight<br />

errbyclick<strong>in</strong>gontherstanchorthisperson<br />

andselect<strong>in</strong>g`patient'.Theresult<strong>in</strong>gfeed-<br />

back<strong>text</strong>revealsthenatureoftheerror:<br />

Ifyoudeveloparash,anotherpa-<br />

tientshouldconsultthisperson.<br />

anewpatienthasbeen<strong>in</strong>troduced<strong>in</strong>steadof<br />

referr<strong>in</strong>gbacktotheorig<strong>in</strong>alone.Toundo<br />

themistake,theauthorshouldselect`Cut'on<br />

thephrase`anotherpatient',sorevert<strong>in</strong>gto<br />

thepreviousfeedback<strong>text</strong>,andthenclickon<br />

`you'Cut<br />

Copy<br />

Free<strong>scope</strong><br />

andselect`Copy'.(Notethattherescop<strong>in</strong>g<br />

optionisnow`Free<strong>scope</strong>'ratherthan`Global<br />

<strong>scope</strong>',s<strong>in</strong>cethe<strong>scope</strong>ofthepatientreferent<br />

u5wasconstra<strong>in</strong>edearlier.)Click<strong>in</strong>gonthe<br />

anchorthispersonwillnowyieldamenu<br />

that<strong>in</strong>cludesa`Paste'option<strong>in</strong>additionto<br />

thelistofpermittedtypes:<br />

Paste<br />

doctor<br />

nurse<br />

patient<br />

pharmacist<br />

...<br />

Theresultofselect<strong>in</strong>g`Paste'isto<strong>in</strong>stallu5<br />

(thecopiedreferent)asthevalueoftheactor<br />

attributeonu3(gure4).<br />

Ifyoudeveloparash,youshould<br />

consultthisperson.<br />

Itrema<strong>in</strong>stodenethepersonthatshould<br />

beconsulted,bychoos<strong>in</strong>g`doctor'andthen<br />

past<strong>in</strong>g<strong>in</strong>thepatientaga<strong>in</strong>:<br />

Ifyoudeveloparash,youshould<br />

consultadoctorofthisperson.<br />

Ifyoudeveloparash,youshould<br />

consultadoctorofyours.<br />

Thedoctorreferentstillhasfree<strong>scope</strong>,soitis<br />

boundtoitslocalcon<strong>text</strong>u3(pairedwiththe<br />

drtboxK3).However,the<strong>in</strong>tendedmean<strong>in</strong>g<br />

isnotjustanydoctorthatthepatientmight<br />

have,buthis/heractualdoctor.Theauthor<br />

shouldthereforeclickon`adoctorofyours'<br />

andselect`Global<strong>scope</strong>'tocompletethenet-<br />

work<strong>in</strong>gure4.<br />

Ifyoudeveloparash,youshould<br />

consultyourdoctor.<br />

6 Conclusions<br />

Wehavearguedthreema<strong>in</strong>po<strong>in</strong>ts:<br />

Knowledgebases<strong>in</strong>nlgapplicationsof-<br />

tenfailtorepresentthe<strong>scope</strong>sofexisten-<br />

tiallyquantiedvariables.<br />

ThestandardA-boxused<strong>in</strong>loomand<br />

similarlanguagescanrepresent<strong>logical</strong>ly<br />

complexpropositionsifeach`oat<strong>in</strong>gref-<br />

erent'isboundbyascop<strong>in</strong>grelationto<br />

anaccessible`xedreferent';theresult-<br />

<strong>in</strong>gnetworkcanbe<strong>in</strong>terpretedasadrs.


Thetaskofconstruct<strong>in</strong>ga<strong>logical</strong>lycom-<br />

plexpropositioncanbeconvenientlysim-<br />

plied,foruserswhoarenottra<strong>in</strong>ed<strong>in</strong><br />

logicorknowledgeeng<strong>in</strong>eer<strong>in</strong>g,byrequir-<br />

<strong>in</strong>gonlyadecisionbetween`global'and<br />

`free'<strong>scope</strong>,withfree<strong>scope</strong>serv<strong>in</strong>gasthe<br />

default.<br />

Theseproposalshavebeenimplemented<strong>in</strong><br />

iconoclast,asystemthatuseswysiwym<br />

edit<strong>in</strong>g<strong>in</strong>ordertodenethecontentofpa-<br />

tient<strong>in</strong>formationleaets.Animportanttask<br />

forfutureresearchistoevaluatewhetherthe<br />

systemcanbeusedreliablybyour<strong>in</strong>tended<br />

authors|doma<strong>in</strong>experts<strong>in</strong>thepharmaceu-<br />

tical<strong>in</strong>dustry.Inparticular,weneedtocon-<br />

rmthatnon-logicianscandist<strong>in</strong>guishglobal<br />

<strong>scope</strong>fromfree<strong>scope</strong>,andtondouthowthis<br />

dist<strong>in</strong>ctioncanbemostclearlypresented.<br />

References<br />

Bateman,J.(1996).KPML:Thekomet-<br />

Penman(Multil<strong>in</strong>gual)DevelopmentEn-<br />

vironment.Technicalreport,Institutfur<br />

IntegriertePublikations-undInforma-<br />

tionssysteme(IPSI),GMD,Darmstadt.<br />

Release0.9.<br />

Bateman,J.,Magn<strong>in</strong>i,B.,andFabris,G.<br />

(1995).Thegeneralizeduppermodel<br />

knowledgebase:organizationanduse.<br />

InConferenceonKnowledgeRepresen-<br />

tationandShar<strong>in</strong>g,Twente,TheNether-<br />

lands.<br />

Hendrix,G.(1975).Expand<strong>in</strong>gtheutility<br />

ofsemanticnetworksthroughpartion<strong>in</strong>g.<br />

InFourthInternationalJo<strong>in</strong>tConference<br />

onArticialIntelligence,pages115{121,<br />

Tbilisi.<br />

Kamp,H.(1981).Events,discourserepresen-<br />

tations,andtemporalreferences.Lan-<br />

guages,64:39{64.<br />

MacGregor,R.andBates,R.(1987).The<br />

loomknowledgerepresentationlan-<br />

guage.InProceed<strong>in</strong>gsoftheKnowledge-<br />

BasedSystemsWorkshop,St.Louis,<br />

April21{23.<br />

Paris,C.,VanderL<strong>in</strong>den,K.,Fischer,M.,<br />

Hartley,A.,Pemberton,L.,Power,<br />

R.,andScott,D.(1995). Asup-<br />

porttoolforwrit<strong>in</strong>gmultil<strong>in</strong>gual<strong>in</strong>struc-<br />

tions.InProceed<strong>in</strong>gsofthe14thInter-<br />

nationalJo<strong>in</strong>tConferenceonArticial<br />

Intelligence,pages1398{1404,Montreal,<br />

Canada.<br />

Power,R.andScott,D.(1998). Multi-<br />

l<strong>in</strong>gualauthor<strong>in</strong>gus<strong>in</strong>gfeedback<strong>text</strong>s.<br />

InProceed<strong>in</strong>gsofthe17thInternational<br />

ConferenceonComputationalL<strong>in</strong>guis-<br />

ticsand36thAnnualMeet<strong>in</strong>goftheAs-<br />

sociationforComputationalL<strong>in</strong>guistics,<br />

pages1053{1059,Montreal,Canada.<br />

Roberts,D.(1973).TheExistentialGraphsof<br />

CharlesS.Pierce.Mouton,TheHague.<br />

Scott,D.,Power,R.,andEvans,R.(1998).<br />

Generationasasolutiontoitsownprob-<br />

lem.InProceed<strong>in</strong>gsofthe9thInter-<br />

nationalWorkshoponNaturalLanguage<br />

Generation,pages256{265,Niagara-on-<br />

the-Lake,Canada.<br />

Sowa,J.(1995).Syntax,semanticsandprag-<br />

maticsofcon<strong>text</strong>s.InThirdInterna-<br />

tionalConferenceonConceptualStruc-<br />

tures,SantaCruz,USA.<br />

vanDeemter,K.andPower,R.(1998).Coref-<br />

erence<strong>in</strong>knowledgeedit<strong>in</strong>g.InProceed-<br />

<strong>in</strong>gsoftheCOLING-ACLworkshopon<br />

theComputationalTreatmentofNomi-<br />

nals,pages56{60,Montreal,Canada.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!