180 likes | 297 Views
Automatic Creation of Web Services from Extraction Ontologies. Cui Tao, Yihong Ding , and Deryle Lonsdale Brigham Young University. 1 st International Workshop on Semantic Web Applications: Theory and Practice (SemWAT 2006) in affiliation with ER 2006, Tucson, Arizona, November 2006.
E N D
Automatic Creation of Web Services from Extraction Ontologies Cui Tao, Yihong Ding, and Deryle Lonsdale Brigham Young University 1st International Workshop on Semantic Web Applications: Theory and Practice (SemWAT 2006) in affiliation with ER 2006, Tucson, Arizona, November 2006
Motivation • Semantic Web • Machine-understandable • Ontology: formal specification of conceptualizations • Web services • Convention descriptions for mapping knowledge into and out of Web application programs • Machine-executable • Normally not machine-understandable • Can Semantic Web technologies help in creating machine-understandable (semantic) web services? SemWAT 2006, Tucson, AZ, November 2006
Ontology Web Services (2) Ontology construction (1) Web service creation Current Solution: Web Service Annotation Annotation (3) Web service annotation SemWAT 2006, Tucson, AZ, November 2006
Ontology (1) Ontology construction Alternate Solution: Can we do better? Ontology-based generation Semantic Web Services (2) Web service creation SemWAT 2006, Tucson, AZ, November 2006
Java Classes Direct Semantic Web Service Generation from Ontologies Ontology Atomic Semantic Web Services compose compile generate Complex Semantic Web Service SemWAT 2006, Tucson, AZ, November 2006
Data-Extraction Ontologies • Semantically equivalent to OWL ontologies • Object sets --- Classes • Relationship sets --- Properties • Constraints --- Restrictions • Data frames: unique ontology components • Formal specifications of data recognition patterns • Executable for data extraction SemWAT 2006, Tucson, AZ, November 2006
Example: car-ad ontology (Graphical) SemWAT 2006, Tucson, AZ, November 2006
Example: car-ad ontology (OSM-L) Car [->object]; Car [0..1] has Year [1..*]; Car [0..1] has Make [1..*]; Car [0..1] has Mileage [1..*]; Car [0..*] has Feature [1..*]; Car [0..1] has Price [1..*]; PhoneNr [1..*] is for Car [0..*]; Year matches [4] constant {extract “\d{2}”; context "([^\$\d]|^)[4-9]\d,[^\d]"; substitute "^" -> "19"; }, … End; SemWAT 2006, Tucson, AZ, November 2006
Two-stage Semantic Web Service Creation • From extraction ontologies to Java APIs • From Java APIs to semantic web services SemWAT 2006, Tucson, AZ, November 2006
From Extraction Ontologies to Java APIs • OSM-L parsing • Symbol table creation • Java code generation SemWAT 2006, Tucson, AZ, November 2006
Concept name : String type : boolean length : int dataFrame : Vector relationSet : Vector recognize () : String [] listRelation () : Vector checkSuperClass(): boolean Relationship concept1 : Concept concept2 : Concept constraint : Constraint checkConstraint (String[], String[]) : boolean Java Code Generation • Concepts Java interfaces • Multiple inheritance • Implemented classes • Executable methods • Others Java classes • Specific fields and methods • E.g. binary relationship • Fields: two concepts and constraints • Method: checkConstraint SemWAT 2006, Tucson, AZ, November 2006
From Java APIs to Semantic Web Services • Atomic data recognition web service • Each lexical ontology concept • Method: recognize() : string[] • Generate in a straightforward manner • Several available tools: such as GLUE (http://www.themindelectric.com) • Automatically created WSDL descriptions • Semantic web services SemWAT 2006, Tucson, AZ, November 2006
Semantic WSDL SemWAT 2006, Tucson, AZ, November 2006
Simple Semantic Service Composition • Binary relationship service extraction • Two atomic concept extraction services + one binary relation constraint checking service • E.g. a complex service extracting car-price pairs: • Car instance extraction service • Price instance extraction service • checkConstraint(car-price) SemWAT 2006, Tucson, AZ, November 2006
Generic Web Service Composition • Logic rules derived from ontologies can be straightforwardly composed: • Checking existence • Extracting instances • Comparing values • Checking constraints • Future work: Can we convert any human request to logic rules based on ontologies? SemWAT 2006, Tucson, AZ, November 2006
Conclusion • Semantic web service creation is a crucial problem in current Semantic Web and web service research • We present a novel two-stage Semantic Web service generation paradigm • From extraction ontologies to Java APIs • From Java APIs to web services • Uniqueness of our approach • Avoids service annotation • Facilitates complex service composition SemWAT 2006, Tucson, AZ, November 2006
OSM-L Parsing (27 grammars) # 26 # 7 SemWAT 2006, Tucson, AZ, November 2006
Symbol Table (e.g. data-frame ST) • Data Frame • Constant block(1) • Lexicon block(0:1) • Keyword block(0:1) ConstantElement block (1:*) • Extract Pattern (1) • Context Pattern (0:1) • Except Pattern (0:1) • Filter Pattern (0:1) • Substitute Pattern (0:1) … … • extract-type, • context-type, • except-type, • filter-type, • substitute-type, • keyword-type, • lexicon-type Pattern: Regular expression Case tag Pattern type SemWAT 2006, Tucson, AZ, November 2006