160 likes | 295 Views
Ontology-Based Constraint Recognition in Free-Form Service Requests. Muhammed J. Al-Muhammed Brigham Young University. Sponsored in part by NSF (#0083127 and #0414644). Motivation. Enable machines to process natural language service requests Users can invoke services using natural language
E N D
Ontology-Based Constraint Recognition in Free-Form Service Requests Muhammed J. Al-Muhammed Brigham Young University Sponsored in part by NSF (#0083127 and #0414644)
Motivation • Enable machines to process natural language service requests • Users can invoke services using natural language • “Natural language queries are ultimate goal for querying databases.”
The Problem I want to see a dermatologist between the 5th and the 10th, at 1:00 PM or after. The dermatologist should be within 5 miles from my home and must accept my IHC insurance. Given a free-form service request Appointment(x0) is with Dermatologist(x1) /\ Appointment(x0) is for Person(x2) /\ Dermatologist(x0) has Name(x3) /\ Person(x2) has Name(x4) /\ Appointment(x0) is on Date(x5) /\ DateBetween(x5, “the 5th”, “the 10th”) /\Appointment(x0) is at Time(x6) /\ TimeAtOrAfter(x6, “1:00 PM) /\ Dermatologist(x1) is at Address(x7) /\Person(x2) is at Address(x8) /\ DistanceLessThanOrEqual(DistanceBetweenAddresses(x7, x8), “5”) /\ Dermatologist(x1) accepts Insurance(x9) /\ InsuranceEqual(x9, “IHC”)
Ontology-Based Resolution • Encode domain knowledge in a domain ontology • Match a service request with ontologies • Use the best matching ontology to generate a formalism
generalization/specialization mutual exclusion “+” Domain Ontology: Basic Concepts many-many functional optional
Domain Ontology: Data Frames Time … textual representation: ([2-9]|1[012]?)\s*:\s*([0-5]\d)\s*[AaPp]\s*\.?\s*[Mm]\s*\.?) TimeAtOrAfter(t1: Time, t2: Time) returns (Boolean) contextual keywords/phrases: (at\s+)?Time\s+or\s+after|… … Address … DistanceBetweenAddresses(a1: Address, a2: Address) returns (Distance) … Distance … textual representation: ((\d+(\.\d+)?)|(\.\d+)) … DistanceLessThanOrEqual(d1: Distance, d2: Distance) returns (Boolean) contextual keywords/phrases: (within|not\s+more\s+than |<\s*=|…)\s+Distance … Time … textual representation: ([2-9]|1[012]?)\s*:\s*([0-5]\d)\s*[AaPp]\s*\.?\s*[Mm]\s*\.?) TimeAtOrAfter(t1: Time, t2: Time) returns (Boolean) contextual keywords/phrases: (at\s+)?Time\s+or\s+after|… … Address … DistanceBetweenAddresses(a1: Address, a2: Address) returns (Distance) … Distance … textual representation: ((\d+(\.\d+)?)|(\.\d+)) … DistanceLessThanOrEqual(d1: Distance, d2: Distance) returns (Boolean) contextual keywords/phrases: (within|not\s+more\s+than |<\s*=|…)\s+Distance … Time … textual representation: ([2-9]|1[012]?)\s*:\s*([0-5]\d)\s*[AaPp]\s*\.?\s*[Mm]\s*\.?) TimeAtOrAfter(t1: Time, t2: Time) returns (Boolean) contextual keywords/phrases: (at\s+)?Time\s+or\s+after|… … Address … DistanceBetweenAddresses(a1: Address, a2: Address) returns (Distance) … Distance … textual representation: ((\d+(\.\d+)?)|(\.\d+)) … DistanceLessThanOrEqual(d1: Distance, d2: Distance) returns (Boolean) contextual keywords/phrases: (within|not\s+more\s+than |<\s*=|…)\s+Distance … Time … textual representation: ([2-9]|1[012]?)\s*:\s*([0-5]\d)\s*[AaPp]\s*\.?\s*[Mm]\s*\.?) TimeAtOrAfter(t1: Time, t2: Time) returns (Boolean) contextual keywords/phrases: (at\s+)?Time\s+or\s+after|… … Address … DistanceBetweenAddresses(a1: Address, a2: Address) returns (Distance) … Distance … textual representation: ((\d+(\.\d+)?)|(\.\d+)) … DistanceLessThanOrEqual(d1: Distance, d2: Distance) returns (Boolean) contextual keywords/phrases: (within|not\s+more\s+than |<\s*=|…)\s+Distance …
Domain Ontology Recognition • Input: service request, domain ontologies • Output: a best matching marked-up ontology
Appointment context keywords/phrase: “appointment |want to see a |…” Time textual representation: “([2-9]|1[012]?)\s*:\s*([0-5]\d)\s*[AaPp]\s*\.?\s*[Mm]\s*\.?)” TimeAtOrAfter(t1: Time, t2: Time) returns (Boolean) contextual keywords/phrases: (at\s+)?Time\s+or\s+after|… Date DateBetween(x1: Date, x2: Date, x3: Date) returns(Boolean) contextual keywords/phrases: between\s+Date\s+and\s+Date …. Distance textual representation: ((\d+(\.\d+)?)|(\.\d+)) context keywords/phrases: miles? | kilometers? | … DistanceLessThanOrEqual(d1: Distance, d2: Distance) returns (Boolean) contextual keywords/phrases: (within|…)\s+Distance|… I want to see a dermatologist between the 5th and the 10th, at 1:00 PM or after. The dermatologist should be within 5 miles from my home and must accept my IHC insurance.
Appointment context keywords/phrase: “appointment |want to see a |…” Time textual representation: “([2-9]|1[012]?)\s*:\s*([0-5]\d)\s*[AaPp]\s*\.?\s*[Mm]\s*\.?)” TimeAtOrAfter(t1: Time, t2: Time) returns (Boolean) contextual keywords/phrases: (at\s+)?Time\s+or\s+after|… Date DateBetween(x1: Date, x2: Date, x3: Date) returns(Boolean) contextual keywords/phrases: between\s+Date\s+and\s+Date …. Distance textual representation: ((\d+(\.\d+)?)|(\.\d+)) context keywords/phrases: miles? | kilometers? | … DistanceLessThanOrEqual(d1: Distance, d2: Distance) returns (Boolean) contextual keywords/phrases: (within|…)\s+Distance|… I want to see adermatologistbetween the 5th and the 10th, at 1:00 PM or after. The dermatologist should be within 5 miles from my home and must accept my IHC insurance.
Marked-Up Domain Ontology Distance DistanceLessThanOrEqual(d1: Distance, “5”) TimeAtOrAfter(t1: Time, “1:00 PM”) DateBetween(x1: Date, “the 5th”, “the 10th”) InsuranceEqual(i1: Insurance, “IHC”)
Relevant Object and Relationship Sets Identification
Relevant Object Relationship Sets Identification Dermatologist(x1) is at Address(x2) Appointment(x0) is with Dermatologist(x1)
Relevant Operation Identification TimeAtOrAfter(t1: Time, “1:00 PM”) DateBetween(x1: Date, “the 5th”, “the 10th”) InsuranceEqual(i1: Insurance, “IHC”) DistanceLessThanOrEqual(d1: Distance, “5”) Appointment(x0) is at Time(t1) /\ TimeAtOrAfter(t1, “1:00 PM”) DateBetween(x1: Date, “the 5th”, “the 10th”) InsuranceEqual(i1: Insurance, “IHC”) DistanceLessThanOrEqual(d1: Distance, “5”) Appointment(x0) is at Time(t1) /\ TimeAtOrAfter(t1, “1:00 PM”) Appointment(x0) is at Date(x1) /\DateBetween(x1, “the 5th”, “the 10th”) Dermatologist(x1) accepts Insurance(i1) /\ InsuranceEqual(i1, “IHC”) DistanceLessThanOrEqual(d1: Distance, “5”) Appointment(x0) is at Time(t1) /\ TimeAtOrAfter(t1, “1:00 PM”) Appointment(x0) is at Date(x1) /\DateBetween(x1, “the 5th”, “the 10th”) Dermatologist(x1) accepts Insurance(i1) /\ InsuranceEqual(i1, “IHC”) Dermatologist(x1) is at Address(a1) /\ Person(x2) is at Address(a2) /\ DistanceLessThanOrEqual(DistanceBetweenAddresses(a1, a2),“5”) Appointment(x0) is at Time(t1) /\ TimeAtOrAfter(t1, “1:00 PM”) Appointment(x0) is at Date(x1) /\DateBetween(x1, “the 5th”, “the 10th”) Dermatologist(x1) accepts Insurance(i1) /\ InsuranceEqual(i1, “IHC”) DistanceLessThanOrEqual(d1: Distance, “5”) Appointment(x0) is at Time(t1) /\ TimeAtOrAfter(t1, “1:00 PM”) Appointment(x0) is at Date(x1) /\DateBetween(x1, “the 5th”, “the 10th”) Dermatologist(x1) accepts Insurance(i1) /\ InsuranceEqual(i1, “IHC”) DistanceLessThanOrEqual(DistanceBetweenAddresses(a1: Address, a2: Address),“5”) … Address … DistanceBetweenAddresses(a1: Address, a2: Address) returns (Distance) …
The Formal Representation Appointment(x0) is with Dermatologist(x1) /\ Appointment(x0) is for Person(x2) /\ Dermatologist(x1) has Name(x3) /\ Person(x2) has Name(x4) /\ Appointment(x0) is on Date(x5) /\ DateBetween(x5, “the 5th”, “the 10th”) /\Appointment(x0) is at Time(x6) /\ TimeAtOrAfter(x6, “1:00 PM) /\ Dermatologist(x1) is at Address(x7) /\ Person(x2) is at Address(x8) /\ DistanceLessThanOrEqual(DistanceBetweenAddresses(x7, x8), “5”) /\ Dermatologist(x1) accepts Insurance(x9) /\ InsuranceEqual(x9, “IHC”)
Performance Analysis • Tested on appointment, car purchase, and apartment rental domains • Subjects provided 31 service requests • 548 predicates • 170 arguments • Results