Text Generation for Instances in the Component Library - PowerPoint PPT Presentation

About This Presentation
Title:

Text Generation for Instances in the Component Library

Description:

(is-possessed-by ((a Hamster with ... 'Manny's hamster's capacious stinky cage is near the door and inside the room. ... 'Manny's hamster moves the object.') KM ... – PowerPoint PPT presentation

Number of Views:50
Avg rating:3.0/5.0
Slides: 29
Provided by: KenBa66
Category:

less

Transcript and Presenter's Notes

Title: Text Generation for Instances in the Component Library


1
Text Generation for Instances in the Component
Library
  • Ken Barker, Jarred McGinnis
  • Monday afternoon

2
Outline
  • Motivation
  • Why UT is doing text generation
  • Interface
  • What goes in and what comes out
  • Customization
  • How to adapt for new classes
  • Future Work
  • What to do next

3
Motivation
  • the point of SHAKEN is to make formal KR
    palatable to normal people, mostly through
    graphical I/O (CMAPs)
  • there are many places where even a CMAP is too
    clunky or inappropriate
  • English text is still the most efficient way to
    describe some bit of knowledge
  • interpreting English is still too hard
  • generating English from KM is a little easier

4
Still Not Convinced?
  • This?
  • (Manny has (instance-of (Person)) (trait
    ((aTrait-Value with (value (lazy))))) (size ((a
    Size-Value with (value ((pair big Person)))))))
  • (_Cage44 has (instance-of (Cage))(is-possessed-by
    ((a Hamster with(is-possessed-by (Manny)))))
    (smell ((a Smell-Value with (value (stinky)))))
    (capacity ((a Capacity-Value with (value ((pair
    capacious Cage)))))) (is-inside ((a Room)))
    (is-near ((a Door))))
  • or This?
  • Mannys hamsters capacious stinky cage is near
    the door and inside the room.

5
Shouldnt This be part of SHAKEN?
  • no.
  • the lexicon and grammar rules are specific to
    components
  • each component must be responsible for its own
    text generation
  • any class can define its own text generation
    words, phrases and rules

6
Generic vs. Component-Specific
generic The entity move-intos the
tangible-entity with respect to the
tangible-entity along the spatial-entity.
component-specific The agent moves the object
into the container through the portal.
The entity let-falls the tangible-entity.
The agent lets the object fall.
The tangible-entity is received to the
tangible-entity from the tangible-entity.
The recipient receives the object from the
donor.
7
Outline
  • Motivation
  • Why UT is doing text generation
  • Interface
  • What goes in and what comes out
  • Customization
  • How to adapt for new classes
  • Future Work
  • What to do next

8
Interface
  • every instance of Entity and Event has a slot
    called text-gen
  • the text-gen of an Event is a sentence
  • a single clause with the Event as the main verb
    and select Event?Entity slots as arguments
  • can be redefined by any class
  • the text-gen of an Entity is a noun phrase
  • the Entity is the head noun, some property values
    are premodifiers, some Entity?Entity slots are
    postmodifiers, determiner may include
    is-possessed-by
  • can be redefined
  • the text-sentence of an Entity is its text-gen
    reworded as a sentence
  • can be redefined

9
The text-gen of Entities
  • for named instances just the name!
  • KM (the text-gen of Manny)("manny")
  • for anonymous instances
  • KM (the text-gen of _Cage44)("manny's hamster's
    capacious stinky cage near the door and inside
    the room")

10
The text-sentence of Entities
  • for named instances and anonymous instances
  • is
  • KM (the text-sentence of _Cage44)("manny's
    hamster's capacious stinky cage is near the door
    and inside the room.")
  • is
  • KM (the text-sentence of _Room74)("The room is
    inside the house.")
  • is
  • KM (the text-sentence of Manny)("Manny is big
    and lazy.")
  • is a
  • KM (the text-sentence of _Hamster43)("manny's
    hamster is a hamster.")

11
Heads
  • for named instances just the name!
  • for anonymous instances
  • ( or )
  • for very general Entities (E, T-E, I-E, S-E, P)
    is the Role played by the Entity
  • otherwise, is one of the instance-of
  • KM (make-phrase (the text-head of (a Boy called
    "Sue")))("boy (called Sue)")
  • KM (make-phrase (the text-head of (a Entity
    with (plays ((a Container))))))("container")

12
Postmods
  • is-part-of, material, content, spatial rels
    (is-above, etc.)
  • any class can define its own postmod slots
  • for each of these slots that has a value
  • the of Self
  • KM (the text-slot of is-part-of)(text-is-part-of
    )
  • KM (the text-is-part-of of (a Knob))("part of")
  • KM (the is-part-of of (a Knob))(_Door189)
  • KM (make-phrase (the text-postmods of (a Knob)))
    ("part of the door")

13
Premods
  • the properties (color, length, sex, etc.)
  • for scalars
  • only when the reference class
    is the same as the instance-of of the Entity
  • for categoricals
  • KM (make-phrase (the text-premods of
    (Manny)))("big lazy")

14
Determiners
  • for named instances
  • for anonymous instances
  • if the Entity is-possessed-by P
  • s
  • otherwise the or a
  • KM (make-phrase (the text-def-determiner of
    (_Hamster43)))("manny's")
  • KM (make-phrase (the text-def-determiner of
    (_Cage44)))("manny's hamster's")
  • KM (make-phrase (the text-indef-determiner of (a
    Door)))("a")

15
The text-gen of Events
  • for active Events
  • KM (the text-gen of _Move-Into49)("The agent
    moves the object into the container through the
    portal.")
  • for passive Events
  • KM (the text-gen of (a Move-Into))("The object
    gets moved into the container through the
    portal.")

16
The of Events
  • and defined
    for every Event instance, with both singular and
    plural forms
  • KM (the text-gen of (a Break))("The object gets
    broken.")
  • KM (the text-gen of (a Break with (agent ((a
    Entity)))))("The agent breaks the object.")
  • KM (the text-gen of (a Break with (agent ((a
    Living-Entity) (a Substance)))))("The
    living-entity and the substance break the
    object.")
  • KM (the text-gen of (a Break with (object ((a
    Object) (a Bond)))))("The object and the bond
    get broken.")

17
The of Events
  • of the agent or instrument (or some
    other role)
  • for very general Entities, use the case name
    instead
  • KM (the text-gen of (a Move with (agent
    (_Hamster43))))("Manny's hamster moves the
    object.")
  • KM (the text-gen of (a Move with (instrument
    ((a Tangible-Entity with (plays ((a
    Vehicle))))))))("The vehicle moves the object.")
  • KM (the text-gen of (a Receive with (recipient
    (Manny))))("Manny receives the object.")

18
The of Events
  • of the object (or some other role)
  • for very general Entities, use the case name
    instead
  • if there is no object, use something
  • KM (the text-gen of (a Move with (object
    (_Hamster43))))("Manny's hamster moves.")
  • KM (the text-gen of (a Move with (instrument
    ((a Tangible-Entity with (plays ((a
    Vehicle))))))))("The vehicle moves the object.")
  • KM (the text-gen of (a Produce))("The result
    gets produced from the raw-material.")

19
The of Events
  • for some list of slots
  • for very general Entities, use the case name
    instead
  • KM (the text-gen of (a Store with (base ((a
    Tangible-Entity)))))("The object gets stored in
    the base.")
  • KM (the text-gen of (a Withdraw with (base ((a
    Tangible-Entity)))))("The object gets withdrawn
    from the base.")
  • KM (the text-gen of (a Enter with (base ((a
    Tangible-Entity)))))
  • ("The object enters the container through the
    portal.")
  • KM (the text-gen of _Move138)("The wheel moves
    manny's hamster from the cageto the door.")

20
text-particle
  • one more thing
  • some verbs have particles that are part of the
    verbseq, but may be separated from the main verb
  • look up a number ? look it up
  • the text-particle slot can appear anywhere among
    the arguments
  • KM (the text-gen of (a Knock-Down))("Something
    gets knocked down.")
  • KM (the text-gen of (a Knock-Down with (agent
    ((a Entity))) (object ((a Object)))))("The agent
    knocks the object down.")

21
The text-gen of States
  • mostly covered by the text-gen of Events
  • the is by default keeps
  • the is by default is
  • the state itself is handled by text-particle
  • KM (the text-gen of (a Be-Accessible))("The
    object is accessible.")
  • KM (the text-gen of (a Be-Accessible
    with (agent ((a Entity)))))("The agent keeps
    the object accessible.")

22
Outline
  • Motivation
  • Why UT is doing text generation
  • Interface
  • What goes in and what comes out
  • Customization
  • How to adapt for new classes
  • Future Work
  • What to do next

23
Customizing Text Generation
  • the text generation system involves 33 special
    slots that specify the words used in text
    generation and the rules for combining them
  • all slots are inherit-with-overrides so any
    subclass can redefine any part of text generation
  • all slots are dont-cache-values so when instances
    change their text-gen changes

24
Roll Your Own
  • usually the inherited text generation machinery
    is good enough for new classes
  • KM (Sneak-In has (superclasses
    (Enter)))(Sneak-In)
  • KM (the text-gen of (a Sneak-In with (base ((a
    Theater)))))("The object enters the theater
    through the portal.")

25
Roll Your Own (cont.)
  • customizing text generation for a new Event class
    usually involves changes to only a few lexicon
    slots
  • KM (every Sneak-In has (text-active-verbseq-sg
    ("sneaks"))
  • (text-active-verbseq-pl ("sneak"))
  • (text-base ("into")))(Sneak-In)
  • KM (the text-gen of (a Sneak-In with (base ((a
    Theater)))))("The object sneaks into the theater
    through the portal.")

26
Roll Your Own (cont.)
  • sometimes customization demands more
  • KM (Bequeath has (superclasses (Action)))
  • KM (every Bequeath has (donor ((a
    Entity))) (recipient ((a Entity))))
  • KM (the text-gen of (a Bequeath))("Something
    has bequeath done to it.")
  • KM (every Bequeath has (text-active-verbseq-sg
    ("bequeaths")) (text-active-verbseq-pl
    ("bequeath")) (text-passive-verbseq-sg ("is
    bequeathed")) (text-passive-verbseq-pl ("are
    bequeathed")) (text-subj ((the donor of
    Self))) (text-argslots ((seq recipient
    instrument))) (text-recipient
    ("to")) (text-instrument ("in")))
  • KM (the text-gen of (a Bequeath with (object
    ((a Money))) (instrument ((a Will)))))("The
    donor bequeaths the money to the object in the
    will.")

27
Outline
  • Motivation
  • Why UT is doing text generation
  • Interface
  • What goes in and what comes out
  • Customization
  • How to adapt for new classes
  • Future Work
  • What to do next

28
Future Work
  • stop working on text gen, dammit!
Write a Comment
User Comments (0)
About PowerShow.com