Working with the Ontos Architecture - PowerPoint PPT Presentation

About This Presentation
Title:

Working with the Ontos Architecture

Description:

Working with the Ontos Architecture Where we re going What you should know – PowerPoint PPT presentation

Number of Views:28
Avg rating:3.0/5.0
Slides: 15
Provided by: AlanW177
Learn more at: https://www.deg.byu.edu
Category:

less

Transcript and Presenter's Notes

Title: Working with the Ontos Architecture


1
Working with the Ontos Architecture
  • Where were going
  • What you should know

2
Overview
  • Current and future architecture
  • Backwards compatibility
  • Working with OSMX documents
  • CVS techniques
  • Java tips, resources, best practices

3
Current Architecture
  • Ontologies OSM-L, osm.dtd
  • Ontology Editor
  • Data Frames rev. 2 support
  • Runs as applet or standalone app
  • Automatic layout algorithm
  • Reads osm.dtd-based docs
  • Writes to various formats (OSM-L, osm.dtd,
    PostScript)
  • Ontos
  • Handles XML and RDF as well as old files
  • Produces SQL insert statements
  • OSM-L parser, record boundary detector, etc.

4
Future Architecture
  • Ontologies OSMX (XML Schema)
  • Store data directly with ontology
  • Ontology Editor
  • Support new data frames ideas
  • Multiple phrases with confidence values
  • Specification of data types and units of measure
  • Methods
  • Import old files write OSMX
  • Data frame library management
  • Ontos
  • Gen/spec working with data frames
  • Work with new extraction framework

5
Backwards Compatibility
  • We dont want to lose or have to re-create old
    ontologies
  • Choice support old or convert them?
  • Support could be difficult over time
  • Conversion auto, manual, hybrid?
  • XML Transform (XSLT) will help with conversion
    but not all the way
  • Manual tedious, one-time effort
  • How many ontologies are we talking about?

6
Working with OSMX
  • Reading and writing OSMX
  • Use JAXB-generated classes

// First get a JAXBContext instance from the
factory method // Pass in the package containing
the binding classes JAXBContext ctxt
JAXBContext.newInstance("edu.byu.deg.osmx.binding"
) // We now wish to get an in-memory object
tree from the source file Unmarshaller u
ctxt.createUnmarshaller() OSM osm (OSM)
u.unmarshal(new java.io.File("some-file.xml")) /
/ From here the OSM object may be used and
modified however you please. // Now we wish to
write the in-memory objects to a destination
file Marshaller m ctxt.createMarshaller() m.mar
shal(osm, new java.io.FileWriter(new
java.io.File("some-result.xml")))
7
OSMX Structure
ObjectSet
NameList
Name
DataFrame
InternalRepresentation
ValuePhraseList
ValuePhrase
KeywordPhraseList
KeywordPhrase
MethodList
OSM
8
Sample OSMX Document
ltOSM xmlnsxsi'http//www.w3.org/2001/XMLSchema-i
nstance' xsischemaLocation'http//www.deg.byu.
edu/xml/osmx.xsd
http//www.deg.byu.edu/xml/osmx.xsd'
xmlns'http//www.deg.byu.edu/xml/osmx.xsd'
order"1"gt ltMacro label"SomeMacro"gt0-9lt/Macr
ogt ltNotegtltText order"2" content"Some
note."gtlt/Textgtlt/Notegt lt/OSMgt
9
Available Projects
  • Data frame library management tool
  • Data instance validator
  • Convert and validate old ontologies
  • Automatic precision/recall calculator (store and
    reuse hand-tagged data)
  • OSM-L to OSMX converter (use existing C parser to
    emit XML?)
  • Data instance to SQL insert converter
  • OSMX to OSM-L stylesheet (XSLT)

10
CVS Techniques
  • Tagging Store a milestone
  • Branching Parallel development
  • Steps
  • Create tag/branch on selection or entire module
  • Update from repository, specifying tag/branch
  • Tag/branch sticks to your local working files
    when you commit changes
  • Merge branches when done
  • Switch to trunk or other branch using update

11
Java Best Practices
  • Coding standard
  • Follow Suns example
  • See Suns The Java Tutorial for samples
  • Use javadoc comments
  • Avoid hard-coded constants
  • Have editor expand tabs to spaces
  • Indent two spaces
  • Use white space thoughtfully

12
Using Java
  • Stay up-to-date but avoid bleeding edge where
    possible
  • Java 1.2 Swing (instead of AWT)
  • Java 1.3 Collections (instead of Vector,
    Hashtable, Enumeration)
  • Java 1.4 javax.xml, java.nio, asserts, logging,
    preferences,
  • Java 1.5 (coming) generic types, etc.
  • Check within code for support of new features so
    older VMs fail gracefully

13
Resources
  • java.sun.com
  • Tutorials
  • API documentation
  • developer.java.sun.com
  • TechTips e-mail newsletter
  • Free tools
  • Suns stuff, of course
  • JBuilder, Eclipse

14
Additional Resources
  • xml.apache.org (xerces, xalan)
  • w3.org (XML specs and resources)
  • xml.com (XML tutorials)
  • netbeans.org (good free Java IDE)
  • CVS repository
  • DEG website
Write a Comment
User Comments (0)
About PowerShow.com