From OSM-L to JAVA
-
Upload
george-alford -
Category
Documents
-
view
26 -
download
2
description
Transcript of From OSM-L to JAVA
![Page 1: From OSM-L to JAVA](https://reader035.fdocuments.us/reader035/viewer/2022062422/5681313b550346895d97b1a5/html5/thumbnails/1.jpg)
From OSM-L to JAVAFrom OSM-L to JAVA
Cui Tao
Yihong Ding
![Page 2: From OSM-L to JAVA](https://reader035.fdocuments.us/reader035/viewer/2022062422/5681313b550346895d97b1a5/html5/thumbnails/2.jpg)
Overview of OSM
![Page 3: From OSM-L to JAVA](https://reader035.fdocuments.us/reader035/viewer/2022062422/5681313b550346895d97b1a5/html5/thumbnails/3.jpg)
OSM
OSM (Object-oriented Systems Model)– Use for system analysis, specification, design,
implementation, and evaluation– Structural components: object sets and
relationship sets • Object set: generalization/specialization• Relationship set: n-ary relationships, cardinality
constraints
– Usually shown graphically
![Page 4: From OSM-L to JAVA](https://reader035.fdocuments.us/reader035/viewer/2022062422/5681313b550346895d97b1a5/html5/thumbnails/4.jpg)
Sample OSM for Cars(Graphic Version)
Year Price
Make Mileage
Model
Feature
PhoneNr
Extension
Car
hashas
has
has is for
has
has
has
1..*
0..1
1..*
1..* 1..*
1..*
1..*
1..*
0..1 0..10..1
0..1
0..1
0..1
0..*
1..*
![Page 5: From OSM-L to JAVA](https://reader035.fdocuments.us/reader035/viewer/2022062422/5681313b550346895d97b1a5/html5/thumbnails/5.jpg)
OSM-L and Ontology
OSM-L: A textual language for representing OSM application models.
Ontology: A program written in OSM-L to provide the database schema, relationship sets and a knowledge base to the extractor
For each application domain, we have to write a new ontology depend on the user’s request
![Page 6: From OSM-L to JAVA](https://reader035.fdocuments.us/reader035/viewer/2022062422/5681313b550346895d97b1a5/html5/thumbnails/6.jpg)
Car-Ads OntologyCar [->object];Car [0..1] has Year [1..*];Car [0..1] has Make [1..*];Car [0...1] has Model [1..*];Car [0..1] has Mileage [1..*];Car [0..*] has Feature [1..*];Car [0..1] has Price [1..*];PhoneNr [1..*] is for Car [0..*];PhoneNr [0..1] has Extension [1..*];Year matches [4]
constant {extract “\d{2}”; context "([^\$\d]|^)[4-9]\d,[^\d]"; substitute "^" -> "19"; }, …End;
![Page 7: From OSM-L to JAVA](https://reader035.fdocuments.us/reader035/viewer/2022062422/5681313b550346895d97b1a5/html5/thumbnails/7.jpg)
Data Extraction
![Page 8: From OSM-L to JAVA](https://reader035.fdocuments.us/reader035/viewer/2022062422/5681313b550346895d97b1a5/html5/thumbnails/8.jpg)
Information ExchangeSource Target
InformationExtraction
SchemaMatching
Leveragethis …
… to dothis
![Page 9: From OSM-L to JAVA](https://reader035.fdocuments.us/reader035/viewer/2022062422/5681313b550346895d97b1a5/html5/thumbnails/9.jpg)
Extracting Pertinent Information from Documents
![Page 10: From OSM-L to JAVA](https://reader035.fdocuments.us/reader035/viewer/2022062422/5681313b550346895d97b1a5/html5/thumbnails/10.jpg)
Recognition and Extraction
Car Year Make Model Mileage Price PhoneNr0001 1989 Subaru SW $1900 (363)835-85970002 1998 Elandra (336)526-54440003 1994 HONDA ACCORD EX 100K (336)526-1081
Car Feature0001 Auto0001 AC0002 Black0002 4 door0002 tinted windows0002 Auto0002 pb0002 ps0002 cruise0002 am/fm0002 cassette stero0002 a/c0003 Auto0003 jade green0003 gold
![Page 11: From OSM-L to JAVA](https://reader035.fdocuments.us/reader035/viewer/2022062422/5681313b550346895d97b1a5/html5/thumbnails/11.jpg)
![Page 12: From OSM-L to JAVA](https://reader035.fdocuments.us/reader035/viewer/2022062422/5681313b550346895d97b1a5/html5/thumbnails/12.jpg)
OSM
• Object Set
• Relationship Set {
-- connection {
object set
constraint
}
}
Structure
Nonlexical
Lexical {
object name
data frame
}
Data frame {
extraction rule
context rule
substitution rule
keyword
}
Schema Generation Interface
Schema implements
Table-Insertion Interface{
relational database tables
insert methods
}
Matching Process
Retrieved Data
Database Population Interface
![Page 13: From OSM-L to JAVA](https://reader035.fdocuments.us/reader035/viewer/2022062422/5681313b550346895d97b1a5/html5/thumbnails/13.jpg)
Parser and Symbol Table
Generate parse tree Design the structure of symbol table
![Page 14: From OSM-L to JAVA](https://reader035.fdocuments.us/reader035/viewer/2022062422/5681313b550346895d97b1a5/html5/thumbnails/14.jpg)
Data Extraction
![Page 15: From OSM-L to JAVA](https://reader035.fdocuments.us/reader035/viewer/2022062422/5681313b550346895d97b1a5/html5/thumbnails/15.jpg)
Extraction Rules
Defines the expecting pattern of string to extract.
![Page 16: From OSM-L to JAVA](https://reader035.fdocuments.us/reader035/viewer/2022062422/5681313b550346895d97b1a5/html5/thumbnails/16.jpg)
Context Rules
Defines the context constraint of the target pattern.
![Page 17: From OSM-L to JAVA](https://reader035.fdocuments.us/reader035/viewer/2022062422/5681313b550346895d97b1a5/html5/thumbnails/17.jpg)
Substitution Rules
Defines the substitution situation if applicable.
![Page 18: From OSM-L to JAVA](https://reader035.fdocuments.us/reader035/viewer/2022062422/5681313b550346895d97b1a5/html5/thumbnails/18.jpg)
Keywords
Defines keywords to get rid of ambiguity if it happens.
![Page 19: From OSM-L to JAVA](https://reader035.fdocuments.us/reader035/viewer/2022062422/5681313b550346895d97b1a5/html5/thumbnails/19.jpg)
Knowledge Representation
Current knowledge base– Static– Need peripheral programs
Our predicating knowledge base– Functional– Adaptive– Object-oriented
![Page 20: From OSM-L to JAVA](https://reader035.fdocuments.us/reader035/viewer/2022062422/5681313b550346895d97b1a5/html5/thumbnails/20.jpg)
Schema Generation
Domain
Attribute
Relation
Constraint
![Page 21: From OSM-L to JAVA](https://reader035.fdocuments.us/reader035/viewer/2022062422/5681313b550346895d97b1a5/html5/thumbnails/21.jpg)
Schema Generation
if(!existTable(“car”)
createStatement(createTable(
“createCar”);createCar =“
create table Car(ObjNr char(4) primary key,VIN char(4) unique,
Make char(10), : PhoneNr char(20),);
![Page 22: From OSM-L to JAVA](https://reader035.fdocuments.us/reader035/viewer/2022062422/5681313b550346895d97b1a5/html5/thumbnails/22.jpg)
Schema Generation
if(!existTable(“Feature”))
createStatement(createTable(
“createFeature”);
createFeature =“
create table Feature(
ObjNr char(4)
primary key,
Feature char(20),
);
![Page 23: From OSM-L to JAVA](https://reader035.fdocuments.us/reader035/viewer/2022062422/5681313b550346895d97b1a5/html5/thumbnails/23.jpg)
Schema Generation
if(!existTable(“Extension”))
createStatement(createTable(
“createExtension”);
createExtension =“
create table Extension(
PhoneNr char(14)
primary key,
Extension char(3),
);
![Page 24: From OSM-L to JAVA](https://reader035.fdocuments.us/reader035/viewer/2022062422/5681313b550346895d97b1a5/html5/thumbnails/24.jpg)
Insert Data
Collect all the values available for each object
Find out the position of each insert value Insert values for each object
Data.attribute
Data.value
Data.objNr
Data Record Table:
![Page 25: From OSM-L to JAVA](https://reader035.fdocuments.us/reader035/viewer/2022062422/5681313b550346895d97b1a5/html5/thumbnails/25.jpg)
Populate Database