From: <lor...@us...> - 2011-07-13 08:30:26
|
Revision: 2947 http://dl-learner.svn.sourceforge.net/dl-learner/?rev=2947&view=rev Author: lorenz_b Date: 2011-07-13 08:30:07 +0000 (Wed, 13 Jul 2011) Log Message: ----------- Started new project autosparql-lite. Added Paths: ----------- trunk/autosparql-lite/ trunk/autosparql-lite/.classpath trunk/autosparql-lite/.project trunk/autosparql-lite/pom.xml trunk/autosparql-lite/src/ trunk/autosparql-lite/src/main/ trunk/autosparql-lite/src/main/java/ trunk/autosparql-lite/src/main/java/org/ trunk/autosparql-lite/src/main/java/org/autosparql/ trunk/autosparql-lite/src/main/java/org/autosparql/client/ trunk/autosparql-lite/src/main/java/org/autosparql/client/AppEvents.java trunk/autosparql-lite/src/main/java/org/autosparql/client/Application.java trunk/autosparql-lite/src/main/java/org/autosparql/client/AutoSPARQLService.java trunk/autosparql-lite/src/main/java/org/autosparql/client/AutoSPARQLServiceAsync.java trunk/autosparql-lite/src/main/java/org/autosparql/client/TestData.java trunk/autosparql-lite/src/main/java/org/autosparql/client/controller/ trunk/autosparql-lite/src/main/java/org/autosparql/client/controller/ApplicationController.java trunk/autosparql-lite/src/main/java/org/autosparql/client/view/ trunk/autosparql-lite/src/main/java/org/autosparql/client/view/ApplicationView.java trunk/autosparql-lite/src/main/java/org/autosparql/client/widget/ trunk/autosparql-lite/src/main/java/org/autosparql/client/widget/ErrorDialog.java trunk/autosparql-lite/src/main/java/org/autosparql/client/widget/ImageCellRenderer.java trunk/autosparql-lite/src/main/java/org/autosparql/client/widget/InputPanel.java trunk/autosparql-lite/src/main/java/org/autosparql/client/widget/SearchResultPanel.java trunk/autosparql-lite/src/main/java/org/autosparql/server/ trunk/autosparql-lite/src/main/java/org/autosparql/server/AutoSPARQLServiceImpl.java trunk/autosparql-lite/src/main/java/org/autosparql/shared/ trunk/autosparql-lite/src/main/java/org/autosparql/shared/Endpoint.java trunk/autosparql-lite/src/main/java/org/autosparql/shared/Example.java trunk/autosparql-lite/src/main/resources/ trunk/autosparql-lite/src/main/resources/endpoints.xml trunk/autosparql-lite/src/main/resources/org/ trunk/autosparql-lite/src/main/resources/org/autosparql/ trunk/autosparql-lite/src/main/resources/org/autosparql/Application.gwt.xml trunk/autosparql-lite/src/main/resources/org/autosparql/client/ trunk/autosparql-lite/src/main/resources/org/autosparql/server/ trunk/autosparql-lite/src/main/resources/org/autosparql/server/endpoints.xml trunk/autosparql-lite/src/main/webapp/ trunk/autosparql-lite/src/main/webapp/Application.css trunk/autosparql-lite/src/main/webapp/Application.html trunk/autosparql-lite/src/main/webapp/WEB-INF/ trunk/autosparql-lite/src/main/webapp/WEB-INF/classes/ trunk/autosparql-lite/src/main/webapp/WEB-INF/lib/ trunk/autosparql-lite/src/main/webapp/WEB-INF/web.xml trunk/autosparql-lite/src/main/webapp/gxt/ trunk/autosparql-lite/src/main/webapp/gxt/chart/ trunk/autosparql-lite/src/main/webapp/gxt/chart/open-flash-chart.swf trunk/autosparql-lite/src/main/webapp/gxt/css/ trunk/autosparql-lite/src/main/webapp/gxt/css/gxt-all.css trunk/autosparql-lite/src/main/webapp/gxt/css/gxt-gray.css trunk/autosparql-lite/src/main/webapp/gxt/desktop/ trunk/autosparql-lite/src/main/webapp/gxt/desktop/css/ trunk/autosparql-lite/src/main/webapp/gxt/desktop/css/desktop.css trunk/autosparql-lite/src/main/webapp/gxt/desktop/images/ trunk/autosparql-lite/src/main/webapp/gxt/desktop/images/desktop.gif trunk/autosparql-lite/src/main/webapp/gxt/desktop/images/desktop3.jpg trunk/autosparql-lite/src/main/webapp/gxt/desktop/images/gears.gif trunk/autosparql-lite/src/main/webapp/gxt/desktop/images/gears.png trunk/autosparql-lite/src/main/webapp/gxt/desktop/images/grid.png trunk/autosparql-lite/src/main/webapp/gxt/desktop/images/hatch.gif trunk/autosparql-lite/src/main/webapp/gxt/desktop/images/hd-bg.gif trunk/autosparql-lite/src/main/webapp/gxt/desktop/images/hd-tb-bg.gif trunk/autosparql-lite/src/main/webapp/gxt/desktop/images/icon_padlock.png trunk/autosparql-lite/src/main/webapp/gxt/desktop/images/icons-bg.png trunk/autosparql-lite/src/main/webapp/gxt/desktop/images/launcher-bg.gif trunk/autosparql-lite/src/main/webapp/gxt/desktop/images/launcher-btn.gif trunk/autosparql-lite/src/main/webapp/gxt/desktop/images/logout.gif trunk/autosparql-lite/src/main/webapp/gxt/desktop/images/logout.png trunk/autosparql-lite/src/main/webapp/gxt/desktop/images/member.gif trunk/autosparql-lite/src/main/webapp/gxt/desktop/images/member.png trunk/autosparql-lite/src/main/webapp/gxt/desktop/images/powered.gif trunk/autosparql-lite/src/main/webapp/gxt/desktop/images/powered.png trunk/autosparql-lite/src/main/webapp/gxt/desktop/images/s.gif trunk/autosparql-lite/src/main/webapp/gxt/desktop/images/taskbar/ trunk/autosparql-lite/src/main/webapp/gxt/desktop/images/taskbar/black/ trunk/autosparql-lite/src/main/webapp/gxt/desktop/images/taskbar/black/item-over.gif trunk/autosparql-lite/src/main/webapp/gxt/desktop/images/taskbar/black/scroll-left.gif trunk/autosparql-lite/src/main/webapp/gxt/desktop/images/taskbar/black/scroll-right.gif trunk/autosparql-lite/src/main/webapp/gxt/desktop/images/taskbar/black/start-menu-left-corners.png trunk/autosparql-lite/src/main/webapp/gxt/desktop/images/taskbar/black/start-menu-left-right.png trunk/autosparql-lite/src/main/webapp/gxt/desktop/images/taskbar/black/start-menu-right-corners.png trunk/autosparql-lite/src/main/webapp/gxt/desktop/images/taskbar/black/start-menu-right.png trunk/autosparql-lite/src/main/webapp/gxt/desktop/images/taskbar/black/start-menu-top-bottom.png trunk/autosparql-lite/src/main/webapp/gxt/desktop/images/taskbar/black/startbutton-icon.gif trunk/autosparql-lite/src/main/webapp/gxt/desktop/images/taskbar/black/startbutton.gif trunk/autosparql-lite/src/main/webapp/gxt/desktop/images/taskbar/black/taskbar-split-h.gif trunk/autosparql-lite/src/main/webapp/gxt/desktop/images/taskbar/black/taskbar-start-panel-bg.gif trunk/autosparql-lite/src/main/webapp/gxt/desktop/images/taskbar/black/taskbutton.gif trunk/autosparql-lite/src/main/webapp/gxt/desktop/images/taskbar/black/taskbuttons-panel-bg.gif trunk/autosparql-lite/src/main/webapp/gxt/desktop/images/winbar-bg.gif trunk/autosparql-lite/src/main/webapp/gxt/desktop/images/winbar-btn.gif trunk/autosparql-lite/src/main/webapp/gxt/desktop/images/windows-bg.gif trunk/autosparql-lite/src/main/webapp/gxt/desktop/wallpapers/ trunk/autosparql-lite/src/main/webapp/gxt/desktop/wallpapers/desktop.jpg trunk/autosparql-lite/src/main/webapp/gxt/flash/ trunk/autosparql-lite/src/main/webapp/gxt/flash/swfobject.js trunk/autosparql-lite/src/main/webapp/gxt/images/ trunk/autosparql-lite/src/main/webapp/gxt/images/default/ trunk/autosparql-lite/src/main/webapp/gxt/images/default/box/ trunk/autosparql-lite/src/main/webapp/gxt/images/default/box/corners-blue.gif trunk/autosparql-lite/src/main/webapp/gxt/images/default/box/corners.gif trunk/autosparql-lite/src/main/webapp/gxt/images/default/box/l-blue.gif trunk/autosparql-lite/src/main/webapp/gxt/images/default/box/l.gif trunk/autosparql-lite/src/main/webapp/gxt/images/default/box/r-blue.gif trunk/autosparql-lite/src/main/webapp/gxt/images/default/box/r.gif trunk/autosparql-lite/src/main/webapp/gxt/images/default/box/tb-blue.gif trunk/autosparql-lite/src/main/webapp/gxt/images/default/box/tb.gif trunk/autosparql-lite/src/main/webapp/gxt/images/default/button/ trunk/autosparql-lite/src/main/webapp/gxt/images/default/button/arrow.gif trunk/autosparql-lite/src/main/webapp/gxt/images/default/button/btn-arrow.gif trunk/autosparql-lite/src/main/webapp/gxt/images/default/button/btn-sprite.gif trunk/autosparql-lite/src/main/webapp/gxt/images/default/button/btn.gif trunk/autosparql-lite/src/main/webapp/gxt/images/default/button/group-cs.gif trunk/autosparql-lite/src/main/webapp/gxt/images/default/button/group-lr.gif trunk/autosparql-lite/src/main/webapp/gxt/images/default/button/group-tb.gif trunk/autosparql-lite/src/main/webapp/gxt/images/default/button/s-arrow-b-noline.gif trunk/autosparql-lite/src/main/webapp/gxt/images/default/button/s-arrow-b.gif trunk/autosparql-lite/src/main/webapp/gxt/images/default/button/s-arrow-bo.gif trunk/autosparql-lite/src/main/webapp/gxt/images/default/button/s-arrow-noline.gif trunk/autosparql-lite/src/main/webapp/gxt/images/default/button/s-arrow-o.gif trunk/autosparql-lite/src/main/webapp/gxt/images/default/button/s-arrow.gif trunk/autosparql-lite/src/main/webapp/gxt/images/default/dd/ trunk/autosparql-lite/src/main/webapp/gxt/images/default/dd/drop-add.gif trunk/autosparql-lite/src/main/webapp/gxt/images/default/dd/drop-no.gif trunk/autosparql-lite/src/main/webapp/gxt/images/default/dd/drop-yes.gif trunk/autosparql-lite/src/main/webapp/gxt/images/default/editor/ trunk/autosparql-lite/src/main/webapp/gxt/images/default/editor/tb-bold.gif trunk/autosparql-lite/src/main/webapp/gxt/images/default/editor/tb-font-color.gif trunk/autosparql-lite/src/main/webapp/gxt/images/default/editor/tb-font-decrease.gif trunk/autosparql-lite/src/main/webapp/gxt/images/default/editor/tb-font-highlight.gif trunk/autosparql-lite/src/main/webapp/gxt/images/default/editor/tb-font-increase.gif trunk/autosparql-lite/src/main/webapp/gxt/images/default/editor/tb-italic.gif trunk/autosparql-lite/src/main/webapp/gxt/images/default/editor/tb-justify-center.gif trunk/autosparql-lite/src/main/webapp/gxt/images/default/editor/tb-justify-left.gif trunk/autosparql-lite/src/main/webapp/gxt/images/default/editor/tb-justify-right.gif trunk/autosparql-lite/src/main/webapp/gxt/images/default/editor/tb-link.gif trunk/autosparql-lite/src/main/webapp/gxt/images/default/editor/tb-ol.gif trunk/autosparql-lite/src/main/webapp/gxt/images/default/editor/tb-source.gif trunk/autosparql-lite/src/main/webapp/gxt/images/default/editor/tb-sprite.gif trunk/autosparql-lite/src/main/webapp/gxt/images/default/editor/tb-ul.gif trunk/autosparql-lite/src/main/webapp/gxt/images/default/editor/tb-underline.gif trunk/autosparql-lite/src/main/webapp/gxt/images/default/form/ trunk/autosparql-lite/src/main/webapp/gxt/images/default/form/checkbox.gif trunk/autosparql-lite/src/main/webapp/gxt/images/default/form/clear-trigger.gif trunk/autosparql-lite/src/main/webapp/gxt/images/default/form/date-trigger.gif trunk/autosparql-lite/src/main/webapp/gxt/images/default/form/error-tip-corners.gif trunk/autosparql-lite/src/main/webapp/gxt/images/default/form/exclamation.gif trunk/autosparql-lite/src/main/webapp/gxt/images/default/form/radio.gif trunk/autosparql-lite/src/main/webapp/gxt/images/default/form/search-trigger.gif trunk/autosparql-lite/src/main/webapp/gxt/images/default/form/spinner.gif trunk/autosparql-lite/src/main/webapp/gxt/images/default/form/text-bg.gif trunk/autosparql-lite/src/main/webapp/gxt/images/default/form/trigger-tpl.gif trunk/autosparql-lite/src/main/webapp/gxt/images/default/form/trigger.gif trunk/autosparql-lite/src/main/webapp/gxt/images/default/gradient-bg.gif trunk/autosparql-lite/src/main/webapp/gxt/images/default/grid/ trunk/autosparql-lite/src/main/webapp/gxt/images/default/grid/arrow-left-white.gif trunk/autosparql-lite/src/main/webapp/gxt/images/default/grid/arrow-right-white.gif trunk/autosparql-lite/src/main/webapp/gxt/images/default/grid/col-move-bottom.gif trunk/autosparql-lite/src/main/webapp/gxt/images/default/grid/col-move-top.gif trunk/autosparql-lite/src/main/webapp/gxt/images/default/grid/columns.gif trunk/autosparql-lite/src/main/webapp/gxt/images/default/grid/dirty.gif trunk/autosparql-lite/src/main/webapp/gxt/images/default/grid/done.gif trunk/autosparql-lite/src/main/webapp/gxt/images/default/grid/drop-no.gif trunk/autosparql-lite/src/main/webapp/gxt/images/default/grid/drop-yes.gif trunk/autosparql-lite/src/main/webapp/gxt/images/default/grid/footer-bg.gif trunk/autosparql-lite/src/main/webapp/gxt/images/default/grid/grid-blue-hd.gif trunk/autosparql-lite/src/main/webapp/gxt/images/default/grid/grid-blue-split.gif trunk/autosparql-lite/src/main/webapp/gxt/images/default/grid/grid-hrow.gif trunk/autosparql-lite/src/main/webapp/gxt/images/default/grid/grid-loading.gif trunk/autosparql-lite/src/main/webapp/gxt/images/default/grid/grid-split.gif trunk/autosparql-lite/src/main/webapp/gxt/images/default/grid/grid-vista-hd.gif trunk/autosparql-lite/src/main/webapp/gxt/images/default/grid/grid3-hd-btn.gif trunk/autosparql-lite/src/main/webapp/gxt/images/default/grid/grid3-hrow-group.gif trunk/autosparql-lite/src/main/webapp/gxt/images/default/grid/grid3-hrow-over.gif trunk/autosparql-lite/src/main/webapp/gxt/images/default/grid/grid3-hrow.gif trunk/autosparql-lite/src/main/webapp/gxt/images/default/grid/grid3-special-col-bg.gif trunk/autosparql-lite/src/main/webapp/gxt/images/default/grid/grid3-special-col-sel-bg.gif trunk/autosparql-lite/src/main/webapp/gxt/images/default/grid/group-by.gif trunk/autosparql-lite/src/main/webapp/gxt/images/default/grid/group-expand-sprite.gif trunk/autosparql-lite/src/main/webapp/gxt/images/default/grid/hd-pop.gif trunk/autosparql-lite/src/main/webapp/gxt/images/default/grid/hmenu-asc.gif trunk/autosparql-lite/src/main/webapp/gxt/images/default/grid/hmenu-desc.gif trunk/autosparql-lite/src/main/webapp/gxt/images/default/grid/hmenu-lock.gif trunk/autosparql-lite/src/main/webapp/gxt/images/default/grid/hmenu-lock.png trunk/autosparql-lite/src/main/webapp/gxt/images/default/grid/hmenu-unlock.gif trunk/autosparql-lite/src/main/webapp/gxt/images/default/grid/hmenu-unlock.png trunk/autosparql-lite/src/main/webapp/gxt/images/default/grid/invalid_line.gif trunk/autosparql-lite/src/main/webapp/gxt/images/default/grid/loading.gif trunk/autosparql-lite/src/main/webapp/gxt/images/default/grid/mso-hd.gif trunk/autosparql-lite/src/main/webapp/gxt/images/default/grid/nowait.gif trunk/autosparql-lite/src/main/webapp/gxt/images/default/grid/page-first-disabled.gif trunk/autosparql-lite/src/main/webapp/gxt/images/default/grid/page-first.gif trunk/autosparql-lite/src/main/webapp/gxt/images/default/grid/page-last-disabled.gif trunk/autosparql-lite/src/main/webapp/gxt/images/default/grid/page-last.gif trunk/autosparql-lite/src/main/webapp/gxt/images/default/grid/page-next-disabled.gif trunk/autosparql-lite/src/main/webapp/gxt/images/default/grid/page-next.gif trunk/autosparql-lite/src/main/webapp/gxt/images/default/grid/page-prev-disabled.gif trunk/autosparql-lite/src/main/webapp/gxt/images/default/grid/page-prev.gif trunk/autosparql-lite/src/main/webapp/gxt/images/default/grid/pick-button.gif trunk/autosparql-lite/src/main/webapp/gxt/images/default/grid/refresh.gif trunk/autosparql-lite/src/main/webapp/gxt/images/default/grid/refresh.png trunk/autosparql-lite/src/main/webapp/gxt/images/default/grid/row-check-sprite.gif trunk/autosparql-lite/src/main/webapp/gxt/images/default/grid/row-expand-sprite.gif trunk/autosparql-lite/src/main/webapp/gxt/images/default/grid/row-over.gif trunk/autosparql-lite/src/main/webapp/gxt/images/default/grid/row-sel.gif trunk/autosparql-lite/src/main/webapp/gxt/images/default/grid/sort-hd.gif trunk/autosparql-lite/src/main/webapp/gxt/images/default/grid/sort_asc.gif trunk/autosparql-lite/src/main/webapp/gxt/images/default/grid/sort_desc.gif trunk/autosparql-lite/src/main/webapp/gxt/images/default/grid/wait.gif trunk/autosparql-lite/src/main/webapp/gxt/images/default/layout/ trunk/autosparql-lite/src/main/webapp/gxt/images/default/layout/collapse.gif trunk/autosparql-lite/src/main/webapp/gxt/images/default/layout/expand.gif trunk/autosparql-lite/src/main/webapp/gxt/images/default/layout/gradient-bg.gif trunk/autosparql-lite/src/main/webapp/gxt/images/default/layout/mini-bottom.gif trunk/autosparql-lite/src/main/webapp/gxt/images/default/layout/mini-left.gif trunk/autosparql-lite/src/main/webapp/gxt/images/default/layout/mini-right.gif trunk/autosparql-lite/src/main/webapp/gxt/images/default/layout/mini-top.gif trunk/autosparql-lite/src/main/webapp/gxt/images/default/layout/ns-collapse.gif trunk/autosparql-lite/src/main/webapp/gxt/images/default/layout/ns-expand.gif trunk/autosparql-lite/src/main/webapp/gxt/images/default/layout/panel-close.gif trunk/autosparql-lite/src/main/webapp/gxt/images/default/layout/panel-title-bg.gif trunk/autosparql-lite/src/main/webapp/gxt/images/default/layout/panel-title-light-bg.gif trunk/autosparql-lite/src/main/webapp/gxt/images/default/layout/stick.gif trunk/autosparql-lite/src/main/webapp/gxt/images/default/layout/stuck.gif trunk/autosparql-lite/src/main/webapp/gxt/images/default/layout/tab-close-on.gif trunk/autosparql-lite/src/main/webapp/gxt/images/default/layout/tab-close.gif trunk/autosparql-lite/src/main/webapp/gxt/images/default/menu/ trunk/autosparql-lite/src/main/webapp/gxt/images/default/menu/checked.gif trunk/autosparql-lite/src/main/webapp/gxt/images/default/menu/group-checked.gif trunk/autosparql-lite/src/main/webapp/gxt/images/default/menu/item-over.gif trunk/autosparql-lite/src/main/webapp/gxt/images/default/menu/menu-parent.gif trunk/autosparql-lite/src/main/webapp/gxt/images/default/menu/menu.gif trunk/autosparql-lite/src/main/webapp/gxt/images/default/menu/unchecked.gif trunk/autosparql-lite/src/main/webapp/gxt/images/default/panel/ trunk/autosparql-lite/src/main/webapp/gxt/images/default/panel/corners-sprite.gif trunk/autosparql-lite/src/main/webapp/gxt/images/default/panel/left-right.gif trunk/autosparql-lite/src/main/webapp/gxt/images/default/panel/light-hd.gif trunk/autosparql-lite/src/main/webapp/gxt/images/default/panel/tool-sprite-tpl.gif trunk/autosparql-lite/src/main/webapp/gxt/images/default/panel/tool-sprites.gif trunk/autosparql-lite/src/main/webapp/gxt/images/default/panel/tools-sprites-trans.gif trunk/autosparql-lite/src/main/webapp/gxt/images/default/panel/top-bottom.gif trunk/autosparql-lite/src/main/webapp/gxt/images/default/panel/top-bottom.png trunk/autosparql-lite/src/main/webapp/gxt/images/default/panel/white-corners-sprite.gif trunk/autosparql-lite/src/main/webapp/gxt/images/default/panel/white-left-right.gif trunk/autosparql-lite/src/main/webapp/gxt/images/default/panel/white-top-bottom.gif trunk/autosparql-lite/src/main/webapp/gxt/images/default/progress/ trunk/autosparql-lite/src/main/webapp/gxt/images/default/progress/progress-bg.gif trunk/autosparql-lite/src/main/webapp/gxt/images/default/qtip/ trunk/autosparql-lite/src/main/webapp/gxt/images/default/qtip/bg.gif trunk/autosparql-lite/src/main/webapp/gxt/images/default/qtip/close.gif trunk/autosparql-lite/src/main/webapp/gxt/images/default/qtip/tip-anchor-sprite.gif trunk/autosparql-lite/src/main/webapp/gxt/images/default/qtip/tip-sprite.gif trunk/autosparql-lite/src/main/webapp/gxt/images/default/s.gif trunk/autosparql-lite/src/main/webapp/gxt/images/default/shadow-c.png trunk/autosparql-lite/src/main/webapp/gxt/images/default/shadow-lr.png trunk/autosparql-lite/src/main/webapp/gxt/images/default/shadow.png trunk/autosparql-lite/src/main/webapp/gxt/images/default/shared/ trunk/autosparql-lite/src/main/webapp/gxt/images/default/shared/blue-loading.gif trunk/autosparql-lite/src/main/webapp/gxt/images/default/shared/calendar.gif trunk/autosparql-lite/src/main/webapp/gxt/images/default/shared/clear.gif trunk/autosparql-lite/src/main/webapp/gxt/images/default/shared/glass-bg.gif trunk/autosparql-lite/src/main/webapp/gxt/images/default/shared/hd-sprite.gif trunk/autosparql-lite/src/main/webapp/gxt/images/default/shared/large-loading.gif trunk/autosparql-lite/src/main/webapp/gxt/images/default/shared/left-btn.gif trunk/autosparql-lite/src/main/webapp/gxt/images/default/shared/loading-balls.gif trunk/autosparql-lite/src/main/webapp/gxt/images/default/shared/right-btn.gif trunk/autosparql-lite/src/main/webapp/gxt/images/default/shared/warning.gif trunk/autosparql-lite/src/main/webapp/gxt/images/default/sizer/ trunk/autosparql-lite/src/main/webapp/gxt/images/default/sizer/e-handle-dark.gif trunk/autosparql-lite/src/main/webapp/gxt/images/default/sizer/e-handle.gif trunk/autosparql-lite/src/main/webapp/gxt/images/default/sizer/ne-handle-dark.gif trunk/autosparql-lite/src/main/webapp/gxt/images/default/sizer/ne-handle.gif trunk/autosparql-lite/src/main/webapp/gxt/images/default/sizer/nw-handle-dark.gif trunk/autosparql-lite/src/main/webapp/gxt/images/default/sizer/nw-handle.gif trunk/autosparql-lite/src/main/webapp/gxt/images/default/sizer/s-handle-dark.gif trunk/autosparql-lite/src/main/webapp/gxt/images/default/sizer/s-handle.gif trunk/autosparql-lite/src/main/webapp/gxt/images/default/sizer/se-handle-dark.gif trunk/autosparql-lite/src/main/webapp/gxt/images/default/sizer/se-handle.gif trunk/autosparql-lite/src/main/webapp/gxt/images/default/sizer/square.gif trunk/autosparql-lite/src/main/webapp/gxt/images/default/sizer/sw-handle-dark.gif trunk/autosparql-lite/src/main/webapp/gxt/images/default/sizer/sw-handle.gif trunk/autosparql-lite/src/main/webapp/gxt/images/default/slider/ trunk/autosparql-lite/src/main/webapp/gxt/images/default/slider/slider-bg.png trunk/autosparql-lite/src/main/webapp/gxt/images/default/slider/slider-thumb.png trunk/autosparql-lite/src/main/webapp/gxt/images/default/slider/slider-v-bg.png trunk/autosparql-lite/src/main/webapp/gxt/images/default/slider/slider-v-thumb.png trunk/autosparql-lite/src/main/webapp/gxt/images/default/tabs/ trunk/autosparql-lite/src/main/webapp/gxt/images/default/tabs/scroll-left.gif trunk/autosparql-lite/src/main/webapp/gxt/images/default/tabs/scroll-right.gif trunk/autosparql-lite/src/main/webapp/gxt/images/default/tabs/scroller-bg.gif trunk/autosparql-lite/src/main/webapp/gxt/images/default/tabs/tab-btm-inactive-left-bg.gif trunk/autosparql-lite/src/main/webapp/gxt/images/default/tabs/tab-btm-inactive-right-bg.gif trunk/autosparql-lite/src/main/webapp/gxt/images/default/tabs/tab-btm-left-bg.gif trunk/autosparql-lite/src/main/webapp/gxt/images/default/tabs/tab-btm-right-bg.gif trunk/autosparql-lite/src/main/webapp/gxt/images/default/tabs/tab-close.gif trunk/autosparql-lite/src/main/webapp/gxt/images/default/tabs/tab-strip-bg.gif trunk/autosparql-lite/src/main/webapp/gxt/images/default/tabs/tab-strip-bg.png trunk/autosparql-lite/src/main/webapp/gxt/images/default/tabs/tab-strip-btm-bg.gif trunk/autosparql-lite/src/main/webapp/gxt/images/default/tabs/tabs-sprite.gif trunk/autosparql-lite/src/main/webapp/gxt/images/default/toolbar/ trunk/autosparql-lite/src/main/webapp/gxt/images/default/toolbar/bg.gif trunk/autosparql-lite/src/main/webapp/gxt/images/default/toolbar/btn-arrow-light.gif trunk/autosparql-lite/src/main/webapp/gxt/images/default/toolbar/btn-arrow.gif trunk/autosparql-lite/src/main/webapp/gxt/images/default/toolbar/btn-over-bg.gif trunk/autosparql-lite/src/main/webapp/gxt/images/default/toolbar/gray-bg.gif trunk/autosparql-lite/src/main/webapp/gxt/images/default/toolbar/more.gif trunk/autosparql-lite/src/main/webapp/gxt/images/default/toolbar/tb-bg.gif trunk/autosparql-lite/src/main/webapp/gxt/images/default/toolbar/tb-btn-sprite.gif trunk/autosparql-lite/src/main/webapp/gxt/images/default/toolbar/tb-xl-btn-sprite.gif trunk/autosparql-lite/src/main/webapp/gxt/images/default/toolbar/tb-xl-sep.gif trunk/autosparql-lite/src/main/webapp/gxt/images/default/tree/ trunk/autosparql-lite/src/main/webapp/gxt/images/default/tree/arrows.gif trunk/autosparql-lite/src/main/webapp/gxt/images/default/tree/drop-add.gif trunk/autosparql-lite/src/main/webapp/gxt/images/default/tree/drop-between.gif trunk/autosparql-lite/src/main/webapp/gxt/images/default/tree/drop-no.gif trunk/autosparql-lite/src/main/webapp/gxt/images/default/tree/drop-over.gif trunk/autosparql-lite/src/main/webapp/gxt/images/default/tree/drop-under.gif trunk/autosparql-lite/src/main/webapp/gxt/images/default/tree/drop-yes.gif trunk/autosparql-lite/src/main/webapp/gxt/images/default/tree/elbow-end-minus-nl.gif trunk/autosparql-lite/src/main/webapp/gxt/images/default/tree/elbow-end-minus.gif trunk/autosparql-lite/src/main/webapp/gxt/images/default/tree/elbow-end-plus-nl.gif trunk/autosparql-lite/src/main/webapp/gxt/images/default/tree/elbow-end-plus.gif trunk/autosparql-lite/src/main/webapp/gxt/images/default/tree/elbow-end.gif trunk/autosparql-lite/src/main/webapp/gxt/images/default/tree/elbow-line.gif trunk/autosparql-lite/src/main/webapp/gxt/images/default/tree/elbow-minus-nl.gif trunk/autosparql-lite/src/main/webapp/gxt/images/default/tree/elbow-minus.gif trunk/autosparql-lite/src/main/webapp/gxt/images/default/tree/elbow-plus-nl.gif trunk/autosparql-lite/src/main/webapp/gxt/images/default/tree/elbow-plus.gif trunk/autosparql-lite/src/main/webapp/gxt/images/default/tree/elbow.gif trunk/autosparql-lite/src/main/webapp/gxt/images/default/tree/folder-open.gif trunk/autosparql-lite/src/main/webapp/gxt/images/default/tree/folder.gif trunk/autosparql-lite/src/main/webapp/gxt/images/default/tree/leaf.gif trunk/autosparql-lite/src/main/webapp/gxt/images/default/tree/loading.gif trunk/autosparql-lite/src/main/webapp/gxt/images/default/tree/s.gif trunk/autosparql-lite/src/main/webapp/gxt/images/default/window/ trunk/autosparql-lite/src/main/webapp/gxt/images/default/window/icon-error.gif trunk/autosparql-lite/src/main/webapp/gxt/images/default/window/icon-info.gif trunk/autosparql-lite/src/main/webapp/gxt/images/default/window/icon-question.gif trunk/autosparql-lite/src/main/webapp/gxt/images/default/window/icon-warning.gif trunk/autosparql-lite/src/main/webapp/gxt/images/default/window/left-corners.png trunk/autosparql-lite/src/main/webapp/gxt/images/default/window/left-right.png trunk/autosparql-lite/src/main/webapp/gxt/images/default/window/right-corners.png trunk/autosparql-lite/src/main/webapp/gxt/images/default/window/top-bottom.png trunk/autosparql-lite/src/main/webapp/gxt/images/gray/ trunk/autosparql-lite/src/main/webapp/gxt/images/gray/button/ trunk/autosparql-lite/src/main/webapp/gxt/images/gray/button/btn-arrow.gif trunk/autosparql-lite/src/main/webapp/gxt/images/gray/button/btn-sprite.gif trunk/autosparql-lite/src/main/webapp/gxt/images/gray/button/btn.gif trunk/autosparql-lite/src/main/webapp/gxt/images/gray/button/group-cs.gif trunk/autosparql-lite/src/main/webapp/gxt/images/gray/button/group-lr.gif trunk/autosparql-lite/src/main/webapp/gxt/images/gray/button/group-tb.gif trunk/autosparql-lite/src/main/webapp/gxt/images/gray/form/ trunk/autosparql-lite/src/main/webapp/gxt/images/gray/form/spinner.gif trunk/autosparql-lite/src/main/webapp/gxt/images/gray/gradient-bg.gif trunk/autosparql-lite/src/main/webapp/gxt/images/gray/grid/ trunk/autosparql-lite/src/main/webapp/gxt/images/gray/grid/col-move-bottom.gif trunk/autosparql-lite/src/main/webapp/gxt/images/gray/grid/col-move-top.gif trunk/autosparql-lite/src/main/webapp/gxt/images/gray/grid/grid-split.gif trunk/autosparql-lite/src/main/webapp/gxt/images/gray/grid/grid3-hd-btn.gif trunk/autosparql-lite/src/main/webapp/gxt/images/gray/grid/grid3-hrow-over.gif trunk/autosparql-lite/src/main/webapp/gxt/images/gray/grid/grid3-hrow-over2.gif trunk/autosparql-lite/src/main/webapp/gxt/images/gray/grid/grid3-hrow.gif trunk/autosparql-lite/src/main/webapp/gxt/images/gray/grid/grid3-hrow2.gif trunk/autosparql-lite/src/main/webapp/gxt/images/gray/grid/grid3-special-col-bg.gif trunk/autosparql-lite/src/main/webapp/gxt/images/gray/grid/grid3-special-col-bg2.gif trunk/autosparql-lite/src/main/webapp/gxt/images/gray/grid/grid3-special-col-sel-bg.gif trunk/autosparql-lite/src/main/webapp/gxt/images/gray/grid/group-collapse.gif trunk/autosparql-lite/src/main/webapp/gxt/images/gray/grid/group-expand-sprite.gif trunk/autosparql-lite/src/main/webapp/gxt/images/gray/grid/group-expand.gif trunk/autosparql-lite/src/main/webapp/gxt/images/gray/grid/page-first.gif trunk/autosparql-lite/src/main/webapp/gxt/images/gray/grid/page-last.gif trunk/autosparql-lite/src/main/webapp/gxt/images/gray/grid/page-next.gif trunk/autosparql-lite/src/main/webapp/gxt/images/gray/grid/page-prev.gif trunk/autosparql-lite/src/main/webapp/gxt/images/gray/grid/refresh.gif trunk/autosparql-lite/src/main/webapp/gxt/images/gray/grid/row-expand-sprite.gif trunk/autosparql-lite/src/main/webapp/gxt/images/gray/grid/sort_asc.gif trunk/autosparql-lite/src/main/webapp/gxt/images/gray/grid/sort_desc.gif trunk/autosparql-lite/src/main/webapp/gxt/images/gray/panel/ trunk/autosparql-lite/src/main/webapp/gxt/images/gray/panel/corners-sprite.gif trunk/autosparql-lite/src/main/webapp/gxt/images/gray/panel/left-right.gif trunk/autosparql-lite/src/main/webapp/gxt/images/gray/panel/light-hd.gif trunk/autosparql-lite/src/main/webapp/gxt/images/gray/panel/tool-sprite-tpl.gif trunk/autosparql-lite/src/main/webapp/gxt/images/gray/panel/tool-sprites.gif trunk/autosparql-lite/src/main/webapp/gxt/images/gray/panel/tools-sprites-trans.gif trunk/autosparql-lite/src/main/webapp/gxt/images/gray/panel/top-bottom.gif trunk/autosparql-lite/src/main/webapp/gxt/images/gray/panel/top-bottom.png trunk/autosparql-lite/src/main/webapp/gxt/images/gray/panel/white-corners-sprite.gif trunk/autosparql-lite/src/main/webapp/gxt/images/gray/panel/white-left-right.gif trunk/autosparql-lite/src/main/webapp/gxt/images/gray/panel/white-top-bottom.gif trunk/autosparql-lite/src/main/webapp/gxt/images/gray/qtip/ trunk/autosparql-lite/src/main/webapp/gxt/images/gray/qtip/bg.gif trunk/autosparql-lite/src/main/webapp/gxt/images/gray/qtip/close.gif trunk/autosparql-lite/src/main/webapp/gxt/images/gray/qtip/tip-sprite.gif trunk/autosparql-lite/src/main/webapp/gxt/images/gray/s.gif trunk/autosparql-lite/src/main/webapp/gxt/images/gray/tabs/ trunk/autosparql-lite/src/main/webapp/gxt/images/gray/tabs/scroll-left.gif trunk/autosparql-lite/src/main/webapp/gxt/images/gray/tabs/scroll-right.gif trunk/autosparql-lite/src/main/webapp/gxt/images/gray/tabs/scroller-bg.gif trunk/autosparql-lite/src/main/webapp/gxt/images/gray/tabs/tab-btm-inactive-left-bg.gif trunk/autosparql-lite/src/main/webapp/gxt/images/gray/tabs/tab-btm-inactive-right-bg.gif trunk/autosparql-lite/src/main/webapp/gxt/images/gray/tabs/tab-btm-left-bg.gif trunk/autosparql-lite/src/main/webapp/gxt/images/gray/tabs/tab-btm-right-bg.gif trunk/autosparql-lite/src/main/webapp/gxt/images/gray/tabs/tab-close.gif trunk/autosparql-lite/src/main/webapp/gxt/images/gray/tabs/tab-strip-bg.gif trunk/autosparql-lite/src/main/webapp/gxt/images/gray/tabs/tab-strip-bg.png trunk/autosparql-lite/src/main/webapp/gxt/images/gray/tabs/tab-strip-btm-bg.gif trunk/autosparql-lite/src/main/webapp/gxt/images/gray/tabs/tabs-sprite.gif trunk/autosparql-lite/src/main/webapp/gxt/images/gray/toolbar/ trunk/autosparql-lite/src/main/webapp/gxt/images/gray/toolbar/bg.gif trunk/autosparql-lite/src/main/webapp/gxt/images/gray/toolbar/btn-arrow-light.gif trunk/autosparql-lite/src/main/webapp/gxt/images/gray/toolbar/btn-arrow.gif trunk/autosparql-lite/src/main/webapp/gxt/images/gray/toolbar/btn-over-bg.gif trunk/autosparql-lite/src/main/webapp/gxt/images/gray/toolbar/gray-bg.gif trunk/autosparql-lite/src/main/webapp/gxt/images/gray/toolbar/tb-bg.gif trunk/autosparql-lite/src/main/webapp/gxt/images/gray/toolbar/tb-btn-sprite.gif trunk/autosparql-lite/src/main/webapp/gxt/images/gray/window/ trunk/autosparql-lite/src/main/webapp/gxt/images/gray/window/icon-error.gif trunk/autosparql-lite/src/main/webapp/gxt/images/gray/window/icon-info.gif trunk/autosparql-lite/src/main/webapp/gxt/images/gray/window/icon-question.gif trunk/autosparql-lite/src/main/webapp/gxt/images/gray/window/icon-warning.gif trunk/autosparql-lite/src/main/webapp/gxt/images/gray/window/left-corners.png trunk/autosparql-lite/src/main/webapp/gxt/images/gray/window/left-corners.pspimage trunk/autosparql-lite/src/main/webapp/gxt/images/gray/window/left-right.png trunk/autosparql-lite/src/main/webapp/gxt/images/gray/window/right-corners.png trunk/autosparql-lite/src/main/webapp/gxt/images/gray/window/top-bottom.png trunk/autosparql-lite/src/main/webapp/gxt/images/gxt/ trunk/autosparql-lite/src/main/webapp/gxt/images/gxt/dd/ trunk/autosparql-lite/src/main/webapp/gxt/images/gxt/dd/insert-bg.gif trunk/autosparql-lite/src/main/webapp/gxt/images/gxt/grid/ trunk/autosparql-lite/src/main/webapp/gxt/images/gxt/grid/row-editor-bg.gif trunk/autosparql-lite/src/main/webapp/gxt/images/gxt/grid/row-editor-btns.gif trunk/autosparql-lite/src/main/webapp/gxt/images/gxt/icons/ trunk/autosparql-lite/src/main/webapp/gxt/images/gxt/icons/bottom2.gif trunk/autosparql-lite/src/main/webapp/gxt/images/gxt/icons/columns.gif trunk/autosparql-lite/src/main/webapp/gxt/images/gxt/icons/done.gif trunk/autosparql-lite/src/main/webapp/gxt/images/gxt/icons/doubleleft2.gif trunk/autosparql-lite/src/main/webapp/gxt/images/gxt/icons/doubleright2.gif trunk/autosparql-lite/src/main/webapp/gxt/images/gxt/icons/down2.gif trunk/autosparql-lite/src/main/webapp/gxt/images/gxt/icons/folder-closed.gif trunk/autosparql-lite/src/main/webapp/gxt/images/gxt/icons/folder-closed.png trunk/autosparql-lite/src/main/webapp/gxt/images/gxt/icons/folder.gif trunk/autosparql-lite/src/main/webapp/gxt/images/gxt/icons/folder.png trunk/autosparql-lite/src/main/webapp/gxt/images/gxt/icons/grid-loading.gif trunk/autosparql-lite/src/main/webapp/gxt/images/gxt/icons/hmenu-asc.gif trunk/autosparql-lite/src/main/webapp/gxt/images/gxt/icons/hmenu-desc.gif trunk/autosparql-lite/src/main/webapp/gxt/images/gxt/icons/left2.gif trunk/autosparql-lite/src/main/webapp/gxt/images/gxt/icons/loading.gif trunk/autosparql-lite/src/main/webapp/gxt/images/gxt/icons/nowait.gif trunk/autosparql-lite/src/main/webapp/gxt/images/gxt/icons/page-first-disabled.gif trunk/autosparql-lite/src/main/webapp/gxt/images/gxt/icons/page-first.gif trunk/autosparql-lite/src/main/webapp/gxt/images/gxt/icons/page-last-disabled.gif trunk/autosparql-lite/src/main/webapp/gxt/images/gxt/icons/page-last.gif trunk/autosparql-lite/src/main/webapp/gxt/images/gxt/icons/page-next-disabled.gif trunk/autosparql-lite/src/main/webapp/gxt/images/gxt/icons/page-next.gif trunk/autosparql-lite/src/main/webapp/gxt/images/gxt/icons/page-prev-disabled.gif trunk/autosparql-lite/src/main/webapp/gxt/images/gxt/icons/page-prev.gif trunk/autosparql-lite/src/main/webapp/gxt/images/gxt/icons/paging.gif trunk/autosparql-lite/src/main/webapp/gxt/images/gxt/icons/right2.gif trunk/autosparql-lite/src/main/webapp/gxt/images/gxt/icons/tabs.gif trunk/autosparql-lite/src/main/webapp/gxt/images/gxt/icons/top2.gif trunk/autosparql-lite/src/main/webapp/gxt/images/gxt/icons/up2.gif trunk/autosparql-lite/src/main/webapp/gxt/images/gxt/icons/wait.gif trunk/autosparql-lite/src/main/webapp/gxt/images/gxt/info/ trunk/autosparql-lite/src/main/webapp/gxt/images/gxt/info/corners-sprite.gif trunk/autosparql-lite/src/main/webapp/gxt/images/gxt/info/top-bottom.gif trunk/autosparql-lite/src/main/webapp/gxt/images/gxt/menu/ trunk/autosparql-lite/src/main/webapp/gxt/images/gxt/menu/disabledcheck.gif trunk/autosparql-lite/src/main/webapp/gxt/images/gxt/shared/ trunk/autosparql-lite/src/main/webapp/gxt/images/gxt/shared/clear.gif trunk/autosparql-lite/src/main/webapp/gxt/images/gxt/shared/large-loading.gif trunk/autosparql-lite/src/main/webapp/gxt/images/gxt/shared/select-18-bg.gif trunk/autosparql-lite/src/main/webapp/gxt/images/gxt/shared/select-19-bg-gray.gif trunk/autosparql-lite/src/main/webapp/gxt/images/gxt/shared/select-19-bg.gif trunk/autosparql-lite/src/main/webapp/gxt/images/gxt/shared/select-bg.gif trunk/autosparql-lite/src/main/webapp/gxt/images/gxt/shared/select-light.gif trunk/autosparql-lite/src/main/webapp/gxt/images/gxt/table/ trunk/autosparql-lite/src/main/webapp/gxt/images/gxt/table/row-over.gif trunk/autosparql-lite/src/main/webapp/gxt/images/gxt/table/vs-column-bg.gif trunk/autosparql-lite/src/main/webapp/gxt/images/gxt/table/vsort-asc.gif trunk/autosparql-lite/src/main/webapp/gxt/images/gxt/table/vsort-desc.gif trunk/autosparql-lite/src/main/webapp/gxt/images/gxt/tree/ trunk/autosparql-lite/src/main/webapp/gxt/images/gxt/tree/checked.gif trunk/autosparql-lite/src/main/webapp/gxt/images/gxt/tree/joint-close.gif trunk/autosparql-lite/src/main/webapp/gxt/images/gxt/tree/joint-open.gif trunk/autosparql-lite/src/main/webapp/gxt/images/gxt/tree/notchecked.gif trunk/autosparql-lite/src/main/webapp/gxt/images/gxt/tree/tree-table-special-col-sel.gif trunk/autosparql-lite/src/main/webapp/gxt/images/gxt/tree/tree-table-special-col.gif trunk/autosparql-lite/src/main/webapp/gxt/images/gxt/tree/vnode.gif trunk/autosparql-lite/src/main/webapp/gxt/images/gxt/tree/vnode_transparent.gif trunk/autosparql-lite/src/main/webapp/gxt/themes/ trunk/autosparql-lite/src/main/webapp/gxt/themes/access/ trunk/autosparql-lite/src/main/webapp/gxt/themes/access/css/ trunk/autosparql-lite/src/main/webapp/gxt/themes/access/css/xtheme-access.css trunk/autosparql-lite/src/main/webapp/gxt/themes/access/images/ trunk/autosparql-lite/src/main/webapp/gxt/themes/access/images/box/ trunk/autosparql-lite/src/main/webapp/gxt/themes/access/images/box/corners-blue.gif trunk/autosparql-lite/src/main/webapp/gxt/themes/access/images/box/corners.gif trunk/autosparql-lite/src/main/webapp/gxt/themes/access/images/box/l-blue.gif trunk/autosparql-lite/src/main/webapp/gxt/themes/access/images/box/l.gif trunk/autosparql-lite/src/main/webapp/gxt/themes/access/images/box/r-blue.gif trunk/autosparql-lite/src/main/webapp/gxt/themes/access/images/box/r.gif trunk/autosparql-lite/src/main/webapp/gxt/themes/access/images/box/tb-blue.gif trunk/autosparql-lite/src/main/webapp/gxt/themes/access/images/box/tb.gif trunk/autosparql-lite/src/main/webapp/gxt/themes/access/images/button/ trunk/autosparql-lite/src/main/webapp/gxt/themes/access/images/button/arrow.gif trunk/autosparql-lite/src/main/webapp/gxt/themes/access/images/button/btn.gif trunk/autosparql-lite/src/main/webapp/gxt/themes/access/images/button/group-cs.gif trunk/autosparql-lite/src/main/webapp/gxt/themes/access/images/button/group-lr.gif trunk/autosparql-lite/src/main/webapp/gxt/themes/access/images/button/group-tb.gif trunk/autosparql-lite/src/main/webapp/gxt/themes/access/images/button/s-arrow-b-noline.gif trunk/autosparql-lite/src/main/webapp/gxt/themes/access/images/button/s-arrow-b.gif trunk/autosparql-lite/src/main/webapp/gxt/themes/access/images/button/s-arrow-bo.gif trunk/autosparql-lite/src/main/webapp/gxt/themes/access/images/button/s-arrow-noline.gif trunk/autosparql-lite/src/main/webapp/gxt/themes/access/images/button/s-arrow-o.gif trunk/autosparql-lite/src/main/webapp/gxt/themes/access/images/button/s-arrow.gif trunk/autosparql-lite/src/main/webapp/gxt/themes/access/images/editor/ trunk/autosparql-lite/src/main/webapp/gxt/themes/access/images/editor/tb-source.gif trunk/autosparql-lite/src/main/webapp/gxt/themes/access/images/editor/tb-sprite.gif trunk/autosparql-lite/src/main/webapp/gxt/themes/access/images/form/ trunk/autosparql-lite/src/main/webapp/gxt/themes/access/images/form/checkbox.gif trunk/autosparql-lite/src/main/webapp/gxt/themes/access/images/form/clear-trigger.gif trunk/autosparql-lite/src/main/webapp/gxt/themes/access/images/form/date-trigger.gif trunk/autosparql-lite/src/main/webapp/gxt/themes/access/images/form/error-tip-corners.gif trunk/autosparql-lite/src/main/webapp/gxt/themes/access/images/form/exclamation.gif trunk/autosparql-lite/src/main/webapp/gxt/themes/access/images/form/radio.gif trunk/autosparql-lite/src/main/webapp/gxt/themes/access/images/form/search-trigger.gif trunk/autosparql-lite/src/main/webapp/gxt/themes/access/images/form/spinner.gif trunk/autosparql-lite/src/main/webapp/gxt/themes/access/images/form/text-bg.gif trunk/autosparql-lite/src/main/webapp/gxt/themes/access/images/form/trigger-single.gif trunk/autosparql-lite/src/main/webapp/gxt/themes/access/images/form/trigger-tpl.gif trunk/autosparql-lite/src/main/webapp/gxt/themes/access/images/form/trigger.gif trunk/autosparql-lite/src/main/webapp/gxt/themes/access/images/grid/ trunk/autosparql-lite/src/main/webapp/gxt/themes/access/images/grid/arrow-left-white.gif trunk/autosparql-lite/src/main/webapp/gxt/themes/access/images/grid/arrow-right-white.gif trunk/autosparql-lite/src/main/webapp/gxt/themes/access/images/grid/col-move-bottom.gif trunk/autosparql-lite/src/main/webapp/gxt/themes/access/images/grid/col-move-top.gif trunk/autosparql-lite/src/main/webapp/gxt/themes/access/images/grid/columns.gif trunk/autosparql-lite/src/main/webapp/gxt/themes/access/images/grid/dirty.gif trunk/autosparql-lite/src/main/webapp/gxt/themes/access/images/grid/done.gif trunk/autosparql-lite/src/main/webapp/gxt/themes/access/images/grid/drop-no.gif trunk/autosparql-lite/src/main/webapp/gxt/themes/access/images/grid/drop-yes.gif trunk/autosparql-lite/src/main/webapp/gxt/themes/access/images/grid/footer-bg.gif trunk/autosparql-lite/src/main/webapp/gxt/themes/access/images/grid/grid-blue-hd.gif trunk/autosparql-lite/src/main/webapp/gxt/themes/access/images/grid/grid-blue-split.gif trunk/autosparql-lite/src/main/webapp/gxt/themes/access/images/grid/grid-hrow.gif trunk/autosparql-lite/src/main/webapp/gxt/themes/access/images/grid/grid-loading.gif trunk/autosparql-lite/src/main/webapp/gxt/themes/access/images/grid/grid-split.gif trunk/autosparql-lite/src/main/webapp/gxt/themes/access/images/grid/grid-vista-hd.gif trunk/autosparql-lite/src/main/webapp/gxt/themes/access/images/grid/grid3-hd-btn-contrast.gif trunk/autosparql-lite/src/main/webapp/gxt/themes/access/images/grid/grid3-hd-btn.gif trunk/autosparql-lite/src/main/webapp/gxt/themes/access/images/grid/grid3-hrow-over.gif trunk/autosparql-lite/src/main/webapp/gxt/themes/access/images/grid/grid3-hrow.gif trunk/autosparql-lite/src/main/webapp/gxt/themes/access/images/grid/grid3-special-col-bg.gif trunk/autosparql-lite/src/main/webapp/gxt/themes/access/images/grid/grid3-special-col-sel-bg.gif trunk/autosparql-lite/src/main/webapp/gxt/themes/access/images/grid/group-by.gif trunk/autosparql-lite/src/main/webapp/gxt/themes/access/images/grid/group-collapse.gif trunk/autosparql-lite/src/main/webapp/gxt/themes/access/images/grid/group-expand-sprite.gif trunk/autosparql-lite/src/main/webapp/gxt/themes/access/images/grid/group-expand.gif trunk/autosparql-lite/src/main/webapp/gxt/themes/access/images/grid/hd-pop.gif trunk/autosparql-lite/src/main/webapp/gxt/themes/access/images/grid/hmenu-asc.gif trunk/autosparql-lite/src/main/webapp/gxt/themes/access/images/grid/hmenu-desc.gif trunk/autosparql-lite/src/main/webapp/gxt/themes/access/images/grid/hmenu-lock.gif trunk/autosparql-lite/src/main/webapp/gxt/themes/access/images/grid/hmenu-lock.png trunk/autosparql-lite/src/main/webapp/gxt/themes/access/images/grid/hmenu-unlock.gif trunk/autosparql-lite/src/main/webapp/gxt/themes/access/images/grid/hmenu-unlock.png trunk/autosparql-lite/src/main/webapp/gxt/themes/access/images/grid/invalid_line.gif trunk/autosparql-lite/src/main/webapp/gxt/themes/access/images/grid/loading.gif trunk/autosparql-lite/src/main/webapp/gxt/themes/access/images/grid/mso-hd.gif trunk/autosparql-lite/src/main/webapp/gxt/themes/access/images/grid/nowait.gif trunk/autosparql-lite/src/main/webapp/gxt/themes/access/images/grid/page-first-disabled.gif trunk/autosparql-lite/src/main/webapp/gxt/themes/access/images/grid/page-first.gif trunk/autosparql-lite/src/main/webapp/gxt/themes/access/images/grid/page-last-disabled.gif trunk/autosparql-lite/src/main/webapp/gxt/themes/access/images/grid/page-last.gif trunk/autosparql-lite/src/main/webapp/gxt/themes/access/images/grid/page-next-disabled.gif trunk/autosparql-lite/src/main/webapp/gxt/themes/access/images/grid/page-next.gif trunk/autosparql-lite/src/main/webapp/gxt/themes/access/images/grid/page-prev-disabled.gif trunk/autosparql-lite/src/main/webapp/gxt/themes/access/images/grid/page-prev.gif trunk/autosparql-lite/src/main/webapp/gxt/themes/access/images/grid/pick-button.gif trunk/autosparql-lite/src/main/webapp/gxt/themes/access/images/grid/refresh.gif trunk/autosparql-lite/src/main/webapp/gxt/themes/access/images/grid/row-check-sel.gif trunk/autosparql-lite/src/main/webapp/gxt/themes/access/images/grid/row-check-sprite.gif trunk/autosparql-lite/src/main/webapp/gxt/themes/access/images/grid/row-check.gif trunk/autosparql-lite/src/main/webapp/gxt/themes/access/images/grid/row-expand-sprite.gif trunk/autosparql-lite/src/main/webapp/gxt/themes/access/images/grid/row-over.gif trunk/autosparql-lite/src/main/webapp/gxt/themes/access/images/grid/row-sel.gif trunk/autosparql-lite/src/main/webapp/gxt/themes/access/images/grid/sort-hd.gif trunk/autosparql-lite/src/main/webapp/gxt/themes/access/images/grid/sort_asc.gif trunk/autosparql-lite/src/main/webapp/gxt/themes/access/images/grid/sort_desc.gif trunk/autosparql-lite/src/main/webapp/gxt/themes/access/images/grid/wait.gif trunk/autosparql-lite/src/main/webapp/gxt/themes/access/images/icons/ trunk/autosparql-lite/src/main/webapp/gxt/themes/access/images/icons/bottom2.gif trunk/autosparql-lite/src/main/webapp/gxt/themes/access/images/icons/doubleleft2.gif trunk/autosparql-lite/src/main/webapp/gxt/themes/access/images/icons/doubleright2.gif trunk/autosparql-lite/src/main/webapp/gxt/themes/access/images/icons/down2.gif trunk/autosparql-lite/src/main/webapp/gxt/themes/access/images/icons/left2.gif trunk/autosparql-lite/src/main/webapp/gxt/themes/access/images/icons/right2.gif trunk/autosparql-lite/src/main/webapp/gxt/themes/access/images/icons/top2.gif trunk/autosparql-lite/src/main/webapp/gxt/themes/access/images/icons/up2.gif trunk/autosparql-lite/src/main/webapp/gxt/themes/access/images/layout/ trunk/autosparql-lite/src/main/webapp/gxt/themes/access/images/layout/mini-bottom.gif trunk/autosparql-lite/src/main/webapp/gxt/themes/access/images/layout/mini-top.gif trunk/autosparql-lite/src/main/webapp/gxt/themes/access/images/menu/ trunk/autosparql-lite/src/main/webapp/gxt/themes/access/images/menu/checked.gif trunk/autosparql-lite/src/main/webapp/gxt/themes/access/images/menu/group-checked.gif trunk/autosparql-lite/src/main/webapp/gxt/themes/access/images/menu/item-over.gif trunk/autosparql-lite/src/main/webapp/gxt/themes/access/images/menu/menu-parent.gif trunk/autosparql-lite/src/main/webapp/gxt/themes/access/images/menu/menu.gif trunk/autosparql-lite/src/main/webapp/gxt/themes/access/images/menu/unchecked.gif trunk/autosparql-lite/src/main/webapp/gxt/themes/access/images/panel/ trunk/autosparql-lite/src/main/webapp/gxt/themes/access/images/panel/corners-sprite.gif trunk/autosparql-lite/src/main/webapp/gxt/themes/access/images/panel/left-right.gif trunk/autosparql-lite/src/main/webapp/gxt/themes/access/images/panel/light-hd.gif trunk/autosparql-lite/src/main/webapp/gxt/themes/access/images/panel/tool-close.gif trunk/autosparql-lite/src/main/webapp/gxt/themes/access/images/panel/tool-collapse.gif trunk/autosparql-lite/src/main/webapp/gxt/themes/access/images/panel/tool-expand.gif trunk/autosparql-lite/src/main/webapp/gxt/themes/access/images/panel/tool-gear.gif trunk/autosparql-lite/src/main/webapp/gxt/themes/access/images/panel/tool-maximize.gif trunk/autosparql-lite/src/main/webapp/gxt/themes/access/images/panel/tool-minimize.gif trunk/autosparql-lite/src/main/webapp/gxt/themes/access/images/panel/tool-pin.gif trunk/autosparql-lite/src/main/webapp/gxt/themes/access/images/panel/tool-sprite-tpl.gif trunk/autosparql-lite/src/main/webapp/gxt/themes/access/images/panel/tool-sprites.gif trunk/autosparql-lite/src/main/webapp/gxt/themes/access/images/panel/tools-sprites-trans.gif trunk/autosparql-lite/src/main/webapp/gxt/themes/access/images/panel/top-bottom.gif trunk/autosparql-lite/src/main/webapp/gxt/themes/access/images/panel/white-corners-sprite.gif trunk/autosparql-lite/src/main/webapp/gxt/themes/access/images/panel/white-left-right.gif trunk/autosparql-lite/src/main/webapp/gxt/themes/access/images/panel/white-top-bottom.gif trunk/autosparql-lite/src/main/webapp/gxt/themes/access/images/progress/ trunk/autosparql-lite/src/main/webapp/gxt/themes/access/images/progress/progress-bg.gif trunk/autosparql-lite/src/main/webapp/gxt/themes/access/images/qtip/ trunk/autosparql-lite/src/main/webapp/gxt/themes/access/images/qtip/close.gif trunk/autosparql-lite/src/main/webapp/gxt/themes/access/images/qtip/tip-anchor-sprite.gif trunk/autosparql-lite/src/main/webapp/gxt/themes/access/images/qtip/tip-sprite.gif trunk/autosparql-lite/src/main/webapp/gxt/themes/access/images/shared/ trunk/autosparql-lite/src/main/webapp/gxt/themes/access/images/shared/glass-bg.gif trunk/autosparql-lite/src/main/webapp/gxt/themes/access/images/shared/hd-sprite.gif trunk/autosparql-lite/src/main/webapp/gxt/themes/access/images/shared/left-btn.gif trunk/autosparql-lite/src/main/webapp/gxt/themes/access/images/shared/right-btn.gif trunk/autosparql-lite/src/main/webapp/gxt/themes/access/images/sizer/ trunk/autosparql-lite/src/main/webapp/gxt/themes/access/images/sizer/e-handle-dark.gif trunk/autosparql-lite/src/main/webapp/gxt/themes/access/images/sizer/e-handle.gif trunk/autosparql-lite/src/main/webapp/gxt/themes/access/images/sizer/ne-handle-dark.gif trunk/autosparql-lite/src/main/webapp/gxt/themes/access/images/sizer/ne-handle.gif trunk/autosparql-lite/src/main/webapp/gxt/themes/access/images/sizer/nw-handle-dark.gif trunk/autosparql-lite/src/main/webapp/gxt/themes/access/images/sizer/nw-handle.gif trunk/autosparql-lite/src/main/webapp/gxt/themes/access/images/sizer/s-handle-dark.gif trunk/autosparql-lite/src/main/webapp/gxt/themes/access/images/sizer/s-handle.gif trunk/autosparql-lite/src/main/webapp/gxt/themes/access/images/sizer/se-handle-dark.gif trunk/autosparql-lite/src/main/webapp/gxt/themes/access/images/sizer/se-handle.gif trunk/autosparql-lite/src/main/webapp/gxt/themes/access/images/sizer/square.gif trunk/autosparql-lite/src/main/webapp/gxt/themes/access/images/sizer/sw-handle-dark.gif trunk/autosparql-lite/src/main/webapp/gxt/themes/access/images/sizer/sw-handle.gif trunk/autosparql-lite/src/main/webapp/gxt/themes/access/images/slider/ trunk/autosparql-lite/src/main/webapp/gxt/themes/access/images/slider/slider-bg.png trunk/autosparql-lite/src/main/webapp/gxt/themes/access/images/slider/slider-thumb-single.png trunk/autosparql-lite/src/main/webapp/gxt/themes/access/images/slider/slider-thumb.png trunk/autosparql-lite/src/main/webapp/gxt/themes/access/images/slider/slider-v-bg.png trunk/autosparql-lite/src/main/webapp/gxt/themes/access/images/slider/slider-v-thumb.png trunk/autosparql-lite/src/main/webapp/gxt/themes/access/images/tabs/ trunk/autosparql-lite/src/main/webapp/gxt/themes/access/images/tabs/scroll-left.gif trunk/autosparql-lite/src/main/webapp/gxt/themes/access/images/tabs/scroll-right.gif trunk/autosparql-lite/src/main/webapp/gxt/themes/access/images/tabs/tab-btm-inactive-left-bg.gif trunk/autosparql-lite/src/main/webapp/gxt/themes/access/images/tabs/tab-btm-inactive-right-bg.gif trunk/autosparql-lite/src/main/webapp/gxt/themes/access/images/tabs/tab-btm-left-bg.gif trunk/autosparql-lite/src/main/webapp/gxt/themes/access/images/tabs/tab-btm-right-bg.gif trunk/autosparql-lite/src/main/webapp/gxt/themes/access/images/tabs/tab-close.gif trunk/autosparql-lite/src/main/webapp/gxt/themes/access/images/tabs/tab-strip-bg.gif trunk/autosparql-lite/src/main/webapp/gxt/themes/access/images/tabs/tab-strip-btm-bg.gif trunk/autosparql-lite/src/main/webapp/gxt/themes/access/images/tabs/tabs-sprite.gif trunk/autosparql-lite/src/main/webapp/gxt/themes/access/images/toolbar/ trunk/autosparql-lite/src/main/webapp/gxt/themes/access/images/toolbar/bg.gif trunk/autosparql-lite/src/main/webapp/gxt/themes/access/images/toolbar/btn-arrow-light.gif trunk/autosparql-lite/src/main/webapp/gxt/themes/access/images/toolbar/btn-arrow.gif trunk/autosparql-lite/src/main/webapp/gxt/themes/access/images/toolbar/btn-over-bg.gif trunk/autosparql-lite/src/main/webapp/gxt/themes/access/images/toolbar/gray-bg.gif trunk/autosparql-lite/src/main/webapp/gxt/themes/access/images/toolbar/more.gif trunk/autosparql-lite/src/main/webapp/gxt/themes/access/images/toolbar/s-arrow-bo.gif trunk/autosparql-lite/src/main/webapp/gxt/themes/access/images/toolbar/tb-btn-sprite.gif trunk/autosparql-lite/src/main/webapp/gxt/themes/access/images/toolbar/tb-xl-btn-sprite.gif trunk/autosparql-lite/src/main/webapp/gxt/themes/access/images/toolbar/tb-xl-sep.gif trunk/autosparql-lite/src/main/webapp/gxt/themes/access/images/tree/ trunk/autosparql-lite/src/main/webapp/gxt/themes/access/images/tree/arrows.gif trunk/autosparql-lite/src/main/webapp/gxt/themes/access/images/tree/drop-add.gif trunk/autosparql-lite/src/main/webapp/gxt/themes/access/images/tree/drop-between.gif trunk/autosparql-lite/src/main/webapp/gxt/themes/access/images/tree/drop-no.gif trunk/autosparql-lite/src/main/webapp/gxt/themes/access/images/tree/drop-over.gif trunk/autosparql-lite/src/main/webapp/gxt/themes/access/images/tree/drop-under.gif trunk/autosparql-lite/src/main/webapp/gxt/themes/access/images/tree/drop-yes.gif trunk/autosparql-lite/src/main/webapp/gxt/themes/access/images/tree/elbow-end-minus-nl.gif trunk/autosparql-lite/src/main/webapp/gxt/themes/access/images/tree/elbow-end-minus.gif trunk/autosparql-lite/src/main/webapp/gxt/themes/access/images/tree/elbow-end-plus-nl.gif trunk/autosparql-lite/src/main/webapp/gxt/themes/access/images/tree/elbow-end-plus.gif trunk/autosparql-lite/src/main/webapp/gxt/themes/access/images/tree/elbow-end.gif trunk/autosparql-lite/src/main/webapp/gxt/themes/access/images/tree/elbow-line.gif trunk/autosparql-lite/src/main/webapp/gxt/themes/access/images/tree/elbow-minus-nl.gif trunk/autosparql-lite/src/main/webapp/gxt/themes/access/images/tree/elbow-minus.gif trunk/autosparql-lite/src/main/webapp/gxt/themes/access/images/tree/elbow-plus-nl.gif trunk/autosparql-lite/src/main/webapp/gxt/themes/access/images/tree/elbow-plus.gif trunk/autosparql-lite/src/main/webapp/gxt/themes/access/images/tree/elbow.gif trunk/autosparql-lite/src/main/webapp/gxt/themes/access/images/tree/folder-open.gif trunk/autosparql-lite/src/main/webapp/gxt/themes/access/images/tree/folder.gif trunk/autosparql-lite/src/main/webapp/gxt/themes/access/images/tree/leaf.gif trunk/autosparql-lite/src/main/webapp/gxt/themes/access/images/tree/loading.gif trunk/autosparql-lite/src/main/webapp/gxt/themes/access/images/tree/s.gif trunk/autosparql-lite/src/main/webapp/gxt/themes/access/images/tree/tree-collapsed.png trunk/autosparql-lite/src/main/webapp/gxt/themes/access/images/tree/tree-expanded.png trunk/autosparql-lite/src/main/webapp/gxt/themes/access/images/window/ trunk/autosparql-lite/src/main/webapp/gxt/themes/access/images/window/icon-error.gif trunk/autosparql-lite/src/main/webapp/gxt/themes/access/images/window/icon-info.gif trunk/autosparql-lite/src/main/webapp/gxt/themes/access/images/window/icon-question.gif trunk/autosparql-lite/src/main/webapp/gxt/themes/access/images/window/icon-warning.gif trunk/autosparql-lite/src/main/webapp/gxt/themes/access/images/window/left-corners.png trunk/autosparql-lite/src/main/webapp/gxt/themes/access/images/window/left-right.png trunk/autosparql-lite/src/main/webapp/gxt/themes/access/images/window/right-corners.png trunk/autosparql-lite/src/main/webapp/gxt/themes/access/images/window/top-bottom.png trunk/autosparql-lite/src/main/webapp/gxt/themes/slate/ trunk/autosparql-lite/src/main/webapp/gxt/themes/slate/css/ trunk/autosparql-lite/src/main/webapp/gxt/themes/slate/css/xtheme-slate.css trunk/autosparql-lite/src/main/webapp/gxt/themes/slate/images/ trunk/autosparql-lite/src/main/webapp/gxt/themes/slate/images/slate/ trunk/autosparql-lite/src/main/webapp/gxt/themes/slate/images/slate/button/ trunk/autosparql-lite/src/main/webapp/gxt/themes/slate/images/slate/button/arrow.gif trunk/autosparql-lite/src/main/webapp/gxt/themes/slate/images/slate/button/btn-arrow.gif trunk/autosparql-lite/src/main/webapp/gxt/themes/slate/images/slate/button/btn-sprite.gif trunk/autosparql-lite/src/main/webapp/gxt/themes/slate/images/slate/button/btn.gif trunk/autosparql-lite/src/main/webapp/gxt/themes/slate/images/slate/button/group-cs.gif trunk/autosparql-lite/src/main/webapp/gxt/themes/slate/images/slate/button/group-lr.gif trunk/autosparql-lite/src/main/webapp/gxt/themes/slate/images/slate/button/group-tb.gif trunk/autosparql-lite/src/main/webapp/gxt/themes/slate/images/slate/button/s-arrow-b-noline.gif trunk/autosparql-lite/src/main/webapp/gxt/themes/slate/images/slate/button/s-arrow-b.gif trunk/autosparql-lite/src/main/webapp/gxt/themes/slate/images/slate/button/s-arrow-bo.gif trunk/autosparql-lite/src/main/webapp/gxt/themes/slate/images/slate/button/s-arrow-noline.gif trunk/autosparql-lite/src/main/webapp/gxt/themes/slate/images/slate/button/s-arrow-o.gif trunk/autosparql-lite/src/main/webapp/gxt/themes/slate/images/slate/button/s-arrow.gif trunk/autosparql-lite/src/main/webapp/gxt/themes/slate/images/slate/editor/ trunk/autosparql-lite/src/main/webapp/gxt/themes/slate/images/slate/editor/tb-sprite.gif trunk/autosparql-lite/src/main/webapp/gxt/themes/slate/images/slate/form/ trunk/autosparql-lite/src/main/webapp/gxt/themes/slate/images/slate/form/checkbox.gif trunk/autosparql-lite/src/main/webapp/gxt/themes/slate/images/slate/form/clear-trigger.gif trunk/autosparql-lite/src/main/webapp/gxt/themes/slate/images/slate/form/date-trigger.gif trunk/autosparql-lite/src/main/webapp/gxt/themes/slate/images/slate/form/error-tip-corners.gif trunk/autosparql-lite/src/main/webapp/gxt/themes/slate/images/slate/form/radio.gif trunk/autosparql-lite/src/main/webapp/gxt/themes/slate/images/slate/form/search-trigger.gif trunk/autosparql-lite/src/main/webapp/gxt/themes/slate/images/slate/form/spinner.gif trunk/autosparql-lite/src/main/webapp/gxt/themes/slate/images/slate/form/trigger-tpl.gif trunk/autosparql-lite/src/main/webapp/gxt/themes/slate/images/slate/form/trigger.gif trunk/autosparql-lite/src/main/webapp/gxt/themes/slate/images/slate/gradient-bg.gif trunk/autosparql-lite/src/main/webapp/gxt/themes/slate/images/slate/... [truncated message content] |
From: <jen...@us...> - 2011-07-25 08:52:46
|
Revision: 2959 http://dl-learner.svn.sourceforge.net/dl-learner/?rev=2959&view=rev Author: jenslehmann Date: 2011-07-25 08:52:39 +0000 (Mon, 25 Jul 2011) Log Message: ----------- various small changes Modified Paths: -------------- trunk/interfaces/doc/manual/manual.tex trunk/test/mammographic/train.conf Removed Paths: ------------- trunk/interfaces/log/ Property Changed: ---------------- trunk/autosparql/war/ trunk/scripts/ Property changes on: trunk/autosparql/war ___________________________________________________________________ Modified: svn:ignore - org.dllearner.autosparql.Application + app cache org.dllearner.autosparql.Application Modified: trunk/interfaces/doc/manual/manual.tex =================================================================== --- trunk/interfaces/doc/manual/manual.tex 2011-07-21 12:00:32 UTC (rev 2958) +++ trunk/interfaces/doc/manual/manual.tex 2011-07-25 08:52:39 UTC (rev 2959) @@ -29,6 +29,8 @@ \pagestyle{scrheadings} \automark{section} +\graphicspath{{../../../images/}} + \newcommand{\todo}[1]{\textbf{[ToDo: #1]}} \begin{document} @@ -98,7 +100,7 @@ DL-Learner (see also~\cite{dllearner_jmlr}) consists of core functionality, which provides Machine Learning algorithms for solving the learning problem, support for different knowledge base formats, an OWL library, and reasoner interfaces. There are several interfaces for accessing this functionality, a couple of tools which use the DL-Learner algorithms, and a set of convenience scripts. The general structure is illustrated in Figure \ref{fig:structure}. \begin{figure} - \includegraphics[width=\textwidth]{../../resources/structure_print} + \includegraphics[width=\textwidth]{structure_print} \caption{Overall structure of the DL-Learner software.} \label{fig:structure} \end{figure} @@ -108,7 +110,7 @@ There are four types of components (knowledge source, reasoning service, learning problem, learning algorithm). For each type, there are several implemented components and each component can have its own configuration options as illustrated in Figure \ref{fig:components}. Configuration options can be used to change parameters/settings of a component. In Section \ref{sec:components}, we describe the components in DL-Learner and their configuration options. \begin{figure} - \includegraphics[width=\textwidth]{../../resources/components_print} + \includegraphics[width=\textwidth]{components_print} \caption{The architecture of DL-Learner is based on four component types, which can each have their own configuration options. DL-Learner uses a component manager to organise all components.} \label{fig:components} \end{figure} @@ -203,7 +205,7 @@ \begin{figure} \centering - \includegraphics[width=.8\textwidth]{../../resources/screenshots/gui_algorithm} + \includegraphics[width=.8\textwidth]{screenshots/gui_algorithm} \caption{GUI screenshot showing the learning algorithm tab. The UI allows you to set different options and then proceed to the next tab and execute the algorithm.} \label{fig:gui} \end{figure} Property changes on: trunk/scripts ___________________________________________________________________ Modified: svn:ignore - target scripts.iml .classpath .project .settings + target log scripts.iml .classpath .project .settings Modified: trunk/test/mammographic/train.conf =================================================================== --- trunk/test/mammographic/train.conf 2011-07-21 12:00:32 UTC (rev 2958) +++ trunk/test/mammographic/train.conf 2011-07-25 08:52:39 UTC (rev 2959) @@ -1,12 +1,23 @@ import("mammographic.owl"); reasoner = fastInstanceChecker; -algorithm = refexamples; -refexamples.noisePercentage = 5; +// algorithm = refexamples; +refexamples.noisePercentage = 30; refexamples.startClass = "http://dl-learner.org/mammographic#Patient"; -refexamples.writeSearchTree = false; -refexamples.searchTreeFile = "log/mammographic/searchTree.log"; +refexamples.writeSearchTree = true; +// refexamples.replaceSearchTree = true; +refexamples.searchTreeFile = "log/mammo_ocel_searchTree.log"; +algorithm = celoe; +celoe.noisePercentage = 22; +celoe.expansionPenaltyFactor = 0.2; // 02; +celoe.terminateOnNoiseReached = true; +celoe.maxExecutionTimeInSeconds = 0; +// celoe.startClass = "http://dl-learner.org/mammographic#Patient"; +celoe.writeSearchTree = true; +celoe.replaceSearchTree = true; +celoe.searchTreeFile = "log/mammo_celoe2_searchTree.log"; + +"http://dl-learner.org/mammographic#Patient550" +"http://dl-learner.org/mammographic#Patient756" -"http://dl-learner.org/mammographic#Patient755" This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jen...@us...> - 2011-07-25 11:46:26
|
Revision: 2963 http://dl-learner.svn.sourceforge.net/dl-learner/?rev=2963&view=rev Author: jenslehmann Date: 2011-07-25 11:46:19 +0000 (Mon, 25 Jul 2011) Log Message: ----------- - added a plain SPARQL component (without fragment extraction) - preparations for better integration of QTL in DL-Learner framework Modified Paths: -------------- trunk/components-core/src/main/java/org/dllearner/core/ComponentManager.java trunk/components-core/src/main/java/org/dllearner/core/configurators/ComponentFactory.java trunk/components-core/src/main/java/org/dllearner/core/configurators/FuzzyCELOEConfigurator.java trunk/components-core/src/main/java/org/dllearner/core/configurators/package.html trunk/components-core/src/main/java/org/dllearner/kb/sparql/SparqlEndpoint.java trunk/components-core/src/main/java/org/dllearner/learningproblems/PosOnlyLP.java trunk/components-ext/src/main/java/org/dllearner/algorithm/qtl/QTL.java trunk/scripts/src/main/java/org/dllearner/scripts/ConfigJavaGenerator.java Added Paths: ----------- trunk/components-core/src/main/java/org/dllearner/core/configurators/SparqlEndpointKSConfigurator.java trunk/components-core/src/main/java/org/dllearner/kb/SparqlEndpointKS.java trunk/scripts/src/main/java/org/dllearner/scripts/matching/GeneralMatcher.java Modified: trunk/components-core/src/main/java/org/dllearner/core/ComponentManager.java =================================================================== --- trunk/components-core/src/main/java/org/dllearner/core/ComponentManager.java 2011-07-25 10:40:02 UTC (rev 2962) +++ trunk/components-core/src/main/java/org/dllearner/core/ComponentManager.java 2011-07-25 11:46:19 UTC (rev 2963) @@ -81,6 +81,7 @@ "org.dllearner.kb.KBFile", "org.dllearner.kb.sparql.SparqlKnowledgeSource", "org.dllearner.kb.OWLAPIOntology", + "org.dllearner.kb.SparqlEndpointKS", //reasoners "org.dllearner.reasoning.OWLAPIReasoner", "org.dllearner.reasoning.fuzzydll.FuzzyOWLAPIReasoner", // added by Josue Modified: trunk/components-core/src/main/java/org/dllearner/core/configurators/ComponentFactory.java =================================================================== --- trunk/components-core/src/main/java/org/dllearner/core/configurators/ComponentFactory.java 2011-07-25 10:40:02 UTC (rev 2962) +++ trunk/components-core/src/main/java/org/dllearner/core/configurators/ComponentFactory.java 2011-07-25 11:46:19 UTC (rev 2963) @@ -39,6 +39,7 @@ import org.dllearner.kb.KBFile; import org.dllearner.kb.OWLAPIOntology; import org.dllearner.kb.OWLFile; +import org.dllearner.kb.SparqlEndpointKS; import org.dllearner.kb.sparql.SparqlKnowledgeSource; import org.dllearner.learningproblems.ClassLearningProblem; import org.dllearner.learningproblems.PosNegLPStandard; @@ -84,6 +85,13 @@ } /** +* @return a component ready for initialization SparqlEndpointKS +**/ +public static SparqlEndpointKS getSparqlEndpointKS() { +return SparqlEndpointKSConfigurator.getSparqlEndpointKS(); +} + +/** * @param url URL of SPARQL Endpoint * @param instances relevant instances e.g. positive and negative examples in a learning problem * @return a component ready for initialization SparqlKnowledgeSource Modified: trunk/components-core/src/main/java/org/dllearner/core/configurators/FuzzyCELOEConfigurator.java =================================================================== --- trunk/components-core/src/main/java/org/dllearner/core/configurators/FuzzyCELOEConfigurator.java 2011-07-25 10:40:02 UTC (rev 2962) +++ trunk/components-core/src/main/java/org/dllearner/core/configurators/FuzzyCELOEConfigurator.java 2011-07-25 11:46:19 UTC (rev 2963) @@ -25,12 +25,14 @@ import org.dllearner.core.LearningProblem; import org.dllearner.core.LearningProblemUnsupportedException; import org.dllearner.core.ReasonerComponent; +import org.dllearner.core.configurators.RefinementOperatorConfigurator; /** * automatically generated, do not edit manually. * run org.dllearner.scripts.ConfigJavaGenerator to update **/ -public class FuzzyCELOEConfigurator extends RefinementOperatorConfigurator implements Configurator { +@SuppressWarnings("all") +public class FuzzyCELOEConfigurator extends RefinementOperatorConfigurator implements Configurator { private boolean reinitNecessary = false; private FuzzyCELOE fuzzyCELOE; Added: trunk/components-core/src/main/java/org/dllearner/core/configurators/SparqlEndpointKSConfigurator.java =================================================================== --- trunk/components-core/src/main/java/org/dllearner/core/configurators/SparqlEndpointKSConfigurator.java (rev 0) +++ trunk/components-core/src/main/java/org/dllearner/core/configurators/SparqlEndpointKSConfigurator.java 2011-07-25 11:46:19 UTC (rev 2963) @@ -0,0 +1,61 @@ +/** + * Copyright (C) 2007-2008, Jens Lehmann + * + * This file is part of DL-Learner. + * + * DL-Learner is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * DL-Learner is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + * + */ + +package org.dllearner.core.configurators; + +import org.dllearner.core.ComponentManager; +import org.dllearner.kb.SparqlEndpointKS; + +/** +* automatically generated, do not edit manually. +* run org.dllearner.scripts.ConfigJavaGenerator to update +**/ +public class SparqlEndpointKSConfigurator implements Configurator { + +private boolean reinitNecessary = false; +private SparqlEndpointKS sparqlEndpointKS; + +/** +* @param sparqlEndpointKS see SparqlEndpointKS +**/ +public SparqlEndpointKSConfigurator(SparqlEndpointKS sparqlEndpointKS){ +this.sparqlEndpointKS = sparqlEndpointKS; +} + +/** +* @return SparqlEndpointKS +**/ +public static SparqlEndpointKS getSparqlEndpointKS() { +SparqlEndpointKS component = ComponentManager.getInstance().knowledgeSource(SparqlEndpointKS.class); +return component; +} + + + +/** +* true, if this component needs reinitializsation. +* @return boolean +**/ +public boolean isReinitNecessary(){ +return reinitNecessary; +} + + +} Modified: trunk/components-core/src/main/java/org/dllearner/core/configurators/package.html =================================================================== --- trunk/components-core/src/main/java/org/dllearner/core/configurators/package.html 2011-07-25 10:40:02 UTC (rev 2962) +++ trunk/components-core/src/main/java/org/dllearner/core/configurators/package.html 2011-07-25 11:46:19 UTC (rev 2963) @@ -1 +1 @@ -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN"><html><head></head><body bgcolor="white"><p>Automatically generated classes, which enable programmatically settingand getting configuration options of components.</p></body></html> +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN"><html><head></head><body bgcolor="white"><p>Automatically generated classes, which enable programmatically settingand getting configuration options of components.</p></body></html> \ No newline at end of file Added: trunk/components-core/src/main/java/org/dllearner/kb/SparqlEndpointKS.java =================================================================== --- trunk/components-core/src/main/java/org/dllearner/kb/SparqlEndpointKS.java (rev 0) +++ trunk/components-core/src/main/java/org/dllearner/kb/SparqlEndpointKS.java 2011-07-25 11:46:19 UTC (rev 2963) @@ -0,0 +1,75 @@ +/** + * Copyright (C) 2007-2011, Jens Lehmann + * + * This file is part of DL-Learner. + * + * DL-Learner is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * DL-Learner is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + * + */ +package org.dllearner.kb; + +import java.io.File; +import java.net.URI; + +import org.dllearner.core.ComponentInitException; +import org.dllearner.core.KnowledgeSource; +import org.dllearner.core.OntologyFormat; +import org.dllearner.core.OntologyFormatUnsupportedException; +import org.dllearner.core.configurators.SparqlEndpointKSConfigurator; +import org.dllearner.core.owl.KB; +import org.dllearner.kb.sparql.SparqlEndpoint; + +/** + * SPARQL endpoint knowledge source (without fragment extraction), + * in particular for those algorithms which work directly on an endpoint + * without requiring an OWL reasoner. + * + * @author Jens Lehmann + * + */ +public class SparqlEndpointKS extends KnowledgeSource { + + private SparqlEndpoint endpoint; + + private SparqlEndpointKSConfigurator configurator ; + + @Override + public SparqlEndpointKSConfigurator getConfigurator(){ + return configurator; + } + + public SparqlEndpointKS(SparqlEndpoint endpoint) { + this.endpoint = endpoint; + } + + @Override + public KB toKB() { + return null; + } + + @Override + public String toDIG(URI kbURI) { + return null; + } + + @Override + public void export(File file, OntologyFormat format) + throws OntologyFormatUnsupportedException { + } + + @Override + public void init() throws ComponentInitException { + } + +} Modified: trunk/components-core/src/main/java/org/dllearner/kb/sparql/SparqlEndpoint.java =================================================================== --- trunk/components-core/src/main/java/org/dllearner/kb/sparql/SparqlEndpoint.java 2011-07-25 10:40:02 UTC (rev 2962) +++ trunk/components-core/src/main/java/org/dllearner/kb/sparql/SparqlEndpoint.java 2011-07-25 11:46:19 UTC (rev 2963) @@ -177,7 +177,8 @@ public static SparqlEndpoint getEndpointDBpediaLiveAKSW() { URL u = null; try { - u = new URL("http://dbpedia.aksw.org:8899/sparql"); +// u = new URL("http://dbpedia.aksw.org:8899/sparql"); + u = new URL("http://live.dbpedia.org/sparql"); } catch (Exception e) { e.printStackTrace(); } @@ -198,7 +199,7 @@ return new SparqlEndpoint(u, defaultGraphURIs, new LinkedList<String>()); } - public static SparqlEndpoint getEndpointDBpediaLive() { + public static SparqlEndpoint getEndpointDBpediaLiveOpenLink() { URL u = null; try { u = new URL("http://dbpedia-live.openlinksw.com/sparql"); Modified: trunk/components-core/src/main/java/org/dllearner/learningproblems/PosOnlyLP.java =================================================================== --- trunk/components-core/src/main/java/org/dllearner/learningproblems/PosOnlyLP.java 2011-07-25 10:40:02 UTC (rev 2962) +++ trunk/components-core/src/main/java/org/dllearner/learningproblems/PosOnlyLP.java 2011-07-25 11:46:19 UTC (rev 2963) @@ -63,6 +63,10 @@ return configurator; } + public PosOnlyLP() { + super(null); + } + public PosOnlyLP(ReasonerComponent reasoningService) { super(reasoningService); configurator = new PosOnlyLPConfigurator(this); Modified: trunk/components-ext/src/main/java/org/dllearner/algorithm/qtl/QTL.java =================================================================== --- trunk/components-ext/src/main/java/org/dllearner/algorithm/qtl/QTL.java 2011-07-25 10:40:02 UTC (rev 2962) +++ trunk/components-ext/src/main/java/org/dllearner/algorithm/qtl/QTL.java 2011-07-25 11:46:19 UTC (rev 2963) @@ -1,6 +1,27 @@ +/** + * Copyright (C) 2007-2011, Jens Lehmann + * + * This file is part of DL-Learner. + * + * DL-Learner is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * DL-Learner is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + * + */ package org.dllearner.algorithm.qtl; import java.util.ArrayList; +import java.util.Collection; +import java.util.LinkedList; import java.util.List; import java.util.SortedSet; import java.util.TreeSet; @@ -20,6 +41,12 @@ import org.dllearner.algorithm.qtl.operations.lgg.LGGGeneratorImpl; import org.dllearner.algorithm.qtl.util.ModelGenerator; import org.dllearner.algorithm.qtl.util.SPARQLEndpointEx; +import org.dllearner.core.LearningProblem; +import org.dllearner.core.SparqlQueryLearningAlgorithm; +import org.dllearner.core.options.CommonConfigOptions; +import org.dllearner.core.options.ConfigOption; +import org.dllearner.core.options.IntegerConfigOption; +import org.dllearner.kb.SparqlEndpointKS; import org.dllearner.kb.sparql.ExtractionDBCache; import org.dllearner.kb.sparql.SparqlEndpoint; import org.dllearner.kb.sparql.SparqlQuery; @@ -30,7 +57,16 @@ import com.hp.hpl.jena.rdf.model.Statement; import com.hp.hpl.jena.util.iterator.Filter; -public class QTL { +/** + * + * Learning algorithm for SPARQL queries based on so called query trees. + * + * @author Lorenz Bühmann + * @author Jens Lehmann + * + * + */ +public class QTL implements SparqlQueryLearningAlgorithm { private static final Logger logger = Logger.getLogger(QTL.class); @@ -58,7 +94,19 @@ private QueryTree<String> lgg; private SortedSet<String> lggInstances; - public QTL(SPARQLEndpointEx endpoint, ExtractionDBCache cache){ + public static Collection<ConfigOption<?>> createConfigOptions() { + Collection<ConfigOption<?>> options = new LinkedList<ConfigOption<?>>(); + options.add(CommonConfigOptions.maxExecutionTimeInSeconds(10)); + options.add(new IntegerConfigOption("maxQueryTreeDepth", "recursion depth of query tree extraction", 2)); + return options; + } + + public QTL(LearningProblem learningProblem, SparqlEndpointKS endpointKS) { + // TODO add code such that QTL can be used like other components; + // including implementing the start() method below + } + + public QTL(SPARQLEndpointEx endpoint, ExtractionDBCache cache) { this.endpoint = endpoint; this.cache = cache; @@ -213,4 +261,25 @@ query = "SELECT DISTINCT " + query.substring(7); return query; } + + @Override + public void start() { + + } + + @Override + public List<String> getCurrentlyBestSPARQLQueries(int nrOfSPARQLQueries) { + // TODO Auto-generated method stub + return null; + } + + @Override + public String getBestSPARQLQuery() { + // TODO Auto-generated method stub + return null; + } + + public void init() { + // TODO Auto-generated method stub + } } Modified: trunk/scripts/src/main/java/org/dllearner/scripts/ConfigJavaGenerator.java =================================================================== --- trunk/scripts/src/main/java/org/dllearner/scripts/ConfigJavaGenerator.java 2011-07-25 10:40:02 UTC (rev 2962) +++ trunk/scripts/src/main/java/org/dllearner/scripts/ConfigJavaGenerator.java 2011-07-25 11:46:19 UTC (rev 2963) @@ -39,6 +39,7 @@ import org.dllearner.core.LearningProblemUnsupportedException; import org.dllearner.core.ReasonerComponent; import org.dllearner.core.configurators.CELOEConfigurator; +import org.dllearner.core.configurators.FuzzyCELOEConfigurator; import org.dllearner.core.configurators.ISLEConfigurator; import org.dllearner.core.configurators.OCELConfigurator; import org.dllearner.core.configurators.ROLearnerConfigurator; @@ -71,6 +72,7 @@ ROLearnerConfigurator.class.getSimpleName(), OCELConfigurator.class.getSimpleName(), CELOEConfigurator.class.getSimpleName(), + FuzzyCELOEConfigurator.class.getSimpleName(), ISLEConfigurator.class.getSimpleName() })); Added: trunk/scripts/src/main/java/org/dllearner/scripts/matching/GeneralMatcher.java =================================================================== --- trunk/scripts/src/main/java/org/dllearner/scripts/matching/GeneralMatcher.java (rev 0) +++ trunk/scripts/src/main/java/org/dllearner/scripts/matching/GeneralMatcher.java 2011-07-25 11:46:19 UTC (rev 2963) @@ -0,0 +1,90 @@ +/** + * Copyright (C) 2007-2011, Jens Lehmann + * + * This file is part of DL-Learner. + * + * DL-Learner is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * DL-Learner is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + * + */ +package org.dllearner.scripts.matching; + +import java.net.MalformedURLException; +import java.net.URL; +import java.util.LinkedList; +import java.util.Set; + +import org.dllearner.algorithm.qtl.QTL; +import org.dllearner.core.ComponentInitException; +import org.dllearner.kb.SparqlEndpointKS; +import org.dllearner.kb.sparql.SparqlEndpoint; +import org.dllearner.learningproblems.PosOnlyLP; + +/** + * + * + * @author Jens Lehmann + * + */ +public class GeneralMatcher { + + public GeneralMatcher(SparqlEndpoint sparqlEndpoint1, SparqlEndpoint sparqlEndpoint2) throws ComponentInitException { + + // phase 1: collect owl:sameAs links and group them by class + // option 1: read links from file + // option 2: use SPARQL to get links + + // phase 2: create learning problems + + // phase 3: execute learning algorithms + // option 1: OWL based (reasoning) using CELOE + // option 2: RDF based using QTL + + Set<String> positiveExamples = null; + +// ComponentManager cm = ComponentManager.getInstance(); + SparqlEndpointKS ks = new SparqlEndpointKS(sparqlEndpoint2); + PosOnlyLP lp = new PosOnlyLP(); + lp.getConfigurator().setPositiveExamples(positiveExamples); + QTL qtl = new QTL(lp, ks); + qtl.init(); + qtl.start(); + String query = qtl.getBestSPARQLQuery(); + } + + + public static void main(String args[]) throws MalformedURLException, ComponentInitException { +// SparqlEndpoint endpoint1 = SparqlEndpoint.getEndpointDBpediaLiveAKSW(); + + // test endpoint at http://lgd.aksw.org:5678/sparql with the following graphs + // http://www.instancematching.org/oaei/di/sider/ + // http://www.instancematching.org/oaei/di/dailymed/ + // http://www.instancematching.org/oaei/di/linkedmdb/ + // http://www.instancematching.org/oaei/di/diseasome/ + // http://www.instancematching.org/oaei/di/drugbank/ + // http://spatial-data.org/un-fao/ + + // we can also use https://github.com/LATC/24-7-platform/tree/master/link-specifications + // as a base (with links read from files) + + LinkedList<String> defaultGraphs = new LinkedList<String>(); + defaultGraphs.add("http://linkedgeodata.org"); + SparqlEndpoint endpoint1 = new SparqlEndpoint(new URL("http://linkedgeodata.org/sparql"), defaultGraphs, new LinkedList<String>()); + + LinkedList<String> defaultGraphs2 = new LinkedList<String>(); + defaultGraphs2.add("http://dbpedia.org"); + SparqlEndpoint endpoint2 = new SparqlEndpoint(new URL("http://live.dbpedia.org/sparql"), defaultGraphs, new LinkedList<String>()); + + new GeneralMatcher(endpoint1, endpoint2); + } +} This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jen...@us...> - 2011-08-03 15:31:52
|
Revision: 2982 http://dl-learner.svn.sourceforge.net/dl-learner/?rev=2982&view=rev Author: jenslehmann Date: 2011-08-03 15:31:45 +0000 (Wed, 03 Aug 2011) Log Message: ----------- - added annotation to assign a name to a component usage: @ComponentAnn(name="subPropertyOf learner") to get the name: ComponentManager.getName(Component) - ctd. evaluation script Modified Paths: -------------- trunk/components-core/src/main/java/org/dllearner/algorithms/properties/PropertyDomainAxiomLearner.java trunk/components-core/src/main/java/org/dllearner/algorithms/properties/SubPropertyOfAxiomLearner.java trunk/components-core/src/main/java/org/dllearner/core/Component.java trunk/components-core/src/main/java/org/dllearner/core/ComponentManager.java trunk/components-core/src/main/java/org/dllearner/core/config/ConfigHelper.java trunk/components-core/src/main/java/org/dllearner/kb/sparql/SparqlQuery.java trunk/scripts/src/main/java/org/dllearner/scripts/evaluation/EnrichmentEvaluation.java Added Paths: ----------- trunk/components-core/src/main/java/org/dllearner/core/ComponentAnn.java Modified: trunk/components-core/src/main/java/org/dllearner/algorithms/properties/PropertyDomainAxiomLearner.java =================================================================== --- trunk/components-core/src/main/java/org/dllearner/algorithms/properties/PropertyDomainAxiomLearner.java 2011-08-03 14:49:36 UTC (rev 2981) +++ trunk/components-core/src/main/java/org/dllearner/algorithms/properties/PropertyDomainAxiomLearner.java 2011-08-03 15:31:45 UTC (rev 2982) @@ -246,7 +246,7 @@ f.set(l, editor.getValue()); } } - ConfigHelper.configurate(l, "propertyToDescribe", "test"); + ConfigHelper.configure(l, "propertyToDescribe", "test"); l.init(); l.start(); System.out.println(l.getCurrentlyBestEvaluatedAxioms(3)); Modified: trunk/components-core/src/main/java/org/dllearner/algorithms/properties/SubPropertyOfAxiomLearner.java =================================================================== --- trunk/components-core/src/main/java/org/dllearner/algorithms/properties/SubPropertyOfAxiomLearner.java 2011-08-03 14:49:36 UTC (rev 2981) +++ trunk/components-core/src/main/java/org/dllearner/algorithms/properties/SubPropertyOfAxiomLearner.java 2011-08-03 15:31:45 UTC (rev 2982) @@ -11,6 +11,7 @@ import org.dllearner.core.AxiomLearningAlgorithm; import org.dllearner.core.Component; import org.dllearner.core.ComponentInitException; +import org.dllearner.core.ComponentAnn; import org.dllearner.core.EvaluatedAxiom; import org.dllearner.core.config.ConfigOption; import org.dllearner.core.config.IntegerEditor; @@ -26,6 +27,7 @@ import com.hp.hpl.jena.query.ResultSet; import com.hp.hpl.jena.sparql.engine.http.QueryEngineHTTP; +@ComponentAnn(name="subPropertyOf learner") public class SubPropertyOfAxiomLearner extends Component implements AxiomLearningAlgorithm { @ConfigOption(name="propertyToDescribe", description="", propertyEditorClass=ObjectPropertyEditor.class) Modified: trunk/components-core/src/main/java/org/dllearner/core/Component.java =================================================================== --- trunk/components-core/src/main/java/org/dllearner/core/Component.java 2011-08-03 14:49:36 UTC (rev 2981) +++ trunk/components-core/src/main/java/org/dllearner/core/Component.java 2011-08-03 15:31:45 UTC (rev 2982) @@ -53,8 +53,12 @@ * component" is returned, but all implementations of components * are strongly encouraged to provide a static method returning * the name. + * + * Use the DLComponent annotation instead of setting a name through this method. + * * @return The name of this component. */ + @Deprecated public static String getName() { return "unnamed component"; } Added: trunk/components-core/src/main/java/org/dllearner/core/ComponentAnn.java =================================================================== --- trunk/components-core/src/main/java/org/dllearner/core/ComponentAnn.java (rev 0) +++ trunk/components-core/src/main/java/org/dllearner/core/ComponentAnn.java 2011-08-03 15:31:45 UTC (rev 2982) @@ -0,0 +1,43 @@ +/** + * Copyright (C) 2007-2011, Jens Lehmann + * + * This file is part of DL-Learner. + * + * DL-Learner is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * DL-Learner is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + * + */ +package org.dllearner.core; + +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; + +/** + * + * Annotation for DL-Learner components. Each component has to implement the interface as + * well as use this notation. + * + * @author Jens Lehmann + * + */ +@Retention(RetentionPolicy.RUNTIME) +public @interface ComponentAnn { + + /** + * The name of this component. + * @see ComponentManager#getName(Component) + * @return The name of this component. + */ + String name(); + +} Modified: trunk/components-core/src/main/java/org/dllearner/core/ComponentManager.java =================================================================== --- trunk/components-core/src/main/java/org/dllearner/core/ComponentManager.java 2011-08-03 14:49:36 UTC (rev 2981) +++ trunk/components-core/src/main/java/org/dllearner/core/ComponentManager.java 2011-08-03 15:31:45 UTC (rev 2982) @@ -24,6 +24,7 @@ import java.io.IOException; import java.io.InputStream; import java.io.InputStreamReader; +import java.lang.annotation.Annotation; import java.lang.reflect.Constructor; import java.lang.reflect.InvocationTargetException; import java.lang.reflect.Method; @@ -731,7 +732,14 @@ return list; } + /** + * Returns the name of a DL-Learner component. + * @param component + * @return Name of the component. + */ + public static String getName(Component component){ + ComponentAnn ann = component.getClass().getAnnotation(ComponentAnn.class); + return ann.name(); + } - - } Modified: trunk/components-core/src/main/java/org/dllearner/core/config/ConfigHelper.java =================================================================== --- trunk/components-core/src/main/java/org/dllearner/core/config/ConfigHelper.java 2011-08-03 14:49:36 UTC (rev 2981) +++ trunk/components-core/src/main/java/org/dllearner/core/config/ConfigHelper.java 2011-08-03 15:31:45 UTC (rev 2982) @@ -1,6 +1,7 @@ package org.dllearner.core.config; import java.beans.PropertyEditor; +import java.lang.annotation.Annotation; import java.lang.reflect.Field; import java.util.ArrayList; import java.util.List; @@ -15,7 +16,7 @@ * @param configName the name of the config option * @param configValue the value of the config option */ - public static void configurate(Component component, String configName, String configValue){ + public static void configure(Component component, String configName, String configValue){ Field[] fields = component.getClass().getDeclaredFields(); for(Field f : fields){ ConfigOption option = f.getAnnotation(ConfigOption.class); Modified: trunk/components-core/src/main/java/org/dllearner/kb/sparql/SparqlQuery.java =================================================================== --- trunk/components-core/src/main/java/org/dllearner/kb/sparql/SparqlQuery.java 2011-08-03 14:49:36 UTC (rev 2981) +++ trunk/components-core/src/main/java/org/dllearner/kb/sparql/SparqlQuery.java 2011-08-03 15:31:45 UTC (rev 2982) @@ -220,7 +220,7 @@ private static void writeToSparqlLog(String s) { File f = new File(sparqlLog); if(!f.canWrite() ){ - logger.info("could not write SPARQL log to : "+sparqlLog); + logger.info("could not write SPARQL log to : " + f.getAbsolutePath()); return ; } Modified: trunk/scripts/src/main/java/org/dllearner/scripts/evaluation/EnrichmentEvaluation.java =================================================================== --- trunk/scripts/src/main/java/org/dllearner/scripts/evaluation/EnrichmentEvaluation.java 2011-08-03 14:49:36 UTC (rev 2981) +++ trunk/scripts/src/main/java/org/dllearner/scripts/evaluation/EnrichmentEvaluation.java 2011-08-03 15:31:45 UTC (rev 2982) @@ -25,7 +25,9 @@ import org.apache.log4j.Logger; import org.dllearner.algorithms.properties.SubPropertyOfAxiomLearner; +import org.dllearner.core.ComponentManager; import org.dllearner.core.EvaluatedAxiom; +import org.dllearner.core.config.ConfigHelper; import org.dllearner.core.owl.ObjectProperty; import org.dllearner.kb.SparqlEndpointKS; import org.dllearner.kb.sparql.SparqlEndpoint; @@ -66,7 +68,6 @@ SparqlEndpoint se = SparqlEndpoint.getEndpointDBpediaLiveAKSW(); Set<ObjectProperty> properties = getAllObjectProperties(se); - System.out.println(properties); SparqlEndpointKS ks = new SparqlEndpointKS(se); @@ -75,6 +76,7 @@ SubPropertyOfAxiomLearner learner = new SubPropertyOfAxiomLearner(ks); learner.setPropertyToDescribe(property); learner.setMaxExecutionTimeInSeconds(10); + System.out.println("Applying " + ComponentManager.getName(learner) + " on " + property + " ... "); learner.start(); List<EvaluatedAxiom> learnedAxioms = learner.getCurrentlyBestEvaluatedAxioms(nrOfAxiomsToLearn); for(EvaluatedAxiom learnedAxiom : learnedAxioms) { @@ -102,7 +104,6 @@ ResultSet q = sq.send(); while(q.hasNext()) { QuerySolution qs = q.next(); - System.out.println(qs); properties.add(new ObjectProperty(qs.getResource("p").getURI())); } return properties; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jen...@us...> - 2011-08-04 10:05:07
|
Revision: 2987 http://dl-learner.svn.sourceforge.net/dl-learner/?rev=2987&view=rev Author: jenslehmann Date: 2011-08-04 10:04:56 +0000 (Thu, 04 Aug 2011) Log Message: ----------- created interfaces for the four base components and refactored their current implementations Modified Paths: -------------- trunk/components-core/src/main/java/org/dllearner/algorithms/BruteForceLearner.java trunk/components-core/src/main/java/org/dllearner/algorithms/RandomGuesser.java trunk/components-core/src/main/java/org/dllearner/algorithms/celoe/CELOE.java trunk/components-core/src/main/java/org/dllearner/algorithms/el/ELDescriptionTree.java trunk/components-core/src/main/java/org/dllearner/algorithms/el/ELLearningAlgorithm.java trunk/components-core/src/main/java/org/dllearner/algorithms/el/ELLearningAlgorithmDisjunctive.java trunk/components-core/src/main/java/org/dllearner/algorithms/fuzzydll/FuzzyCELOE.java trunk/components-core/src/main/java/org/dllearner/algorithms/gp/GP.java trunk/components-core/src/main/java/org/dllearner/algorithms/gp/GPUtilities.java trunk/components-core/src/main/java/org/dllearner/algorithms/hybridgp/Psi.java trunk/components-core/src/main/java/org/dllearner/algorithms/isle/ISLE.java trunk/components-core/src/main/java/org/dllearner/algorithms/ocel/OCEL.java trunk/components-core/src/main/java/org/dllearner/algorithms/ocel/ROLearner2.java trunk/components-core/src/main/java/org/dllearner/algorithms/ocel/SubsumptionComparator.java trunk/components-core/src/main/java/org/dllearner/algorithms/properties/DisjointPropertyAxiomLearner.java trunk/components-core/src/main/java/org/dllearner/algorithms/properties/EquivalentPropertyAxiomLearner.java trunk/components-core/src/main/java/org/dllearner/algorithms/properties/FunctionalPropertyAxiomLearner.java trunk/components-core/src/main/java/org/dllearner/algorithms/properties/PropertyDomainAxiomLearner.java trunk/components-core/src/main/java/org/dllearner/algorithms/properties/PropertyRangeAxiomLearner.java trunk/components-core/src/main/java/org/dllearner/algorithms/properties/ReflexivePropertyAxiomLearner.java trunk/components-core/src/main/java/org/dllearner/algorithms/properties/SubPropertyOfAxiomLearner.java trunk/components-core/src/main/java/org/dllearner/algorithms/properties/SymmetricPropertyAxiomLearner.java trunk/components-core/src/main/java/org/dllearner/algorithms/properties/TransitivePropertyAxiomLearner.java trunk/components-core/src/main/java/org/dllearner/algorithms/refinement/ROLearner.java trunk/components-core/src/main/java/org/dllearner/core/AbstractCELA.java trunk/components-core/src/main/java/org/dllearner/core/Component.java trunk/components-core/src/main/java/org/dllearner/core/ComponentManager.java trunk/components-core/src/main/java/org/dllearner/core/ComponentPool.java trunk/components-core/src/main/java/org/dllearner/core/KnowledgeSource.java trunk/components-core/src/main/java/org/dllearner/core/LearningAlgorithm.java trunk/components-core/src/main/java/org/dllearner/core/LearningProblem.java trunk/components-core/src/main/java/org/dllearner/core/LearningProblemUnsupportedException.java trunk/components-core/src/main/java/org/dllearner/core/ReasonerComponent.java trunk/components-core/src/main/java/org/dllearner/core/Score.java trunk/components-core/src/main/java/org/dllearner/core/config/ConfigHelper.java trunk/components-core/src/main/java/org/dllearner/core/configurators/BruteForceLearnerConfigurator.java trunk/components-core/src/main/java/org/dllearner/core/configurators/CELOEConfigurator.java trunk/components-core/src/main/java/org/dllearner/core/configurators/ClassLearningProblemConfigurator.java trunk/components-core/src/main/java/org/dllearner/core/configurators/ComponentFactory.java trunk/components-core/src/main/java/org/dllearner/core/configurators/DIGReasonerConfigurator.java trunk/components-core/src/main/java/org/dllearner/core/configurators/ELLearningAlgorithmConfigurator.java trunk/components-core/src/main/java/org/dllearner/core/configurators/ELLearningAlgorithmDisjunctiveConfigurator.java trunk/components-core/src/main/java/org/dllearner/core/configurators/FastInstanceCheckerConfigurator.java trunk/components-core/src/main/java/org/dllearner/core/configurators/FastRetrievalReasonerConfigurator.java trunk/components-core/src/main/java/org/dllearner/core/configurators/FuzzyCELOEConfigurator.java trunk/components-core/src/main/java/org/dllearner/core/configurators/FuzzyOWLAPIReasonerConfigurator.java trunk/components-core/src/main/java/org/dllearner/core/configurators/FuzzyPosNegLPStandardConfigurator.java trunk/components-core/src/main/java/org/dllearner/core/configurators/GPConfigurator.java trunk/components-core/src/main/java/org/dllearner/core/configurators/ISLEConfigurator.java trunk/components-core/src/main/java/org/dllearner/core/configurators/OCELConfigurator.java trunk/components-core/src/main/java/org/dllearner/core/configurators/OWLAPIReasonerConfigurator.java trunk/components-core/src/main/java/org/dllearner/core/configurators/PelletReasonerConfigurator.java trunk/components-core/src/main/java/org/dllearner/core/configurators/PosNegLPStandardConfigurator.java trunk/components-core/src/main/java/org/dllearner/core/configurators/PosNegLPStrictConfigurator.java trunk/components-core/src/main/java/org/dllearner/core/configurators/PosOnlyLPConfigurator.java trunk/components-core/src/main/java/org/dllearner/core/configurators/ProtegeReasonerConfigurator.java trunk/components-core/src/main/java/org/dllearner/core/configurators/ROLearnerConfigurator.java trunk/components-core/src/main/java/org/dllearner/core/configurators/RandomGuesserConfigurator.java trunk/components-core/src/main/java/org/dllearner/core/options/UnknownConfigOptionException.java trunk/components-core/src/main/java/org/dllearner/kb/KBFile.java trunk/components-core/src/main/java/org/dllearner/kb/OWLAPIOntology.java trunk/components-core/src/main/java/org/dllearner/kb/OWLFile.java trunk/components-core/src/main/java/org/dllearner/kb/SparqlEndpointKS.java trunk/components-core/src/main/java/org/dllearner/kb/sparql/NaturalLanguageDescriptionConvertVisitor.java trunk/components-core/src/main/java/org/dllearner/kb/sparql/SparqlKnowledgeSource.java trunk/components-core/src/main/java/org/dllearner/learningproblems/ClassLearningProblem.java trunk/components-core/src/main/java/org/dllearner/learningproblems/PosNegLP.java trunk/components-core/src/main/java/org/dllearner/learningproblems/PosNegLPStandard.java trunk/components-core/src/main/java/org/dllearner/learningproblems/PosNegLPStrict.java trunk/components-core/src/main/java/org/dllearner/learningproblems/PosOnlyLP.java trunk/components-core/src/main/java/org/dllearner/learningproblems/fuzzydll/FuzzyPosNegLP.java trunk/components-core/src/main/java/org/dllearner/learningproblems/fuzzydll/FuzzyPosNegLPStandard.java trunk/components-core/src/main/java/org/dllearner/reasoning/DIGReasoner.java trunk/components-core/src/main/java/org/dllearner/reasoning/FastInstanceChecker.java trunk/components-core/src/main/java/org/dllearner/reasoning/FastRetrievalReasoner.java trunk/components-core/src/main/java/org/dllearner/reasoning/OWLAPIReasoner.java trunk/components-core/src/main/java/org/dllearner/reasoning/PelletReasoner.java trunk/components-core/src/main/java/org/dllearner/reasoning/ProtegeReasoner.java trunk/components-core/src/main/java/org/dllearner/reasoning/fuzzydll/FuzzyOWLAPIReasoner.java trunk/components-core/src/main/java/org/dllearner/refinementoperators/ELDown.java trunk/components-core/src/main/java/org/dllearner/refinementoperators/ELDown2.java trunk/components-core/src/main/java/org/dllearner/refinementoperators/PsiDown.java trunk/components-core/src/main/java/org/dllearner/refinementoperators/PsiUp.java trunk/components-core/src/main/java/org/dllearner/refinementoperators/RhoDRDown.java trunk/components-core/src/main/java/org/dllearner/refinementoperators/RhoDown.java trunk/components-core/src/main/java/org/dllearner/refinementoperators/Utility.java trunk/components-core/src/main/java/org/dllearner/refinementoperators/fuzzydll/FuzzyRhoDRDown.java trunk/components-core/src/main/java/org/dllearner/utilities/Helper.java trunk/components-core/src/main/java/org/dllearner/utilities/components/ComponentCombo.java trunk/components-core/src/main/java/org/dllearner/utilities/components/ReasonerComponentFactory.java trunk/components-core/src/main/java/org/dllearner/utilities/datastructures/DescriptionSubsumptionTree.java trunk/components-core/src/main/java/org/dllearner/utilities/examples/AutomaticNegativeExampleFinderOWL.java trunk/components-core/src/main/java/org/dllearner/utilities/examples/AutomaticPositiveExampleFinderOWL.java trunk/components-core/src/main/java/org/dllearner/utilities/examples/ExampleDataCollector.java trunk/components-core/src/main/java/org/dllearner/utilities/learn/LearnConfiguration.java trunk/components-core/src/main/java/org/dllearner/utilities/learn/LearnOWLFileConfiguration.java trunk/components-core/src/main/java/org/dllearner/utilities/learn/LearnSPARQLConfiguration.java trunk/components-core/src/main/java/org/dllearner/utilities/learn/UsedEntitiesDetection.java trunk/components-core/src/main/java/org/dllearner/utilities/owl/ConceptTransformation.java trunk/components-core/src/main/java/org/dllearner/utilities/owl/DescriptionMinimizer.java trunk/components-core/src/main/java/org/dllearner/utilities/owl/EvaluatedDescriptionSet.java trunk/components-core/src/main/java/org/dllearner/utilities/owl/OntologyCloser.java trunk/components-core/src/test/java/org/dllearner/test/ClassCastExceptionTest.java trunk/components-core/src/test/java/org/dllearner/test/ComponentTest.java trunk/components-core/src/test/java/org/dllearner/test/FuzzyDLLTest.java trunk/components-core/src/test/java/org/dllearner/test/FuzzyDLLTest_Trains.java trunk/components-core/src/test/java/org/dllearner/test/FuzzyDLLTest_Trains_noFuzzyIndividuals.java trunk/components-core/src/test/java/org/dllearner/test/FuzzyDLLTest_noFuzzyTrains.java trunk/components-core/src/test/java/org/dllearner/test/SworeTest.java trunk/components-core/src/test/java/org/dllearner/test/junit/ClassExpressionTests.java trunk/components-core/src/test/java/org/dllearner/test/junit/ComponentTests.java trunk/components-core/src/test/java/org/dllearner/test/junit/ELDescriptionTreeTests.java trunk/components-core/src/test/java/org/dllearner/test/junit/ELDownTests.java trunk/components-core/src/test/java/org/dllearner/test/junit/HeuristicTests.java trunk/components-core/src/test/java/org/dllearner/test/junit/RefinementOperatorTests.java trunk/components-core/src/test/java/org/dllearner/test/junit/SimulationTests.java trunk/components-core/src/test/java/org/dllearner/test/junit/TestOntologies.java trunk/components-core/src/test/java/org/dllearner/test/junit/UtilitiesTests.java trunk/components-ext/src/main/java/org/dllearner/algorithm/qtl/QTL.java trunk/interfaces/src/main/java/org/dllearner/cli/ConfMapper.java trunk/interfaces/src/main/java/org/dllearner/cli/DocumentationGenerator.java trunk/interfaces/src/main/java/org/dllearner/cli/Start.java trunk/interfaces/src/main/java/org/dllearner/gui/ComponentPanel.java trunk/interfaces/src/main/java/org/dllearner/gui/Config.java trunk/interfaces/src/main/java/org/dllearner/gui/ConfigSave.java trunk/interfaces/src/main/java/org/dllearner/gui/InitWorker.java trunk/interfaces/src/main/java/org/dllearner/gui/MiniGUI.java trunk/interfaces/src/main/java/org/dllearner/gui/OptionPanel.java trunk/interfaces/src/main/java/org/dllearner/gui/StartGUI.java trunk/interfaces/src/main/java/org/dllearner/gui/widgets/AbstractWidgetPanel.java trunk/interfaces/src/main/java/org/dllearner/gui/widgets/WidgetPanelBoolean.java trunk/interfaces/src/main/java/org/dllearner/gui/widgets/WidgetPanelDefault.java trunk/interfaces/src/main/java/org/dllearner/gui/widgets/WidgetPanelDouble.java trunk/interfaces/src/main/java/org/dllearner/gui/widgets/WidgetPanelInteger.java trunk/interfaces/src/main/java/org/dllearner/gui/widgets/WidgetPanelString.java trunk/interfaces/src/main/java/org/dllearner/gui/widgets/WidgetPanelStringSet.java trunk/interfaces/src/main/java/org/dllearner/gui/widgets/WidgetPanelStringTupleList.java trunk/interfaces/src/main/java/org/dllearner/gui/widgets/WidgetPanelURL.java trunk/interfaces/src/main/java/org/dllearner/server/ClientState.java trunk/interfaces/src/main/java/org/dllearner/server/DLLearnerWS.java trunk/interfaces/src/main/java/org/dllearner/server/nke/Learner.java trunk/interfaces/src/test/java/org/dllearner/test/junit/OWLlinkTest.java trunk/interfaces/src/test/java/org/dllearner/test/junit/ReasonerTests.java trunk/protege/src/main/java/org/dllearner/tools/protege/Manager.java trunk/protege/src/test/java/Test.java trunk/scripts/src/main/java/org/dllearner/examples/KRKModular.java trunk/scripts/src/main/java/org/dllearner/examples/pdb/HelixRDFCreator.java trunk/scripts/src/main/java/org/dllearner/scripts/CloseOntology.java trunk/scripts/src/main/java/org/dllearner/scripts/ConfigJavaGenerator.java trunk/scripts/src/main/java/org/dllearner/scripts/CrossValidation.java trunk/scripts/src/main/java/org/dllearner/scripts/DumbLPFinder.java trunk/scripts/src/main/java/org/dllearner/scripts/NestedCrossValidation.java trunk/scripts/src/main/java/org/dllearner/scripts/NewSample.java trunk/scripts/src/main/java/org/dllearner/scripts/OWLAPIReasonerIncremental.java trunk/scripts/src/main/java/org/dllearner/scripts/PaperStatistics.java trunk/scripts/src/main/java/org/dllearner/scripts/RoleLearning.java trunk/scripts/src/main/java/org/dllearner/scripts/Sample.java trunk/scripts/src/main/java/org/dllearner/scripts/SemanticBible.java trunk/scripts/src/main/java/org/dllearner/scripts/SemanticBibleComparison.java trunk/scripts/src/main/java/org/dllearner/scripts/TestValidation.java trunk/scripts/src/main/java/org/dllearner/scripts/WikipediaCategoryCleaner.java trunk/scripts/src/main/java/org/dllearner/scripts/evaluation/ELOperatorBenchmark.java trunk/scripts/src/main/java/org/dllearner/scripts/evaluation/EnrichmentEvaluation.java trunk/scripts/src/main/java/org/dllearner/scripts/evaluation/EvaluationComputingScript.java trunk/scripts/src/main/java/org/dllearner/scripts/evaluation/OntologyEngineering.java trunk/scripts/src/main/java/org/dllearner/scripts/improveWikipedia/DBpediaClassLearnerCELOE.java trunk/scripts/src/main/java/org/dllearner/scripts/matching/LearnOSMClasses.java trunk/scripts/src/main/java/org/dllearner/scripts/matching/Stanley.java trunk/scripts/src/main/java/org/dllearner/scripts/tiger/TestIterativeLearning.java Added Paths: ----------- trunk/components-core/src/main/java/org/dllearner/core/AbstractComponent.java trunk/components-core/src/main/java/org/dllearner/core/AbstractKnowledgeSource.java trunk/components-core/src/main/java/org/dllearner/core/AbstractLearningProblem.java trunk/components-core/src/main/java/org/dllearner/core/AbstractReasonerComponent.java Modified: trunk/components-core/src/main/java/org/dllearner/algorithms/BruteForceLearner.java =================================================================== --- trunk/components-core/src/main/java/org/dllearner/algorithms/BruteForceLearner.java 2011-08-04 08:40:05 UTC (rev 2986) +++ trunk/components-core/src/main/java/org/dllearner/algorithms/BruteForceLearner.java 2011-08-04 10:04:56 UTC (rev 2987) @@ -27,8 +27,8 @@ import java.util.Map; import org.dllearner.core.AbstractCELA; -import org.dllearner.core.LearningProblem; -import org.dllearner.core.ReasonerComponent; +import org.dllearner.core.AbstractLearningProblem; +import org.dllearner.core.AbstractReasonerComponent; import org.dllearner.core.configurators.BruteForceLearnerConfigurator; import org.dllearner.core.options.CommonConfigOptions; import org.dllearner.core.options.ConfigEntry; @@ -66,8 +66,8 @@ } - private LearningProblem learningProblem; - private ReasonerComponent rs; + private AbstractLearningProblem learningProblem; + private AbstractReasonerComponent rs; private Description bestDefinition; private ScorePosNeg bestScore; @@ -82,7 +82,7 @@ // list of all generated concepts sorted by length private Map<Integer,List<Description>> generatedDefinitions = new HashMap<Integer,List<Description>>(); - public BruteForceLearner(LearningProblem learningProblem, ReasonerComponent rs) { + public BruteForceLearner(AbstractLearningProblem learningProblem, AbstractReasonerComponent rs) { super(learningProblem, rs); this.learningProblem = learningProblem; this.rs = rs; @@ -93,9 +93,9 @@ return "brute force learning algorithm"; } - public static Collection<Class<? extends LearningProblem>> supportedLearningProblems() { - Collection<Class<? extends LearningProblem>> problems = new LinkedList<Class<? extends LearningProblem>>(); - problems.add(LearningProblem.class); + public static Collection<Class<? extends AbstractLearningProblem>> supportedLearningProblems() { + Collection<Class<? extends AbstractLearningProblem>> problems = new LinkedList<Class<? extends AbstractLearningProblem>>(); + problems.add(AbstractLearningProblem.class); return problems; } Modified: trunk/components-core/src/main/java/org/dllearner/algorithms/RandomGuesser.java =================================================================== --- trunk/components-core/src/main/java/org/dllearner/algorithms/RandomGuesser.java 2011-08-04 08:40:05 UTC (rev 2986) +++ trunk/components-core/src/main/java/org/dllearner/algorithms/RandomGuesser.java 2011-08-04 10:04:56 UTC (rev 2987) @@ -26,8 +26,8 @@ import org.dllearner.algorithms.gp.GPUtilities; import org.dllearner.core.EvaluatedDescription; import org.dllearner.core.AbstractCELA; -import org.dllearner.core.LearningProblem; -import org.dllearner.core.ReasonerComponent; +import org.dllearner.core.AbstractLearningProblem; +import org.dllearner.core.AbstractReasonerComponent; import org.dllearner.core.Score; import org.dllearner.core.configurators.RandomGuesserConfigurator; import org.dllearner.core.options.ConfigEntry; @@ -67,7 +67,7 @@ private static Logger logger = Logger.getLogger(RandomGuesser.class); - public RandomGuesser(LearningProblem learningProblem, ReasonerComponent rs) { + public RandomGuesser(AbstractLearningProblem learningProblem, AbstractReasonerComponent rs) { super(learningProblem, rs); this.configurator = new RandomGuesserConfigurator(this); } @@ -76,9 +76,9 @@ return "random guesser learning algorithm"; } - public static Collection<Class<? extends LearningProblem>> supportedLearningProblems() { - Collection<Class<? extends LearningProblem>> problems = new LinkedList<Class<? extends LearningProblem>>(); - problems.add(LearningProblem.class); + public static Collection<Class<? extends AbstractLearningProblem>> supportedLearningProblems() { + Collection<Class<? extends AbstractLearningProblem>> problems = new LinkedList<Class<? extends AbstractLearningProblem>>(); + problems.add(AbstractLearningProblem.class); return problems; } Modified: trunk/components-core/src/main/java/org/dllearner/algorithms/celoe/CELOE.java =================================================================== --- trunk/components-core/src/main/java/org/dllearner/algorithms/celoe/CELOE.java 2011-08-04 08:40:05 UTC (rev 2986) +++ trunk/components-core/src/main/java/org/dllearner/algorithms/celoe/CELOE.java 2011-08-04 10:04:56 UTC (rev 2987) @@ -34,8 +34,8 @@ import org.dllearner.core.ComponentInitException; import org.dllearner.core.EvaluatedDescription; import org.dllearner.core.AbstractCELA; -import org.dllearner.core.LearningProblem; -import org.dllearner.core.ReasonerComponent; +import org.dllearner.core.AbstractLearningProblem; +import org.dllearner.core.AbstractReasonerComponent; import org.dllearner.core.configurators.CELOEConfigurator; import org.dllearner.core.options.BooleanConfigOption; import org.dllearner.core.options.CommonConfigMappings; @@ -147,14 +147,14 @@ return configurator; } - public CELOE(LearningProblem problem, ReasonerComponent reasoner) { + public CELOE(AbstractLearningProblem problem, AbstractReasonerComponent reasoner) { super(problem, reasoner); configurator = new CELOEConfigurator(this); } - public static Collection<Class<? extends LearningProblem>> supportedLearningProblems() { - Collection<Class<? extends LearningProblem>> problems = new LinkedList<Class<? extends LearningProblem>>(); - problems.add(LearningProblem.class); + public static Collection<Class<? extends AbstractLearningProblem>> supportedLearningProblems() { + Collection<Class<? extends AbstractLearningProblem>> problems = new LinkedList<Class<? extends AbstractLearningProblem>>(); + problems.add(AbstractLearningProblem.class); return problems; } Modified: trunk/components-core/src/main/java/org/dllearner/algorithms/el/ELDescriptionTree.java =================================================================== --- trunk/components-core/src/main/java/org/dllearner/algorithms/el/ELDescriptionTree.java 2011-08-04 08:40:05 UTC (rev 2986) +++ trunk/components-core/src/main/java/org/dllearner/algorithms/el/ELDescriptionTree.java 2011-08-04 10:04:56 UTC (rev 2987) @@ -31,7 +31,7 @@ import java.util.Map.Entry; import org.apache.log4j.Logger; -import org.dllearner.core.ReasonerComponent; +import org.dllearner.core.AbstractReasonerComponent; import org.dllearner.core.owl.ClassHierarchy; import org.dllearner.core.owl.Description; import org.dllearner.core.owl.Intersection; @@ -76,11 +76,11 @@ // the background knowledge (we need to have it explicitly here, // since we store simulation information in the tree and simulation // updates depend on background knowledge) - protected ReasonerComponent rs; + protected AbstractReasonerComponent rs; protected ClassHierarchy subsumptionHierarchy; protected ObjectPropertyHierarchy roleHierarchy; - public ELDescriptionTree(ReasonerComponent rs) { + public ELDescriptionTree(AbstractReasonerComponent rs) { this.rs = rs; subsumptionHierarchy = rs.getClassHierarchy(); roleHierarchy = rs.getObjectPropertyHierarchy(); @@ -92,7 +92,7 @@ * @param description * A description */ - public ELDescriptionTree(ReasonerComponent rs, Description description) { + public ELDescriptionTree(AbstractReasonerComponent rs, Description description) { this(rs); // construct root node and recursively build the tree rootNode = new ELDescriptionNode(this); Modified: trunk/components-core/src/main/java/org/dllearner/algorithms/el/ELLearningAlgorithm.java =================================================================== --- trunk/components-core/src/main/java/org/dllearner/algorithms/el/ELLearningAlgorithm.java 2011-08-04 08:40:05 UTC (rev 2986) +++ trunk/components-core/src/main/java/org/dllearner/algorithms/el/ELLearningAlgorithm.java 2011-08-04 10:04:56 UTC (rev 2987) @@ -28,8 +28,8 @@ import org.dllearner.core.ComponentInitException; import org.dllearner.core.EvaluatedDescription; import org.dllearner.core.AbstractCELA; -import org.dllearner.core.LearningProblem; -import org.dllearner.core.ReasonerComponent; +import org.dllearner.core.AbstractLearningProblem; +import org.dllearner.core.AbstractReasonerComponent; import org.dllearner.core.configurators.Configurator; import org.dllearner.core.configurators.ELLearningAlgorithmConfigurator; import org.dllearner.core.options.CommonConfigOptions; @@ -71,7 +71,7 @@ private ELHeuristic heuristic; private TreeSet<SearchTreeNode> candidates; - public ELLearningAlgorithm(PosNegLP problem, ReasonerComponent reasoner) { + public ELLearningAlgorithm(PosNegLP problem, AbstractReasonerComponent reasoner) { super(problem, reasoner); configurator = new ELLearningAlgorithmConfigurator(this); } @@ -80,8 +80,8 @@ return "standard EL learning algorithm"; } - public static Collection<Class<? extends LearningProblem>> supportedLearningProblems() { - Collection<Class<? extends LearningProblem>> problems = new LinkedList<Class<? extends LearningProblem>>(); + public static Collection<Class<? extends AbstractLearningProblem>> supportedLearningProblems() { + Collection<Class<? extends AbstractLearningProblem>> problems = new LinkedList<Class<? extends AbstractLearningProblem>>(); problems.add(PosNegLP.class); return problems; } Modified: trunk/components-core/src/main/java/org/dllearner/algorithms/el/ELLearningAlgorithmDisjunctive.java =================================================================== --- trunk/components-core/src/main/java/org/dllearner/algorithms/el/ELLearningAlgorithmDisjunctive.java 2011-08-04 08:40:05 UTC (rev 2986) +++ trunk/components-core/src/main/java/org/dllearner/algorithms/el/ELLearningAlgorithmDisjunctive.java 2011-08-04 10:04:56 UTC (rev 2987) @@ -31,8 +31,8 @@ import org.dllearner.core.ComponentInitException; import org.dllearner.core.EvaluatedDescription; import org.dllearner.core.AbstractCELA; -import org.dllearner.core.LearningProblem; -import org.dllearner.core.ReasonerComponent; +import org.dllearner.core.AbstractLearningProblem; +import org.dllearner.core.AbstractReasonerComponent; import org.dllearner.core.configurators.Configurator; import org.dllearner.core.configurators.ELLearningAlgorithmDisjunctiveConfigurator; import org.dllearner.core.options.CommonConfigOptions; @@ -121,7 +121,7 @@ // minimum score a tree must have to be part of the solution private double minimumTreeScore = -1; - public ELLearningAlgorithmDisjunctive(PosNegLP problem, ReasonerComponent reasoner) { + public ELLearningAlgorithmDisjunctive(PosNegLP problem, AbstractReasonerComponent reasoner) { super(problem, reasoner); configurator = new ELLearningAlgorithmDisjunctiveConfigurator(this); } @@ -130,8 +130,8 @@ return "disjunctive EL learning algorithm"; } - public static Collection<Class<? extends LearningProblem>> supportedLearningProblems() { - Collection<Class<? extends LearningProblem>> problems = new LinkedList<Class<? extends LearningProblem>>(); + public static Collection<Class<? extends AbstractLearningProblem>> supportedLearningProblems() { + Collection<Class<? extends AbstractLearningProblem>> problems = new LinkedList<Class<? extends AbstractLearningProblem>>(); problems.add(PosNegLP.class); return problems; } Modified: trunk/components-core/src/main/java/org/dllearner/algorithms/fuzzydll/FuzzyCELOE.java =================================================================== --- trunk/components-core/src/main/java/org/dllearner/algorithms/fuzzydll/FuzzyCELOE.java 2011-08-04 08:40:05 UTC (rev 2986) +++ trunk/components-core/src/main/java/org/dllearner/algorithms/fuzzydll/FuzzyCELOE.java 2011-08-04 10:04:56 UTC (rev 2987) @@ -39,8 +39,8 @@ import org.dllearner.core.ComponentInitException; import org.dllearner.core.EvaluatedDescription; import org.dllearner.core.FuzzyClassExpressionLearningAlgorithm; -import org.dllearner.core.LearningProblem; -import org.dllearner.core.ReasonerComponent; +import org.dllearner.core.AbstractLearningProblem; +import org.dllearner.core.AbstractReasonerComponent; import org.dllearner.core.configurators.FuzzyCELOEConfigurator; import org.dllearner.core.options.BooleanConfigOption; import org.dllearner.core.options.CommonConfigOptions; @@ -159,14 +159,14 @@ return configurator; } - public FuzzyCELOE(LearningProblem problem, ReasonerComponent reasoner) { + public FuzzyCELOE(AbstractLearningProblem problem, AbstractReasonerComponent reasoner) { super(problem, reasoner); configurator = new FuzzyCELOEConfigurator(this); } - public static Collection<Class<? extends LearningProblem>> supportedLearningProblems() { - Collection<Class<? extends LearningProblem>> problems = new LinkedList<Class<? extends LearningProblem>>(); - problems.add(LearningProblem.class); + public static Collection<Class<? extends AbstractLearningProblem>> supportedLearningProblems() { + Collection<Class<? extends AbstractLearningProblem>> problems = new LinkedList<Class<? extends AbstractLearningProblem>>(); + problems.add(AbstractLearningProblem.class); return problems; } Modified: trunk/components-core/src/main/java/org/dllearner/algorithms/gp/GP.java =================================================================== --- trunk/components-core/src/main/java/org/dllearner/algorithms/gp/GP.java 2011-08-04 08:40:05 UTC (rev 2986) +++ trunk/components-core/src/main/java/org/dllearner/algorithms/gp/GP.java 2011-08-04 10:04:56 UTC (rev 2987) @@ -31,8 +31,8 @@ import org.dllearner.algorithms.hybridgp.Psi; import org.dllearner.core.AbstractCELA; -import org.dllearner.core.LearningProblem; -import org.dllearner.core.ReasonerComponent; +import org.dllearner.core.AbstractLearningProblem; +import org.dllearner.core.AbstractReasonerComponent; import org.dllearner.core.configurators.GPConfigurator; import org.dllearner.core.options.BooleanConfigOption; import org.dllearner.core.options.ConfigEntry; @@ -140,7 +140,7 @@ * 1.0 and a probability of mutation of 0.01. * */ - public GP(PosNegLP learningProblem, ReasonerComponent rs) { + public GP(PosNegLP learningProblem, AbstractReasonerComponent rs) { super(learningProblem, rs); this.configurator = new GPConfigurator(this); } @@ -149,8 +149,8 @@ return "genetic programming learning algorithm"; } - public static Collection<Class<? extends LearningProblem>> supportedLearningProblems() { - Collection<Class<? extends LearningProblem>> problems = new LinkedList<Class<? extends LearningProblem>>(); + public static Collection<Class<? extends AbstractLearningProblem>> supportedLearningProblems() { + Collection<Class<? extends AbstractLearningProblem>> problems = new LinkedList<Class<? extends AbstractLearningProblem>>(); problems.add(PosNegLP.class); return problems; } Modified: trunk/components-core/src/main/java/org/dllearner/algorithms/gp/GPUtilities.java =================================================================== --- trunk/components-core/src/main/java/org/dllearner/algorithms/gp/GPUtilities.java 2011-08-04 08:40:05 UTC (rev 2986) +++ trunk/components-core/src/main/java/org/dllearner/algorithms/gp/GPUtilities.java 2011-08-04 10:04:56 UTC (rev 2987) @@ -7,8 +7,8 @@ import java.util.SortedSet; import java.util.TreeMap; -import org.dllearner.core.LearningProblem; -import org.dllearner.core.ReasonerComponent; +import org.dllearner.core.AbstractLearningProblem; +import org.dllearner.core.AbstractReasonerComponent; import org.dllearner.core.ReasoningMethodUnsupportedException; import org.dllearner.core.owl.ObjectAllRestriction; import org.dllearner.core.owl.NamedClass; @@ -54,7 +54,7 @@ private static Random rand = new Random(); - private static ScorePosNeg calculateFitness(LearningProblem learningProblem, Description hypothesis) { + private static ScorePosNeg calculateFitness(AbstractLearningProblem learningProblem, Description hypothesis) { return calculateFitness(learningProblem, hypothesis, null); } @@ -63,7 +63,7 @@ // (macht aber nicht so viel Sinn, da man das bei richtigen Reasoning-Algorithmen // ohnehin mit einer Erweiterung der Wissensbasis um die Inklusion Target SUBSETOF ReturnType // erschlagen kann) - private static ScorePosNeg calculateFitness(LearningProblem learningProblem, Description hypothesis, Description adc) { + private static ScorePosNeg calculateFitness(AbstractLearningProblem learningProblem, Description hypothesis, Description adc) { Description extendedHypothesis; // return type temporarily disabled @@ -123,11 +123,11 @@ return score; } - public static Program createProgram(LearningProblem learningProblem, Description mainTree) { + public static Program createProgram(AbstractLearningProblem learningProblem, Description mainTree) { return new Program(calculateFitness(learningProblem, mainTree), mainTree); } - private static Program createProgram(LearningProblem learningProblem, Description mainTree, Description adc) { + private static Program createProgram(AbstractLearningProblem learningProblem, Description mainTree, Description adc) { return new Program(calculateFitness(learningProblem, mainTree,adc), mainTree, adc); } @@ -135,7 +135,7 @@ * Perform a point mutation on the given program. * @param p The program to be mutated. */ - public static Program mutation(LearningProblem learningProblem, ReasonerComponent rs, Program p) { + public static Program mutation(AbstractLearningProblem learningProblem, AbstractReasonerComponent rs, Program p) { mutation++; if(p.getAdc() != null) { // TODO: hier kann man noch mehr Feinabstimmung machen, d.h. @@ -159,7 +159,7 @@ } } - private static Description mutation(LearningProblem learningProblem, ReasonerComponent rs, Description tree, boolean useADC) { + private static Description mutation(AbstractLearningProblem learningProblem, AbstractReasonerComponent rs, Description tree, boolean useADC) { // auch bei Mutation muss darauf geachtet werden, dass // Baum nicht modifiziert wird (sonst w�rde man automatisch auch // andere "selected individuals" modifizieren) @@ -228,7 +228,7 @@ * @param p2 Second parent. * @return A two-element array containing the offpsring. */ - public static Program[] crossover(LearningProblem learningProblem, Program p1, Program p2) { + public static Program[] crossover(AbstractLearningProblem learningProblem, Program p1, Program p2) { crossover++; if(p1.getAdc() != null) { Description[] pt; @@ -304,7 +304,7 @@ // m�sste auch mit ADC funktionieren, da nur am Hauptbaum etwas // ver�ndert wird - public static Program hillClimbing(LearningProblem learningProblem, ReasonerComponent rs, Program p) { + public static Program hillClimbing(AbstractLearningProblem learningProblem, AbstractReasonerComponent rs, Program p) { hillClimbing++; // checken, ob Bedingungen f�r hill-climbing erf�llt sind if(!rs.getReasonerType().equals(ReasonerType.FAST_RETRIEVAL) @@ -327,7 +327,7 @@ // Alternativen zu speichern und dann ein Element zuf�llig auszuw�hlen, // aber w�rde man das nicht machen, dann w�re das ein starker Bias // zu z.B. Disjunktion (weil die als erstes getestet wird) - private static Description hillClimbing(LearningProblem learningProblem, ReasonerComponent rs, Description node, ScoreThreeValued score) { + private static Description hillClimbing(AbstractLearningProblem learningProblem, AbstractReasonerComponent rs, Description node, ScoreThreeValued score) { SortedSetTuple<Individual> tuple = new SortedSetTuple<Individual>(score.getPosClassified(),score.getNegClassified()); SortedSetTuple<String> stringTuple = Helper.getStringTuple(tuple); // FlatABox abox = FlatABox.getInstance(); @@ -452,7 +452,7 @@ } } - private static ScoreThreeValued getScore(int conceptLength, LearningProblem learningProblem, ReasonerComponent rs, SortedSet<Individual> posClassified, SortedSet<Individual> negClassified) { + private static ScoreThreeValued getScore(int conceptLength, AbstractLearningProblem learningProblem, AbstractReasonerComponent rs, SortedSet<Individual> posClassified, SortedSet<Individual> negClassified) { // es muss hier die Helper-Methode verwendet werden, sonst werden // Individuals gel�scht !! SortedSet<Individual> neutClassified = Helper.intersection(rs.getIndividuals(),posClassified); @@ -489,7 +489,7 @@ return returnMap; } - private static Description pickTerminalSymbol(LearningProblem learningProblem, ReasonerComponent rs, boolean useADC) { + private static Description pickTerminalSymbol(AbstractLearningProblem learningProblem, AbstractReasonerComponent rs, boolean useADC) { // FlatABox abox = FlatABox.getInstance(); int nr; int nrOfConcepts = rs.getNamedClasses().size(); @@ -619,7 +619,7 @@ * @param depth Depth of the tree. * @return The created program. */ - public static Program createFullRandomProgram(LearningProblem learningProblem, ReasonerComponent rs, int depth, boolean adc) { + public static Program createFullRandomProgram(AbstractLearningProblem learningProblem, AbstractReasonerComponent rs, int depth, boolean adc) { if(adc) { // erster Baum Hauptbaum, zweiter Baum ADC return createProgram(learningProblem, createFullRandomTree(learningProblem, rs, depth, true), @@ -629,7 +629,7 @@ return createProgram(learningProblem, createFullRandomTree(learningProblem, rs, depth, false)); } - private static Description createFullRandomTree(LearningProblem learningProblem, ReasonerComponent rs, int depth, boolean useADC) { + private static Description createFullRandomTree(AbstractLearningProblem learningProblem, AbstractReasonerComponent rs, int depth, boolean useADC) { // FlatABox abox = FlatABox.getInstance(); int numberOfRoles = rs.getObjectProperties().size(); // abox.roles.size(); @@ -680,7 +680,7 @@ * @param depth The maximum depth of the program tree. * @return The created program. */ - public static Program createGrowRandomProgram(LearningProblem learningProblem, ReasonerComponent rs, int depth, boolean adc) { + public static Program createGrowRandomProgram(AbstractLearningProblem learningProblem, AbstractReasonerComponent rs, int depth, boolean adc) { if(adc) { // erster Baum Hauptbaum, zweiter Baum ADC return createProgram(learningProblem, createGrowRandomTree(learningProblem,rs,depth,true), @@ -690,7 +690,7 @@ return createProgram(learningProblem, createGrowRandomTree(learningProblem, rs, depth,false)); } - public static Description createGrowRandomTree(LearningProblem learningProblem, ReasonerComponent rs, int depth, boolean useADC) { + public static Description createGrowRandomTree(AbstractLearningProblem learningProblem, AbstractReasonerComponent rs, int depth, boolean useADC) { /* private static Concept pickAlphabetSymbol(boolean useADC) { FlatABox abox = FlatABox.getInstance(); Modified: trunk/components-core/src/main/java/org/dllearner/algorithms/hybridgp/Psi.java =================================================================== --- trunk/components-core/src/main/java/org/dllearner/algorithms/hybridgp/Psi.java 2011-08-04 08:40:05 UTC (rev 2986) +++ trunk/components-core/src/main/java/org/dllearner/algorithms/hybridgp/Psi.java 2011-08-04 10:04:56 UTC (rev 2987) @@ -6,7 +6,7 @@ import java.util.TreeMap; import org.dllearner.algorithms.gp.Program; -import org.dllearner.core.ReasonerComponent; +import org.dllearner.core.AbstractReasonerComponent; import org.dllearner.core.owl.Description; import org.dllearner.learningproblems.PosNegLP; import org.dllearner.learningproblems.ScorePosNeg; @@ -49,7 +49,7 @@ private long someTimeStart = 0; public long someTime = 0; - public Psi(PosNegLP learningProblem, ReasonerComponent reasoningService) { //, PsiUp pu, PsiDown pd) { + public Psi(PosNegLP learningProblem, AbstractReasonerComponent reasoningService) { //, PsiUp pu, PsiDown pd) { // this.pu = pu; // this.pd = pd; this.learningProblem = learningProblem; Modified: trunk/components-core/src/main/java/org/dllearner/algorithms/isle/ISLE.java =================================================================== --- trunk/components-core/src/main/java/org/dllearner/algorithms/isle/ISLE.java 2011-08-04 08:40:05 UTC (rev 2986) +++ trunk/components-core/src/main/java/org/dllearner/algorithms/isle/ISLE.java 2011-08-04 10:04:56 UTC (rev 2987) @@ -35,8 +35,8 @@ import org.dllearner.core.ComponentInitException; import org.dllearner.core.EvaluatedDescription; import org.dllearner.core.AbstractCELA; -import org.dllearner.core.LearningProblem; -import org.dllearner.core.ReasonerComponent; +import org.dllearner.core.AbstractLearningProblem; +import org.dllearner.core.AbstractReasonerComponent; import org.dllearner.core.configurators.ISLEConfigurator; import org.dllearner.core.options.BooleanConfigOption; import org.dllearner.core.options.CommonConfigOptions; @@ -137,14 +137,14 @@ return configurator; } - public ISLE(LearningProblem problem, ReasonerComponent reasoner) { + public ISLE(AbstractLearningProblem problem, AbstractReasonerComponent reasoner) { super(problem, reasoner); configurator = new ISLEConfigurator(this); } - public static Collection<Class<? extends LearningProblem>> supportedLearningProblems() { - Collection<Class<? extends LearningProblem>> problems = new LinkedList<Class<? extends LearningProblem>>(); - problems.add(LearningProblem.class); + public static Collection<Class<? extends AbstractLearningProblem>> supportedLearningProblems() { + Collection<Class<? extends AbstractLearningProblem>> problems = new LinkedList<Class<? extends AbstractLearningProblem>>(); + problems.add(AbstractLearningProblem.class); return problems; } Modified: trunk/components-core/src/main/java/org/dllearner/algorithms/ocel/OCEL.java =================================================================== --- trunk/components-core/src/main/java/org/dllearner/algorithms/ocel/OCEL.java 2011-08-04 08:40:05 UTC (rev 2986) +++ trunk/components-core/src/main/java/org/dllearner/algorithms/ocel/OCEL.java 2011-08-04 10:04:56 UTC (rev 2987) @@ -31,8 +31,8 @@ import org.apache.log4j.Logger; import org.dllearner.core.ComponentInitException; import org.dllearner.core.AbstractCELA; -import org.dllearner.core.LearningProblem; -import org.dllearner.core.ReasonerComponent; +import org.dllearner.core.AbstractLearningProblem; +import org.dllearner.core.AbstractReasonerComponent; import org.dllearner.core.configurators.OCELConfigurator; import org.dllearner.core.options.BooleanConfigOption; import org.dllearner.core.options.CommonConfigMappings; @@ -152,18 +152,18 @@ // soll später einen Operator und eine Heuristik entgegennehmen // public ROLearner(LearningProblem learningProblem, LearningProblem learningProblem2) { - public OCEL(PosNegLP learningProblem, ReasonerComponent reasoningService) { + public OCEL(PosNegLP learningProblem, AbstractReasonerComponent reasoningService) { super(learningProblem, reasoningService); this.configurator = new OCELConfigurator(this); } - public OCEL(PosOnlyLP learningProblem, ReasonerComponent reasoningService) { + public OCEL(PosOnlyLP learningProblem, AbstractReasonerComponent reasoningService) { super(learningProblem, reasoningService); this.configurator = new OCELConfigurator(this); } - public static Collection<Class<? extends LearningProblem>> supportedLearningProblems() { - Collection<Class<? extends LearningProblem>> problems = new LinkedList<Class<? extends LearningProblem>>(); + public static Collection<Class<? extends AbstractLearningProblem>> supportedLearningProblems() { + Collection<Class<? extends AbstractLearningProblem>> problems = new LinkedList<Class<? extends AbstractLearningProblem>>(); problems.add(PosNegLP.class); problems.add(PosOnlyLP.class); return problems; Modified: trunk/components-core/src/main/java/org/dllearner/algorithms/ocel/ROLearner2.java =================================================================== --- trunk/components-core/src/main/java/org/dllearner/algorithms/ocel/ROLearner2.java 2011-08-04 08:40:05 UTC (rev 2986) +++ trunk/components-core/src/main/java/org/dllearner/algorithms/ocel/ROLearner2.java 2011-08-04 10:04:56 UTC (rev 2987) @@ -33,8 +33,8 @@ import java.util.concurrent.ConcurrentSkipListSet; import org.apache.log4j.Logger; -import org.dllearner.core.LearningProblem; -import org.dllearner.core.ReasonerComponent; +import org.dllearner.core.AbstractLearningProblem; +import org.dllearner.core.AbstractReasonerComponent; import org.dllearner.core.configurators.OCELConfigurator; import org.dllearner.core.owl.Description; import org.dllearner.core.owl.Individual; @@ -67,7 +67,7 @@ private OCELConfigurator configurator; // basic setup: learning problem and reasoning service - private ReasonerComponent rs; + private AbstractReasonerComponent rs; // often the learning problems needn't be accessed directly; instead // use the example sets below and the posonly variable private PosNegLP learningProblem; @@ -213,8 +213,8 @@ public ROLearner2( OCELConfigurator configurator, - LearningProblem learningProblem, - ReasonerComponent rs, + AbstractLearningProblem learningProblem, + AbstractReasonerComponent rs, RefinementOperator operator, ExampleBasedHeuristic heuristic, Description startDescription, Modified: trunk/components-core/src/main/java/org/dllearner/algorithms/ocel/SubsumptionComparator.java =================================================================== --- trunk/components-core/src/main/java/org/dllearner/algorithms/ocel/SubsumptionComparator.java 2011-08-04 08:40:05 UTC (rev 2986) +++ trunk/components-core/src/main/java/org/dllearner/algorithms/ocel/SubsumptionComparator.java 2011-08-04 10:04:56 UTC (rev 2987) @@ -2,16 +2,16 @@ import java.util.Comparator; -import org.dllearner.core.ReasonerComponent; +import org.dllearner.core.AbstractReasonerComponent; import org.dllearner.core.owl.Description; import org.dllearner.utilities.owl.ConceptComparator; public class SubsumptionComparator implements Comparator<Description> { - private ReasonerComponent rs; + private AbstractReasonerComponent rs; private ConceptComparator cc = new ConceptComparator(); - public SubsumptionComparator(ReasonerComponent rs) { + public SubsumptionComparator(AbstractReasonerComponent rs) { this.rs = rs; } Modified: trunk/components-core/src/main/java/org/dllearner/algorithms/properties/DisjointPropertyAxiomLearner.java =================================================================== --- trunk/components-core/src/main/java/org/dllearner/algorithms/properties/DisjointPropertyAxiomLearner.java 2011-08-04 08:40:05 UTC (rev 2986) +++ trunk/components-core/src/main/java/org/dllearner/algorithms/properties/DisjointPropertyAxiomLearner.java 2011-08-04 10:04:56 UTC (rev 2987) @@ -3,14 +3,14 @@ import java.util.List; import org.dllearner.core.AxiomLearningAlgorithm; -import org.dllearner.core.Component; +import org.dllearner.core.AbstractComponent; import org.dllearner.core.ComponentInitException; import org.dllearner.core.EvaluatedAxiom; import org.dllearner.core.configurators.Configurator; import org.dllearner.core.owl.Axiom; import org.dllearner.kb.SparqlEndpointKS; -public class DisjointPropertyAxiomLearner extends Component implements AxiomLearningAlgorithm { +public class DisjointPropertyAxiomLearner extends AbstractComponent implements AxiomLearningAlgorithm { private String propertyToDescribe; Modified: trunk/components-core/src/main/java/org/dllearner/algorithms/properties/EquivalentPropertyAxiomLearner.java =================================================================== --- trunk/components-core/src/main/java/org/dllearner/algorithms/properties/EquivalentPropertyAxiomLearner.java 2011-08-04 08:40:05 UTC (rev 2986) +++ trunk/components-core/src/main/java/org/dllearner/algorithms/properties/EquivalentPropertyAxiomLearner.java 2011-08-04 10:04:56 UTC (rev 2987) @@ -3,14 +3,14 @@ import java.util.List; import org.dllearner.core.AxiomLearningAlgorithm; -import org.dllearner.core.Component; +import org.dllearner.core.AbstractComponent; import org.dllearner.core.ComponentInitException; import org.dllearner.core.EvaluatedAxiom; import org.dllearner.core.configurators.Configurator; import org.dllearner.core.owl.Axiom; import org.dllearner.kb.SparqlEndpointKS; -public class EquivalentPropertyAxiomLearner extends Component implements AxiomLearningAlgorithm { +public class EquivalentPropertyAxiomLearner extends AbstractComponent implements AxiomLearningAlgorithm { private String propertyToDescribe; Modified: trunk/components-core/src/main/java/org/dllearner/algorithms/properties/FunctionalPropertyAxiomLearner.java =================================================================== --- trunk/components-core/src/main/java/org/dllearner/algorithms/properties/FunctionalPropertyAxiomLearner.java 2011-08-04 08:40:05 UTC (rev 2986) +++ trunk/components-core/src/main/java/org/dllearner/algorithms/properties/FunctionalPropertyAxiomLearner.java 2011-08-04 10:04:56 UTC (rev 2987) @@ -5,7 +5,7 @@ import java.util.List; import org.dllearner.core.AxiomLearningAlgorithm; -import org.dllearner.core.Component; +import org.dllearner.core.AbstractComponent; import org.dllearner.core.ComponentInitException; import org.dllearner.core.EvaluatedAxiom; import org.dllearner.core.config.ConfigOption; @@ -26,7 +26,7 @@ import com.hp.hpl.jena.sparql.engine.http.QueryEngineHTTP; import com.hp.hpl.jena.vocabulary.OWL; -public class FunctionalPropertyAxiomLearner extends Component implements AxiomLearningAlgorithm { +public class FunctionalPropertyAxiomLearner extends AbstractComponent implements AxiomLearningAlgorithm { private static final Logger logger = LoggerFactory.getLogger(FunctionalPropertyAxiomLearner.class); Modified: trunk/components-core/src/main/java/org/dllearner/algorithms/properties/PropertyDomainAxiomLearner.java =================================================================== --- trunk/components-core/src/main/java/org/dllearner/algorithms/properties/PropertyDomainAxiomLearner.java 2011-08-04 08:40:05 UTC (rev 2986) +++ trunk/components-core/src/main/java/org/dllearner/algorithms/properties/PropertyDomainAxiomLearner.java 2011-08-04 10:04:56 UTC (rev 2987) @@ -15,7 +15,7 @@ import java.util.TreeSet; import org.dllearner.core.AxiomLearningAlgorithm; -import org.dllearner.core.Component; +import org.dllearner.core.AbstractComponent; import org.dllearner.core.ComponentInitException; import org.dllearner.core.EvaluatedAxiom; import org.dllearner.core.config.ConfigOption; @@ -39,7 +39,7 @@ import com.hp.hpl.jena.query.ResultSet; import com.hp.hpl.jena.sparql.engine.http.QueryEngineHTTP; -public class PropertyDomainAxiomLearner extends Component implements AxiomLearningAlgorithm { +public class PropertyDomainAxiomLearner extends AbstractComponent implements AxiomLearningAlgorithm { private static final Logger logger = LoggerFactory.getLogger(PropertyDomainAxiomLearner.class); Modified: trunk/components-core/src/main/java/org/dllearner/algorithms/properties/PropertyRangeAxiomLearner.java =================================================================== --- trunk/components-core/src/main/java/org/dllearner/algorithms/properties/PropertyRangeAxiomLearner.java 2011-08-04 08:40:05 UTC (rev 2986) +++ trunk/components-core/src/main/java/org/dllearner/algorithms/properties/PropertyRangeAxiomLearner.java 2011-08-04 10:04:56 UTC (rev 2987) @@ -13,7 +13,7 @@ import java.util.TreeSet; import org.dllearner.core.AxiomLearningAlgorithm; -import org.dllearner.core.Component; +import org.dllearner.core.AbstractComponent; import org.dllearner.core.ComponentInitException; import org.dllearner.core.EvaluatedAxiom; import org.dllearner.core.config.ConfigOption; @@ -36,7 +36,7 @@ import com.hp.hpl.jena.query.ResultSet; import com.hp.hpl.jena.sparql.engine.http.QueryEngineHTTP; -public class PropertyRangeAxiomLearner extends Component implements AxiomLearningAlgorithm { +public class PropertyRangeAxiomLearner extends AbstractComponent implements AxiomLearningAlgorithm { private static final Logger logger = LoggerFactory.getLogger(PropertyRangeAxiomLearner.class); Modified: trunk/components-core/src/main/java/org/dllearner/algorithms/properties/ReflexivePropertyAxiomLearner.java =================================================================== --- trunk/components-core/src/main/java/org/dllearner/algorithms/properties/ReflexivePropertyAxiomLearner.java 2011-08-04 08:40:05 UTC (rev 2986) +++ trunk/components-core/src/main/java/org/dllearner/algorithms/properties/ReflexivePropertyAxiomLearner.java 2011-08-04 10:04:56 UTC (rev 2987) @@ -5,7 +5,7 @@ import java.util.List; import org.dllearner.core.AxiomLearningAlgorithm; -import org.dllearner.core.Component; +import org.dllearner.core.AbstractComponent; import org.dllearner.core.ComponentInitException; import org.dllearner.core.EvaluatedAxiom; import org.dllearner.core.config.ConfigOption; @@ -26,7 +26,7 @@ import com.hp.hpl.jena.sparql.engine.http.QueryEngineHTTP; import com.hp.hpl.jena.vocabulary.OWL2; -public class ReflexivePropertyAxiomLearner extends Component implements AxiomLearningAlgorithm { +public class ReflexivePropertyAxiomLearner extends AbstractComponent implements AxiomLearningAlgorithm { private static final Logger logger = LoggerFactory.getLogger(ReflexivePropertyAxiomLearner.class); Modified: trunk/components-core/src/main/java/org/dllearner/algorithms/properties/SubPropertyOfAxiomLearner.java =================================================================== --- trunk/components-core/src/main/java/org/dllearner/algorithms/properties/SubPropertyOfAxiomLearner.java 2011-08-04 08:40:05 UTC (rev 2986) +++ trunk/components-core/src/main/java/org/dllearner/algorithms/properties/SubPropertyOfAxiomLearner.java 2011-08-04 10:04:56 UTC (rev 2987) @@ -9,7 +9,7 @@ import java.util.Set; import org.dllearner.core.AxiomLearningAlgorithm; -import org.dllearner.core.Component; +import org.dllearner.core.AbstractComponent; import org.dllearner.core.ComponentInitException; import org.dllearner.core.ComponentAnn; import org.dllearner.core.EvaluatedAxiom; @@ -28,7 +28,7 @@ import com.hp.hpl.jena.sparql.engine.http.QueryEngineHTTP; @ComponentAnn(name="subPropertyOf learner") -public class SubPropertyOfAxiomLearner extends Component implements AxiomLearningAlgorithm { +public class SubPropertyOfAxiomLearner extends AbstractComponent implements AxiomLearningAlgorithm { @ConfigOption(name="propertyToDescribe", description="", propertyEditorClass=ObjectPropertyEditor.class) private ObjectProperty propertyToDescribe; Modified: trunk/components-core/src/main/java/org/dllearner/algorithms/properties/SymmetricPropertyAxiomLearner.java =================================================================== --- trunk/components-core/src/main/java/org/dllearner/algorithms/properties/SymmetricPropertyAxiomLearner.java 2011-08-04 08:40:05 UTC (rev 2986) +++ trunk/components-core/src/main/java/org/dllearner/algorithms/properties/SymmetricPropertyAxiomLearner.java 2011-08-04 10:04:56 UTC (rev 2987) @@ -5,7 +5,7 @@ import java.util.List; import org.dllearner.core.AxiomLearningAlgorithm; -import org.dllearner.core.Component; +import org.dllearner.core.AbstractComponent; import org.dllearner.core.ComponentInitException; import org.dllearner.core.EvaluatedAxiom; import org.dllearner.core.config.ConfigOption; @@ -26,7 +26,7 @@ import com.hp.hpl.jena.sparql.engine.http.QueryEngineHTTP; import com.hp.hpl.jena.vocabulary.OWL2; -public class SymmetricPropertyAxiomLearner extends Component implements AxiomLearningAlgorithm { +public class SymmetricPropertyAxiomLearner extends AbstractComponent implements AxiomLearningAlgorithm { private static final Logger logger = LoggerFactory.getLogger(SymmetricPropertyAxiomLearner.class); Modified: trunk/components-core/src/main/java/org/dllearner/algorithms/properties/TransitivePropertyAxiomLearner.java =================================================================== --- trunk/components-core/src/main/java/org/dllearner/algorithms/properties/TransitivePropertyAxiomLearner.java 2011-08-04 08:40:05 UTC (rev 2986) +++ trunk/components-core/src/main/java/org/dllearner/algorithms/properties/TransitivePropertyAxiomLearner.java 2011-08-04 10:04:56 UTC (rev 2987) @@ -5,7 +5,7 @@ import java.util.List; import org.dllearner.core.AxiomLearningAlgorithm; -import org.dllearner.core.Component; +import org.dllearner.core.AbstractComponent; import org.dllearner.core.ComponentInitException; import org.dllearner.core.EvaluatedAxiom; import org.dllearner.core.config.ConfigOption; @@ -27,7 +27,7 @@ import com.hp.hpl.jena.sparql.engine.http.QueryEngineHTTP; import com.hp.hpl.jena.vocabulary.OWL; -public class TransitivePropertyAxiomLearner extends Component implements AxiomLearningAlgorithm { +public class TransitivePropertyAxiomLearner extends AbstractComponent implements AxiomLearningAlgorithm { private static final Logger logger = LoggerFactory.getLogger(TransitivePropertyAxiomLearner.class); Modified: trunk/components-core/src/main/java/org/dllearner/algorithms/refinement/ROLearner.java =================================================================== --- trunk/components-core/src/main/java/org/dllearner/algorithms/refinement/ROLearner.java 2011-08-04 08:40:05 UTC (rev 2986) +++ trunk/components-core/src/main/java/org/dllearner/algorithms/refinement/ROLearner.java 2011-08-04 10:04:56 UTC (rev 2987) @@ -15,8 +15,8 @@ import org.apache.log4j.Level; import org.apache.log4j.Logger; import org.dllearner.core.AbstractCELA; -import org.dllearner.core.LearningProblem; -import org.dllearner.core.ReasonerComponent; +import org.dllearner.core.AbstractLearningProblem; +import org.dllearner.core.AbstractReasonerComponent; import org.dllearner.core.configurators.ROLearnerConfigurator; import org.dllearner.core.options.BooleanConfigOption; import org.dllearner.core.options.CommonConfigMappings; @@ -191,7 +191,7 @@ // prefixes private String baseURI; - public ROLearner(PosNegLP learningProblem, ReasonerComponent reasoningService) { + public ROLearner(PosNegLP learningProblem, AbstractReasonerComponent reasoningService) { super(learningProblem, reasoningService); this.learningProblem = learningProblem; this.configurator = new ROLearnerConfigurator(this); @@ -199,8 +199,8 @@ } - public static Collection<Class<? extends LearningProblem>> supportedLearningProblems() { - Collection<Class<? extends LearningProblem>> problems = new LinkedList<Class<? extends LearningProblem>>(); + public static Collection<Class<? extends AbstractLearningProblem>> supportedLearningProblems() { + Collection<Class<? extends AbstractLearningProblem>> problems = new LinkedList<Class<? extends AbstractLearningProblem>>(); problems.add(PosNegLP.class); return problems; } Modified: trunk/components-core/src/main/java/org/dllearner/core/AbstractCELA.java =================================================================== --- trunk/components-core/src/main/java/org/dllearner/core/AbstractCELA.java 2011-08-04 08:40:05 UTC (rev 2986) +++ trunk/components-core/src/main/java/org/dllearner/core/AbstractCELA.java 2011-08-04 10:04:56 UTC (rev 2987) @@ -46,19 +46,19 @@ * @author Jens Lehmann * */ -public abstract class AbstractCELA extends Component implements ClassExpressionLearningAlgorithm, StoppableLearningAlgorithm { +public abstract class AbstractCELA extends AbstractComponent implements ClassExpressionLearningAlgorithm, StoppableLearningAlgorithm { /** * The learning problem variable, which must be used by * all learning algorithm implementations. */ - protected LearningProblem learningProblem; + protected AbstractLearningProblem learningProblem; /** * The reasoning service variable, which must be used by * all learning algorithm implementations. */ - protected ReasonerComponent reasoner; + protected AbstractReasonerComponent reasoner; /** * Each learning algorithm gets a learning problem and @@ -67,7 +67,7 @@ * @param reasoningService The reasoner connecting to the * underlying knowledge base. */ - public AbstractCELA(LearningProblem learningProblem, ReasonerCompon... [truncated message content] |
From: <jen...@us...> - 2011-08-04 11:14:54
|
Revision: 2989 http://dl-learner.svn.sourceforge.net/dl-learner/?rev=2989&view=rev Author: jenslehmann Date: 2011-08-04 11:14:48 +0000 (Thu, 04 Aug 2011) Log Message: ----------- several smaller changes Modified Paths: -------------- trunk/components-core/src/main/java/org/dllearner/core/ComponentManager.java trunk/components-core/src/main/java/org/dllearner/core/config/ConfigHelper.java trunk/scripts/src/main/java/org/dllearner/scripts/evaluation/EnrichmentEvaluation.java Modified: trunk/components-core/src/main/java/org/dllearner/core/ComponentManager.java =================================================================== --- trunk/components-core/src/main/java/org/dllearner/core/ComponentManager.java 2011-08-04 10:52:59 UTC (rev 2988) +++ trunk/components-core/src/main/java/org/dllearner/core/ComponentManager.java 2011-08-04 11:14:48 UTC (rev 2989) @@ -486,7 +486,7 @@ return la; } - public <T extends LearningAlgorithm> T learningAlgorithm(Class<T> laClass, AbstractKnowledgeSource ks) throws LearningProblemUnsupportedException { + public <T extends LearningAlgorithm> T learningAlgorithm(Class<T> laClass, AbstractKnowledgeSource ks) { T la = invokeConstructor(laClass, new Class[] { AbstractKnowledgeSource.class }, new Object[] { ks }); return la; } @@ -742,7 +742,7 @@ * @param component * @return Name of the component. */ - public static String getName(AbstractComponent component){ + public static String getName(Component component){ ComponentAnn ann = component.getClass().getAnnotation(ComponentAnn.class); return ann.name(); } Modified: trunk/components-core/src/main/java/org/dllearner/core/config/ConfigHelper.java =================================================================== --- trunk/components-core/src/main/java/org/dllearner/core/config/ConfigHelper.java 2011-08-04 10:52:59 UTC (rev 2988) +++ trunk/components-core/src/main/java/org/dllearner/core/config/ConfigHelper.java 2011-08-04 11:14:48 UTC (rev 2989) @@ -10,7 +10,7 @@ import java.util.Map; import org.dllearner.algorithms.properties.PropertyDomainAxiomLearner; -import org.dllearner.core.AbstractComponent; +import org.dllearner.core.Component; public class ConfigHelper { @@ -33,7 +33,7 @@ * @param configName the name of the config option * @param configValue the value of the config option */ - public static void configure(AbstractComponent component, String configName, String configValue){ + public static void configure(Component component, String configName, String configValue){ Field[] fields = component.getClass().getDeclaredFields(); for(Field f : fields){ ConfigOption option = f.getAnnotation(ConfigOption.class); @@ -68,7 +68,7 @@ * @param component * @return */ - public static List<ConfigOption> getConfigOptions(AbstractComponent component){ + public static List<ConfigOption> getConfigOptions(Component component){ List<ConfigOption> options = new ArrayList<ConfigOption>(); Field[] fields = component.getClass().getDeclaredFields(); Modified: trunk/scripts/src/main/java/org/dllearner/scripts/evaluation/EnrichmentEvaluation.java =================================================================== --- trunk/scripts/src/main/java/org/dllearner/scripts/evaluation/EnrichmentEvaluation.java 2011-08-04 10:52:59 UTC (rev 2988) +++ trunk/scripts/src/main/java/org/dllearner/scripts/evaluation/EnrichmentEvaluation.java 2011-08-04 11:14:48 UTC (rev 2989) @@ -26,6 +26,7 @@ import org.apache.log4j.Logger; import org.dllearner.algorithms.properties.SubPropertyOfAxiomLearner; +import org.dllearner.core.AxiomLearningAlgorithm; import org.dllearner.core.ComponentManager; import org.dllearner.core.EvaluatedAxiom; import org.dllearner.core.LearningAlgorithm; @@ -59,12 +60,12 @@ private int maxObjectProperties = 3; private int maxDataProperties = 3; private int maxClasses = 3; - private List<Class<? extends LearningAlgorithm>> algorithmsToTest; + private List<Class<? extends AxiomLearningAlgorithm>> objectPropertyAlgorithms; public EnrichmentEvaluation() { - algorithmsToTest = new LinkedList<Class<? extends LearningAlgorithm>>(); - algorithmsToTest.add(SubPropertyOfAxiomLearner.class); + objectPropertyAlgorithms = new LinkedList<Class<? extends AxiomLearningAlgorithm>>(); + objectPropertyAlgorithms.add(SubPropertyOfAxiomLearner.class); } @@ -79,13 +80,13 @@ SparqlEndpointKS ks = new SparqlEndpointKS(se); - /* - for(Class<? extends LearningAlgorithm> algorithmClass : algorithmsToTest) { + for(Class<? extends AxiomLearningAlgorithm> algorithmClass : objectPropertyAlgorithms) { int objectProperties = 0; for(ObjectProperty property : properties) { // SubPropertyOfAxiomLearner learner = new SubPropertyOfAxiomLearner(ks); - LearningAlgorithm learner = cm.learningAlgorithm(algorithmClass, ks); - ConfigHelper.configure(learner, "propertyToDescribe", property); + AxiomLearningAlgorithm learner = cm.learningAlgorithm(algorithmClass, ks); + ConfigHelper.configure(learner, "propertyToDescribe", property.toString()); +// ConfigHelper.configure(learner, "maxExecutionTimeInSeconds", maxExecutionTimeInSeconds); // learner.setPropertyToDescribe(property); @@ -102,7 +103,7 @@ break; } } - } */ + } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jen...@us...> - 2011-08-04 11:50:26
|
Revision: 2990 http://dl-learner.svn.sourceforge.net/dl-learner/?rev=2990&view=rev Author: jenslehmann Date: 2011-08-04 11:50:20 +0000 (Thu, 04 Aug 2011) Log Message: ----------- generalised config helper; excluded pdb2rdf->slf4j dependency Modified Paths: -------------- trunk/components-core/src/main/java/org/dllearner/core/config/ConfigHelper.java trunk/scripts/pom.xml trunk/scripts/src/main/java/org/dllearner/scripts/evaluation/EnrichmentEvaluation.java Modified: trunk/components-core/src/main/java/org/dllearner/core/config/ConfigHelper.java =================================================================== --- trunk/components-core/src/main/java/org/dllearner/core/config/ConfigHelper.java 2011-08-04 11:14:48 UTC (rev 2989) +++ trunk/components-core/src/main/java/org/dllearner/core/config/ConfigHelper.java 2011-08-04 11:50:20 UTC (rev 2990) @@ -33,7 +33,7 @@ * @param configName the name of the config option * @param configValue the value of the config option */ - public static void configure(Component component, String configName, String configValue){ + public static <T> void configure(Component component, String configName, T configValue){ Field[] fields = component.getClass().getDeclaredFields(); for(Field f : fields){ ConfigOption option = f.getAnnotation(ConfigOption.class); @@ -41,7 +41,7 @@ if(option.name().equals(configName)){ try { PropertyEditor editor = (PropertyEditor) option.propertyEditorClass().newInstance(); - editor.setAsText(configValue); + editor.setAsText(configValue.toString()); Method method = component.getClass().getMethod("set" + Character.toUpperCase(f.getName().charAt(0)) + f.getName().substring(1), getClassForObject(editor.getValue())); method.invoke(component, editor.getValue()); } catch (IllegalArgumentException e) { Modified: trunk/scripts/pom.xml =================================================================== --- trunk/scripts/pom.xml 2011-08-04 11:14:48 UTC (rev 2989) +++ trunk/scripts/pom.xml 2011-08-04 11:50:20 UTC (rev 2990) @@ -40,6 +40,12 @@ <dependency> <groupId>com.dumontierlab</groupId> <artifactId>pdb2rdf-parser</artifactId> + <exclusions> + <exclusion> + <artifactId>slf4j-log4j12</artifactId> + <groupId>org.slf4j</groupId> + </exclusion> + </exclusions> </dependency> <dependency> <groupId>com.dumontierlab</groupId> Modified: trunk/scripts/src/main/java/org/dllearner/scripts/evaluation/EnrichmentEvaluation.java =================================================================== --- trunk/scripts/src/main/java/org/dllearner/scripts/evaluation/EnrichmentEvaluation.java 2011-08-04 11:14:48 UTC (rev 2989) +++ trunk/scripts/src/main/java/org/dllearner/scripts/evaluation/EnrichmentEvaluation.java 2011-08-04 11:50:20 UTC (rev 2990) @@ -86,7 +86,7 @@ // SubPropertyOfAxiomLearner learner = new SubPropertyOfAxiomLearner(ks); AxiomLearningAlgorithm learner = cm.learningAlgorithm(algorithmClass, ks); ConfigHelper.configure(learner, "propertyToDescribe", property.toString()); -// ConfigHelper.configure(learner, "maxExecutionTimeInSeconds", maxExecutionTimeInSeconds); + ConfigHelper.configure(learner, "maxExecutionTimeInSeconds", maxExecutionTimeInSeconds); // learner.setPropertyToDescribe(property); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jen...@us...> - 2011-08-04 12:21:52
|
Revision: 2993 http://dl-learner.svn.sourceforge.net/dl-learner/?rev=2993&view=rev Author: jenslehmann Date: 2011-08-04 12:21:46 +0000 (Thu, 04 Aug 2011) Log Message: ----------- fixed enrichment script Modified Paths: -------------- trunk/components-core/src/main/java/org/dllearner/core/ComponentManager.java trunk/scripts/src/main/java/org/dllearner/scripts/evaluation/EnrichmentEvaluation.java Modified: trunk/components-core/src/main/java/org/dllearner/core/ComponentManager.java =================================================================== --- trunk/components-core/src/main/java/org/dllearner/core/ComponentManager.java 2011-08-04 12:01:55 UTC (rev 2992) +++ trunk/components-core/src/main/java/org/dllearner/core/ComponentManager.java 2011-08-04 12:21:46 UTC (rev 2993) @@ -485,11 +485,11 @@ pool.registerComponent(la); return la; } - - public <T extends LearningAlgorithm> T learningAlgorithm(Class<T> laClass, AbstractKnowledgeSource ks) { - T la = invokeConstructor(laClass, new Class[] { AbstractKnowledgeSource.class }, new Object[] { ks }); - return la; - } +// +// public <T extends LearningAlgorithm> T learningAlgorithm(Class<T> laClass, KnowledgeSource ks) { +// T la = invokeConstructor(laClass, new Class[] { KnowledgeSource.class }, new Object[] { ks }); +// return la; +// } /** * The <code>ComponentManager</code> factory methods produce component Modified: trunk/scripts/src/main/java/org/dllearner/scripts/evaluation/EnrichmentEvaluation.java =================================================================== --- trunk/scripts/src/main/java/org/dllearner/scripts/evaluation/EnrichmentEvaluation.java 2011-08-04 12:01:55 UTC (rev 2992) +++ trunk/scripts/src/main/java/org/dllearner/scripts/evaluation/EnrichmentEvaluation.java 2011-08-04 12:21:46 UTC (rev 2993) @@ -19,6 +19,7 @@ */ package org.dllearner.scripts.evaluation; +import java.lang.reflect.InvocationTargetException; import java.util.LinkedList; import java.util.List; import java.util.Set; @@ -69,7 +70,7 @@ } - public void start() { + public void start() throws IllegalArgumentException, SecurityException, InstantiationException, IllegalAccessException, InvocationTargetException, NoSuchMethodException { ComponentManager cm = ComponentManager.getInstance(); @@ -83,12 +84,11 @@ for(Class<? extends AxiomLearningAlgorithm> algorithmClass : objectPropertyAlgorithms) { int objectProperties = 0; for(ObjectProperty property : properties) { -// SubPropertyOfAxiomLearner learner = new SubPropertyOfAxiomLearner(ks); - AxiomLearningAlgorithm learner = cm.learningAlgorithm(algorithmClass, ks); + + // dynamically invoke constructor with SPARQL knowledge source + AxiomLearningAlgorithm learner = algorithmClass.getConstructor(SparqlEndpointKS.class).newInstance(ks); ConfigHelper.configure(learner, "propertyToDescribe", property.toString()); - ConfigHelper.configure(learner, "maxExecutionTimeInSeconds", maxExecutionTimeInSeconds); - - + ConfigHelper.configure(learner, "maxExecutionTimeInSeconds", maxExecutionTimeInSeconds); // learner.setPropertyToDescribe(property); // learner.setMaxExecutionTimeInSeconds(10); System.out.println("Applying " + ComponentManager.getName(learner) + " on " + property + " ... "); @@ -133,7 +133,7 @@ } - public static void main(String[] args) { + public static void main(String[] args) throws IllegalArgumentException, SecurityException, InstantiationException, IllegalAccessException, InvocationTargetException, NoSuchMethodException { EnrichmentEvaluation ee = new EnrichmentEvaluation(); ee.start(); ee.printResultsPlain(); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jen...@us...> - 2011-08-04 14:15:52
|
Revision: 2996 http://dl-learner.svn.sourceforge.net/dl-learner/?rev=2996&view=rev Author: jenslehmann Date: 2011-08-04 14:15:46 +0000 (Thu, 04 Aug 2011) Log Message: ----------- ctd. evaluation script, including database connection Modified Paths: -------------- trunk/components-core/src/main/java/org/dllearner/algorithms/properties/DisjointPropertyAxiomLearner.java trunk/components-core/src/main/java/org/dllearner/algorithms/properties/EquivalentPropertyAxiomLearner.java trunk/components-core/src/main/java/org/dllearner/algorithms/properties/FunctionalPropertyAxiomLearner.java trunk/components-core/src/main/java/org/dllearner/algorithms/properties/PropertyDomainAxiomLearner.java trunk/components-core/src/main/java/org/dllearner/algorithms/properties/PropertyRangeAxiomLearner.java trunk/components-core/src/main/java/org/dllearner/algorithms/properties/ReflexivePropertyAxiomLearner.java trunk/components-core/src/main/java/org/dllearner/algorithms/properties/SymmetricPropertyAxiomLearner.java trunk/components-core/src/main/java/org/dllearner/algorithms/properties/TransitivePropertyAxiomLearner.java trunk/scripts/pom.xml trunk/scripts/src/main/java/org/dllearner/scripts/evaluation/EnrichmentEvaluation.java Added Paths: ----------- trunk/scripts/db_settings.ini.dist Property Changed: ---------------- trunk/scripts/ Modified: trunk/components-core/src/main/java/org/dllearner/algorithms/properties/DisjointPropertyAxiomLearner.java =================================================================== --- trunk/components-core/src/main/java/org/dllearner/algorithms/properties/DisjointPropertyAxiomLearner.java 2011-08-04 14:12:59 UTC (rev 2995) +++ trunk/components-core/src/main/java/org/dllearner/algorithms/properties/DisjointPropertyAxiomLearner.java 2011-08-04 14:15:46 UTC (rev 2996) @@ -4,12 +4,14 @@ import org.dllearner.core.AxiomLearningAlgorithm; import org.dllearner.core.AbstractComponent; +import org.dllearner.core.ComponentAnn; import org.dllearner.core.ComponentInitException; import org.dllearner.core.EvaluatedAxiom; import org.dllearner.core.configurators.Configurator; import org.dllearner.core.owl.Axiom; import org.dllearner.kb.SparqlEndpointKS; +@ComponentAnn(name="disjoint property axiom learner") public class DisjointPropertyAxiomLearner extends AbstractComponent implements AxiomLearningAlgorithm { private String propertyToDescribe; Modified: trunk/components-core/src/main/java/org/dllearner/algorithms/properties/EquivalentPropertyAxiomLearner.java =================================================================== --- trunk/components-core/src/main/java/org/dllearner/algorithms/properties/EquivalentPropertyAxiomLearner.java 2011-08-04 14:12:59 UTC (rev 2995) +++ trunk/components-core/src/main/java/org/dllearner/algorithms/properties/EquivalentPropertyAxiomLearner.java 2011-08-04 14:15:46 UTC (rev 2996) @@ -4,12 +4,14 @@ import org.dllearner.core.AxiomLearningAlgorithm; import org.dllearner.core.AbstractComponent; +import org.dllearner.core.ComponentAnn; import org.dllearner.core.ComponentInitException; import org.dllearner.core.EvaluatedAxiom; import org.dllearner.core.configurators.Configurator; import org.dllearner.core.owl.Axiom; import org.dllearner.kb.SparqlEndpointKS; +@ComponentAnn(name="equivalent property axiom learner") public class EquivalentPropertyAxiomLearner extends AbstractComponent implements AxiomLearningAlgorithm { private String propertyToDescribe; Modified: trunk/components-core/src/main/java/org/dllearner/algorithms/properties/FunctionalPropertyAxiomLearner.java =================================================================== --- trunk/components-core/src/main/java/org/dllearner/algorithms/properties/FunctionalPropertyAxiomLearner.java 2011-08-04 14:12:59 UTC (rev 2995) +++ trunk/components-core/src/main/java/org/dllearner/algorithms/properties/FunctionalPropertyAxiomLearner.java 2011-08-04 14:15:46 UTC (rev 2996) @@ -6,6 +6,7 @@ import org.dllearner.core.AxiomLearningAlgorithm; import org.dllearner.core.AbstractComponent; +import org.dllearner.core.ComponentAnn; import org.dllearner.core.ComponentInitException; import org.dllearner.core.EvaluatedAxiom; import org.dllearner.core.config.ConfigOption; @@ -26,6 +27,7 @@ import com.hp.hpl.jena.sparql.engine.http.QueryEngineHTTP; import com.hp.hpl.jena.vocabulary.OWL; +@ComponentAnn(name="functional property axiom learner") public class FunctionalPropertyAxiomLearner extends AbstractComponent implements AxiomLearningAlgorithm { private static final Logger logger = LoggerFactory.getLogger(FunctionalPropertyAxiomLearner.class); Modified: trunk/components-core/src/main/java/org/dllearner/algorithms/properties/PropertyDomainAxiomLearner.java =================================================================== --- trunk/components-core/src/main/java/org/dllearner/algorithms/properties/PropertyDomainAxiomLearner.java 2011-08-04 14:12:59 UTC (rev 2995) +++ trunk/components-core/src/main/java/org/dllearner/algorithms/properties/PropertyDomainAxiomLearner.java 2011-08-04 14:15:46 UTC (rev 2996) @@ -16,6 +16,7 @@ import org.dllearner.core.AxiomLearningAlgorithm; import org.dllearner.core.AbstractComponent; +import org.dllearner.core.ComponentAnn; import org.dllearner.core.ComponentInitException; import org.dllearner.core.EvaluatedAxiom; import org.dllearner.core.config.ConfigOption; @@ -39,6 +40,7 @@ import com.hp.hpl.jena.query.ResultSet; import com.hp.hpl.jena.sparql.engine.http.QueryEngineHTTP; +@ComponentAnn(name="property domain axiom learner") public class PropertyDomainAxiomLearner extends AbstractComponent implements AxiomLearningAlgorithm { private static final Logger logger = LoggerFactory.getLogger(PropertyDomainAxiomLearner.class); Modified: trunk/components-core/src/main/java/org/dllearner/algorithms/properties/PropertyRangeAxiomLearner.java =================================================================== --- trunk/components-core/src/main/java/org/dllearner/algorithms/properties/PropertyRangeAxiomLearner.java 2011-08-04 14:12:59 UTC (rev 2995) +++ trunk/components-core/src/main/java/org/dllearner/algorithms/properties/PropertyRangeAxiomLearner.java 2011-08-04 14:15:46 UTC (rev 2996) @@ -14,6 +14,7 @@ import org.dllearner.core.AxiomLearningAlgorithm; import org.dllearner.core.AbstractComponent; +import org.dllearner.core.ComponentAnn; import org.dllearner.core.ComponentInitException; import org.dllearner.core.EvaluatedAxiom; import org.dllearner.core.config.ConfigOption; @@ -36,6 +37,7 @@ import com.hp.hpl.jena.query.ResultSet; import com.hp.hpl.jena.sparql.engine.http.QueryEngineHTTP; +@ComponentAnn(name="property range learner") public class PropertyRangeAxiomLearner extends AbstractComponent implements AxiomLearningAlgorithm { private static final Logger logger = LoggerFactory.getLogger(PropertyRangeAxiomLearner.class); Modified: trunk/components-core/src/main/java/org/dllearner/algorithms/properties/ReflexivePropertyAxiomLearner.java =================================================================== --- trunk/components-core/src/main/java/org/dllearner/algorithms/properties/ReflexivePropertyAxiomLearner.java 2011-08-04 14:12:59 UTC (rev 2995) +++ trunk/components-core/src/main/java/org/dllearner/algorithms/properties/ReflexivePropertyAxiomLearner.java 2011-08-04 14:15:46 UTC (rev 2996) @@ -6,6 +6,7 @@ import org.dllearner.core.AxiomLearningAlgorithm; import org.dllearner.core.AbstractComponent; +import org.dllearner.core.ComponentAnn; import org.dllearner.core.ComponentInitException; import org.dllearner.core.EvaluatedAxiom; import org.dllearner.core.config.ConfigOption; @@ -26,6 +27,7 @@ import com.hp.hpl.jena.sparql.engine.http.QueryEngineHTTP; import com.hp.hpl.jena.vocabulary.OWL2; +@ComponentAnn(name="reflexive property learner") public class ReflexivePropertyAxiomLearner extends AbstractComponent implements AxiomLearningAlgorithm { private static final Logger logger = LoggerFactory.getLogger(ReflexivePropertyAxiomLearner.class); Modified: trunk/components-core/src/main/java/org/dllearner/algorithms/properties/SymmetricPropertyAxiomLearner.java =================================================================== --- trunk/components-core/src/main/java/org/dllearner/algorithms/properties/SymmetricPropertyAxiomLearner.java 2011-08-04 14:12:59 UTC (rev 2995) +++ trunk/components-core/src/main/java/org/dllearner/algorithms/properties/SymmetricPropertyAxiomLearner.java 2011-08-04 14:15:46 UTC (rev 2996) @@ -6,6 +6,7 @@ import org.dllearner.core.AxiomLearningAlgorithm; import org.dllearner.core.AbstractComponent; +import org.dllearner.core.ComponentAnn; import org.dllearner.core.ComponentInitException; import org.dllearner.core.EvaluatedAxiom; import org.dllearner.core.config.ConfigOption; @@ -26,6 +27,7 @@ import com.hp.hpl.jena.sparql.engine.http.QueryEngineHTTP; import com.hp.hpl.jena.vocabulary.OWL2; +@ComponentAnn(name="symmetric property learner") public class SymmetricPropertyAxiomLearner extends AbstractComponent implements AxiomLearningAlgorithm { private static final Logger logger = LoggerFactory.getLogger(SymmetricPropertyAxiomLearner.class); Modified: trunk/components-core/src/main/java/org/dllearner/algorithms/properties/TransitivePropertyAxiomLearner.java =================================================================== --- trunk/components-core/src/main/java/org/dllearner/algorithms/properties/TransitivePropertyAxiomLearner.java 2011-08-04 14:12:59 UTC (rev 2995) +++ trunk/components-core/src/main/java/org/dllearner/algorithms/properties/TransitivePropertyAxiomLearner.java 2011-08-04 14:15:46 UTC (rev 2996) @@ -6,6 +6,7 @@ import org.dllearner.core.AxiomLearningAlgorithm; import org.dllearner.core.AbstractComponent; +import org.dllearner.core.ComponentAnn; import org.dllearner.core.ComponentInitException; import org.dllearner.core.EvaluatedAxiom; import org.dllearner.core.config.ConfigOption; @@ -27,6 +28,7 @@ import com.hp.hpl.jena.sparql.engine.http.QueryEngineHTTP; import com.hp.hpl.jena.vocabulary.OWL; +@ComponentAnn(name="transitive property learner") public class TransitivePropertyAxiomLearner extends AbstractComponent implements AxiomLearningAlgorithm { private static final Logger logger = LoggerFactory.getLogger(TransitivePropertyAxiomLearner.class); Property changes on: trunk/scripts ___________________________________________________________________ Modified: svn:ignore - target log scripts.iml .classpath .project .settings + target log scripts.iml .classpath .project .settings db_settings.ini Added: trunk/scripts/db_settings.ini.dist =================================================================== --- trunk/scripts/db_settings.ini.dist (rev 0) +++ trunk/scripts/db_settings.ini.dist 2011-08-04 14:15:46 UTC (rev 2996) @@ -0,0 +1,9 @@ +[database] +; the server, where the mysql database is located +server = localhost +; the user, that has rights to access the navigator database +user = username +; the password of that user +pass = password +; the name of the used database +name = database_name \ No newline at end of file Modified: trunk/scripts/pom.xml =================================================================== --- trunk/scripts/pom.xml 2011-08-04 14:12:59 UTC (rev 2995) +++ trunk/scripts/pom.xml 2011-08-04 14:15:46 UTC (rev 2996) @@ -55,5 +55,9 @@ <groupId>org.aksw.commons</groupId> <artifactId>sparql</artifactId> </dependency> + <dependency> + <groupId>mysql</groupId> + <artifactId>mysql-connector-java</artifactId> + </dependency> </dependencies> </project> Modified: trunk/scripts/src/main/java/org/dllearner/scripts/evaluation/EnrichmentEvaluation.java =================================================================== --- trunk/scripts/src/main/java/org/dllearner/scripts/evaluation/EnrichmentEvaluation.java 2011-08-04 14:12:59 UTC (rev 2995) +++ trunk/scripts/src/main/java/org/dllearner/scripts/evaluation/EnrichmentEvaluation.java 2011-08-04 14:15:46 UTC (rev 2996) @@ -19,15 +19,31 @@ */ package org.dllearner.scripts.evaluation; +import java.io.FileNotFoundException; +import java.io.FileReader; +import java.io.IOException; import java.lang.reflect.InvocationTargetException; +import java.sql.Connection; +import java.sql.DriverManager; +import java.sql.PreparedStatement; +import java.sql.SQLException; import java.util.LinkedList; import java.util.List; import java.util.Set; import java.util.TreeSet; +import java.util.prefs.Preferences; import org.apache.log4j.Logger; +import org.dllearner.algorithms.properties.DisjointPropertyAxiomLearner; +import org.dllearner.algorithms.properties.EquivalentPropertyAxiomLearner; +import org.dllearner.algorithms.properties.FunctionalPropertyAxiomLearner; +import org.dllearner.algorithms.properties.PropertyDomainAxiomLearner; +import org.dllearner.algorithms.properties.PropertyRangeAxiomLearner; import org.dllearner.algorithms.properties.SubPropertyOfAxiomLearner; +import org.dllearner.algorithms.properties.SymmetricPropertyAxiomLearner; +import org.dllearner.algorithms.properties.TransitivePropertyAxiomLearner; import org.dllearner.core.AxiomLearningAlgorithm; +import org.dllearner.core.ComponentInitException; import org.dllearner.core.ComponentManager; import org.dllearner.core.EvaluatedAxiom; import org.dllearner.core.LearningAlgorithm; @@ -36,6 +52,8 @@ import org.dllearner.kb.SparqlEndpointKS; import org.dllearner.kb.sparql.SparqlEndpoint; import org.dllearner.kb.sparql.SparqlQuery; +import org.ini4j.IniPreferences; +import org.ini4j.InvalidFileFormatException; import com.hp.hpl.jena.query.QuerySolution; import com.hp.hpl.jena.query.ResultSet; @@ -62,16 +80,79 @@ private int maxDataProperties = 3; private int maxClasses = 3; private List<Class<? extends AxiomLearningAlgorithm>> objectPropertyAlgorithms; + private List<Class<? extends AxiomLearningAlgorithm>> dataPropertyAlgorithms; + private PreparedStatement ps; public EnrichmentEvaluation() { + initDBConnection(); + objectPropertyAlgorithms = new LinkedList<Class<? extends AxiomLearningAlgorithm>>(); +// objectPropertyAlgorithms.add(DisjointPropertyAxiomLearner.class); +// objectPropertyAlgorithms.add(EquivalentPropertyAxiomLearner.class); + objectPropertyAlgorithms.add(FunctionalPropertyAxiomLearner.class); + objectPropertyAlgorithms.add(PropertyDomainAxiomLearner.class); + objectPropertyAlgorithms.add(PropertyRangeAxiomLearner.class); objectPropertyAlgorithms.add(SubPropertyOfAxiomLearner.class); + objectPropertyAlgorithms.add(SymmetricPropertyAxiomLearner.class); + objectPropertyAlgorithms.add(TransitivePropertyAxiomLearner.class); + dataPropertyAlgorithms = new LinkedList<Class<? extends AxiomLearningAlgorithm>>(); +// dataPropertyAlgorithms.add(DisjointPropertyAxiomLearner.class); +// dataPropertyAlgorithms.add(EquivalentPropertyAxiomLearner.class); + dataPropertyAlgorithms.add(FunctionalPropertyAxiomLearner.class); + dataPropertyAlgorithms.add(PropertyDomainAxiomLearner.class); + dataPropertyAlgorithms.add(PropertyRangeAxiomLearner.class); // ? + dataPropertyAlgorithms.add(SubPropertyOfAxiomLearner.class); } - public void start() throws IllegalArgumentException, SecurityException, InstantiationException, IllegalAccessException, InvocationTargetException, NoSuchMethodException { + private void initDBConnection(){ + try { + String iniFile = "db_settings.ini"; + Preferences prefs = new IniPreferences(new FileReader(iniFile)); + String dbServer = prefs.node("database").get("server", null); + String dbName = "enrichment"; + String dbUser = prefs.node("database").get("user", null); + String dbPass = prefs.node("database").get("pass", null); + + Class.forName("com.mysql.jdbc.Driver"); + String url = + "jdbc:mysql://"+dbServer+"/"+dbName; + Connection conn = DriverManager.getConnection(url, dbUser, dbPass); + ps = conn.prepareStatement("INSERT INTO evaluation (" + + "entity, algorithm, axiom, score ) " + + "VALUES(?,?,?,?)"); + } catch (ClassNotFoundException e) { + e.printStackTrace(); + } catch (SQLException e) { + e.printStackTrace(); + } catch (InvalidFileFormatException e) { + e.printStackTrace(); + } catch (FileNotFoundException e) { + e.printStackTrace(); + } catch (IOException e) { + e.printStackTrace(); + } + } + + private void writeToDB( + String entity, String algorithm, String axiom, double score){ + try { + ps.setString(1, entity); + ps.setString(2, algorithm); + ps.setString(3, axiom); + ps.setDouble(4, score); + + ps.executeUpdate(); + } catch (SQLException e) { + logger.error("Error while writing to DB.",e); + e.printStackTrace(); + } + } + + public void start() throws IllegalArgumentException, SecurityException, InstantiationException, IllegalAccessException, InvocationTargetException, NoSuchMethodException, ComponentInitException { + ComponentManager cm = ComponentManager.getInstance(); // create DBpedia Live knowledge source @@ -80,6 +161,7 @@ Set<ObjectProperty> properties = getAllObjectProperties(se); SparqlEndpointKS ks = new SparqlEndpointKS(se); + ks.init(); for(Class<? extends AxiomLearningAlgorithm> algorithmClass : objectPropertyAlgorithms) { int objectProperties = 0; @@ -88,15 +170,20 @@ // dynamically invoke constructor with SPARQL knowledge source AxiomLearningAlgorithm learner = algorithmClass.getConstructor(SparqlEndpointKS.class).newInstance(ks); ConfigHelper.configure(learner, "propertyToDescribe", property.toString()); - ConfigHelper.configure(learner, "maxExecutionTimeInSeconds", maxExecutionTimeInSeconds); + ConfigHelper.configure(learner, "maxExecutionTimeInSeconds", maxExecutionTimeInSeconds); + learner.init(); // learner.setPropertyToDescribe(property); // learner.setMaxExecutionTimeInSeconds(10); - System.out.println("Applying " + ComponentManager.getName(learner) + " on " + property + " ... "); + String algName = ComponentManager.getName(learner); + System.out.println("Applying " + algName + " on " + property + " ... "); learner.start(); List<EvaluatedAxiom> learnedAxioms = learner.getCurrentlyBestEvaluatedAxioms(nrOfAxiomsToLearn); - for(EvaluatedAxiom learnedAxiom : learnedAxioms) { - // TODO: put this in some data structure - System.out.println(learnedAxiom); + if(learnedAxioms == null) { + writeToDB(property.toString(), algName, "NULL", 0); + } else { + for(EvaluatedAxiom learnedAxiom : learnedAxioms) { + writeToDB(property.toString(), algName, learnedAxiom.getAxiom().toString(), learnedAxiom.getScore().getAccuracy()); + } } objectProperties++; if(objectProperties > maxObjectProperties) { @@ -133,7 +220,7 @@ } - public static void main(String[] args) throws IllegalArgumentException, SecurityException, InstantiationException, IllegalAccessException, InvocationTargetException, NoSuchMethodException { + public static void main(String[] args) throws IllegalArgumentException, SecurityException, InstantiationException, IllegalAccessException, InvocationTargetException, NoSuchMethodException, ComponentInitException { EnrichmentEvaluation ee = new EnrichmentEvaluation(); ee.start(); ee.printResultsPlain(); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jen...@us...> - 2011-08-09 11:32:15
|
Revision: 3017 http://dl-learner.svn.sourceforge.net/dl-learner/?rev=3017&view=rev Author: jenslehmann Date: 2011-08-09 11:32:08 +0000 (Tue, 09 Aug 2011) Log Message: ----------- converted Datatype from enum to class to allow arbitrary datatypes Modified Paths: -------------- trunk/components-core/src/main/java/org/dllearner/algorithms/properties/DataPropertyRangeAxiomLearner.java trunk/components-core/src/main/java/org/dllearner/core/owl/BooleanValueRestriction.java trunk/components-core/src/main/java/org/dllearner/core/owl/Datatype.java trunk/components-core/src/main/java/org/dllearner/core/owl/StringValueRestriction.java trunk/components-core/src/main/java/org/dllearner/core/owl/TypedConstant.java trunk/components-core/src/main/java/org/dllearner/parser/KBParser.java trunk/components-core/src/main/java/org/dllearner/parser/kb.jj trunk/components-core/src/main/java/org/dllearner/reasoning/OWLAPIReasoner.java trunk/components-core/src/main/java/org/dllearner/reasoning/PelletReasoner.java trunk/components-core/src/main/java/org/dllearner/reasoning/fuzzydll/FuzzyOWLAPIReasoner.java trunk/components-core/src/main/java/org/dllearner/utilities/owl/OWLAPIConverter.java trunk/components-core/src/main/java/org/dllearner/utilities/owl/OWLAPIDescriptionConvertVisitor.java trunk/scripts/src/main/java/org/dllearner/examples/Flags.java trunk/scripts/src/main/java/org/dllearner/examples/MonogenicDiseases.java Added Paths: ----------- trunk/components-core/src/main/java/org/dllearner/core/owl/OWL2Datatype.java Modified: trunk/components-core/src/main/java/org/dllearner/algorithms/properties/DataPropertyRangeAxiomLearner.java =================================================================== --- trunk/components-core/src/main/java/org/dllearner/algorithms/properties/DataPropertyRangeAxiomLearner.java 2011-08-09 09:42:41 UTC (rev 3016) +++ trunk/components-core/src/main/java/org/dllearner/algorithms/properties/DataPropertyRangeAxiomLearner.java 2011-08-09 11:32:08 UTC (rev 3017) @@ -27,6 +27,7 @@ import org.dllearner.core.owl.DatatypeProperty; import org.dllearner.core.owl.DatatypePropertyRangeAxiom; import org.dllearner.core.owl.Individual; +import org.dllearner.core.owl.OWL2Datatype; import org.dllearner.kb.SparqlEndpointKS; import org.dllearner.kb.sparql.ExtendedQueryEngineHTTP; import org.dllearner.learningproblems.AxiomScore; @@ -183,7 +184,7 @@ } else if(value2.getValue() < value1.getValue()){ return -1; } else { - return value1.getKey().compareTo(value2.getKey()); + return value1.getKey().getURI().compareTo(value2.getKey().getURI()); } } }); @@ -213,21 +214,22 @@ } private Datatype getDatatypeForURI(String uri){ - if(uri.equals(Datatype.BOOLEAN.getURI())) - return Datatype.BOOLEAN; - else if(uri.equals(Datatype.DOUBLE.getURI())) - return Datatype.DOUBLE; - else if(uri.equals(Datatype.INT.getURI())) - return Datatype.INT; - else if(uri.equals(Datatype.INTEGER.getURI())) - return Datatype.INTEGER; - else if(uri.equals(Datatype.STRING.getURI())) - return Datatype.STRING; - else if(uri.equals(Datatype.DATE.getURI())) - return Datatype.DATE; - else if(uri.equals(Datatype.DATETIME.getURI())) - return Datatype.DATETIME; - throw new Error("Unsupported datatype " + uri + ". Please inform a DL-Learner developer to add it."); + return new Datatype(uri); +// if(uri.equals(OWL2Datatype.BOOLEAN.getURI())) +// return OWL2Datatype.BOOLEAN.getDatatype(); +// else if(uri.equals(OWL2Datatype.DOUBLE.getURI())) +// return OWL2Datatype.DOUBLE.getDatatype(); +// else if(uri.equals(OWL2Datatype.INT.getURI())) +// return OWL2Datatype.INT.getDatatype(); +// else if(uri.equals(OWL2Datatype.INTEGER.getURI())) +// return OWL2Datatype.INTEGER.getDatatype(); +// else if(uri.equals(OWL2Datatype.STRING.getURI())) +// return OWL2Datatype.STRING.getDatatype(); +// else if(uri.equals(OWL2Datatype.DATE.getURI())) +// return OWL2Datatype.DATE.getDatatype(); +// else if(uri.equals(OWL2Datatype.DATETIME.getURI())) +// return OWL2Datatype.DATETIME.getDatatype(); +// throw new Error("Unsupported datatype " + uri + ". Please inform a DL-Learner developer to add it."); } /* Modified: trunk/components-core/src/main/java/org/dllearner/core/owl/BooleanValueRestriction.java =================================================================== --- trunk/components-core/src/main/java/org/dllearner/core/owl/BooleanValueRestriction.java 2011-08-09 09:42:41 UTC (rev 3016) +++ trunk/components-core/src/main/java/org/dllearner/core/owl/BooleanValueRestriction.java 2011-08-09 11:32:08 UTC (rev 3017) @@ -50,7 +50,7 @@ * @param value */ public BooleanValueRestriction(DatatypeProperty restrictedPropertyExpression, Boolean value) { - super(restrictedPropertyExpression, new TypedConstant(value.toString(), Datatype.BOOLEAN)); + super(restrictedPropertyExpression, new TypedConstant(value.toString(), OWL2Datatype.BOOLEAN.getDatatype())); booleanValue = value; } Modified: trunk/components-core/src/main/java/org/dllearner/core/owl/Datatype.java =================================================================== --- trunk/components-core/src/main/java/org/dllearner/core/owl/Datatype.java 2011-08-09 09:42:41 UTC (rev 3016) +++ trunk/components-core/src/main/java/org/dllearner/core/owl/Datatype.java 2011-08-09 11:32:08 UTC (rev 3017) @@ -1,5 +1,5 @@ /** - * Copyright (C) 2007-2008, Jens Lehmann + * Copyright (C) 2007-2011, Jens Lehmann * * This file is part of DL-Learner. * @@ -26,19 +26,11 @@ * @author Jens Lehmann * */ -public enum Datatype implements DataRange { +public class Datatype implements DataRange { - DOUBLE ("http://www.w3.org/2001/XMLSchema#double"), - INT ("http://www.w3.org/2001/XMLSchema#int"), - INTEGER ("http://www.w3.org/2001/XMLSchema#integer"), - BOOLEAN ("http://www.w3.org/2001/XMLSchema#boolean"), - STRING ("http://www.w3.org/2001/XMLSchema#string"), - DATE ("http://www.w3.org/2001/XMLSchema#date"), - DATETIME ("http://www.w3.org/2001/XMLSchema#dateTime"); - private URI uri; - private Datatype(String uriString) { + public Datatype(String uriString) { uri = URI.create(uriString); } Added: trunk/components-core/src/main/java/org/dllearner/core/owl/OWL2Datatype.java =================================================================== --- trunk/components-core/src/main/java/org/dllearner/core/owl/OWL2Datatype.java (rev 0) +++ trunk/components-core/src/main/java/org/dllearner/core/owl/OWL2Datatype.java 2011-08-09 11:32:08 UTC (rev 3017) @@ -0,0 +1,29 @@ +package org.dllearner.core.owl; + +import java.net.URI; + +public enum OWL2Datatype { + + DOUBLE ( "http://www.w3.org/2001/XMLSchema#double"), + INT ("http://www.w3.org/2001/XMLSchema#int"), + INTEGER ("http://www.w3.org/2001/XMLSchema#integer"), + BOOLEAN ("http://www.w3.org/2001/XMLSchema#boolean"), + STRING ("http://www.w3.org/2001/XMLSchema#string"), + DATE ("http://www.w3.org/2001/XMLSchema#date"), + DATETIME ("http://www.w3.org/2001/XMLSchema#dateTime"); + + private Datatype datatype; + + private OWL2Datatype(String str) { + datatype = new Datatype(str); + } + + public Datatype getDatatype() { + return datatype; + } + + public URI getURI() { + return datatype.getURI(); + } + +} Modified: trunk/components-core/src/main/java/org/dllearner/core/owl/StringValueRestriction.java =================================================================== --- trunk/components-core/src/main/java/org/dllearner/core/owl/StringValueRestriction.java 2011-08-09 09:42:41 UTC (rev 3016) +++ trunk/components-core/src/main/java/org/dllearner/core/owl/StringValueRestriction.java 2011-08-09 11:32:08 UTC (rev 3017) @@ -34,7 +34,7 @@ public StringValueRestriction(DatatypeProperty restrictedPropertyExpression, String value) { // TODO: we pass it as typed property, although it could be untyped - super(restrictedPropertyExpression, new TypedConstant(value.toString(), Datatype.STRING)); + super(restrictedPropertyExpression, new TypedConstant(value.toString(), OWL2Datatype.STRING.getDatatype())); stringValue = value.toString(); } Modified: trunk/components-core/src/main/java/org/dllearner/core/owl/TypedConstant.java =================================================================== --- trunk/components-core/src/main/java/org/dllearner/core/owl/TypedConstant.java 2011-08-09 09:42:41 UTC (rev 3016) +++ trunk/components-core/src/main/java/org/dllearner/core/owl/TypedConstant.java 2011-08-09 11:32:08 UTC (rev 3017) @@ -67,13 +67,13 @@ public String toManchesterSyntaxString(String baseURI, Map<String, String> prefixes) { // implemented according to http://www.w3.org/TR/owl2-manchester-syntax/ // (not completely clear because "typedLiteral" and "integerLiteral" definitions there overlap, but hopefully correct) - if(datatype.equals(Datatype.INT) || datatype.equals(Datatype.DOUBLE)) { + if(datatype.equals(OWL2Datatype.INT.getDatatype()) || datatype.equals(OWL2Datatype.DOUBLE.getDatatype())) { if(Double.valueOf(literal) >= 0) { return "+" + literal; } else { return "-" + literal; } - } else if(datatype.equals(Datatype.STRING)) { + } else if(datatype.equals(OWL2Datatype.STRING.getDatatype())) { return "\"" + literal + "\""; } else { return "\"" + literal + "\"^^" + datatype.toManchesterSyntaxString(baseURI, prefixes); Modified: trunk/components-core/src/main/java/org/dllearner/parser/KBParser.java =================================================================== --- trunk/components-core/src/main/java/org/dllearner/parser/KBParser.java 2011-08-09 09:42:41 UTC (rev 3016) +++ trunk/components-core/src/main/java/org/dllearner/parser/KBParser.java 2011-08-09 11:32:08 UTC (rev 3017) @@ -393,15 +393,15 @@ switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case 44: jj_consume_token(44); - range = Datatype.DOUBLE; + range = OWL2Datatype.DOUBLE.getDatatype(); break; case 45: jj_consume_token(45); - range = Datatype.BOOLEAN; + range = OWL2Datatype.BOOLEAN.getDatatype(); break; case 46: jj_consume_token(46); - range = Datatype.INT; + range = OWL2Datatype.INT.getDatatype(); break; default: jj_la1[8] = jj_gen; Modified: trunk/components-core/src/main/java/org/dllearner/parser/kb.jj =================================================================== --- trunk/components-core/src/main/java/org/dllearner/parser/kb.jj 2011-08-09 09:42:41 UTC (rev 3016) +++ trunk/components-core/src/main/java/org/dllearner/parser/kb.jj 2011-08-09 11:32:08 UTC (rev 3017) @@ -240,9 +240,9 @@ DatatypePropertyRangeAxiom DatatypePropertyRangeAxiom() : {DatatypeProperty op; DataRange range; } { ( "DPRANGE" | "DATATYPEPROPERTYRANGE") "(" op=DatatypeProperty() ")" "=" - ( "DOUBLE" { range = Datatype.DOUBLE; } - | "BOOLEAN" { range = Datatype.BOOLEAN; } - | "INTEGER" { range = Datatype.INT; } ) + ( "DOUBLE" { range = OWL2Datatype.DOUBLE.getDatatype(); } + | "BOOLEAN" { range = OWL2Datatype.BOOLEAN.getDatatype(); } + | "INTEGER" { range = OWL2Datatype.INT.getDatatype(); } ) <COMMAND_END> { return new DatatypePropertyRangeAxiom(op, range); } } Modified: trunk/components-core/src/main/java/org/dllearner/reasoning/OWLAPIReasoner.java =================================================================== --- trunk/components-core/src/main/java/org/dllearner/reasoning/OWLAPIReasoner.java 2011-08-09 09:42:41 UTC (rev 3016) +++ trunk/components-core/src/main/java/org/dllearner/reasoning/OWLAPIReasoner.java 2011-08-09 11:32:08 UTC (rev 3017) @@ -343,10 +343,10 @@ OWLDataRange range = it.next(); if (range.isDatatype()) { URI uri = ((OWLDatatype) range).getIRI().toURI(); - if (uri.equals(Datatype.BOOLEAN.getURI())) booleanDatatypeProperties.add(dtp); - else if (uri.equals(Datatype.DOUBLE.getURI())) doubleDatatypeProperties.add(dtp); - else if (uri.equals(Datatype.INT.getURI())) intDatatypeProperties.add(dtp); - else if (uri.equals(Datatype.STRING.getURI())) stringDatatypeProperties.add(dtp); + if (uri.equals(OWL2Datatype.BOOLEAN.getURI())) booleanDatatypeProperties.add(dtp); + else if (uri.equals(OWL2Datatype.DOUBLE.getURI())) doubleDatatypeProperties.add(dtp); + else if (uri.equals(OWL2Datatype.INT.getURI())) intDatatypeProperties.add(dtp); + else if (uri.equals(OWL2Datatype.STRING.getURI())) stringDatatypeProperties.add(dtp); } } else { stringDatatypeProperties.add(dtp); Modified: trunk/components-core/src/main/java/org/dllearner/reasoning/PelletReasoner.java =================================================================== --- trunk/components-core/src/main/java/org/dllearner/reasoning/PelletReasoner.java 2011-08-09 09:42:41 UTC (rev 3016) +++ trunk/components-core/src/main/java/org/dllearner/reasoning/PelletReasoner.java 2011-08-09 11:32:08 UTC (rev 3017) @@ -45,6 +45,7 @@ import org.dllearner.core.owl.NamedClass; import org.dllearner.core.owl.Negation; import org.dllearner.core.owl.Nothing; +import org.dllearner.core.owl.OWL2Datatype; import org.dllearner.core.owl.ObjectAllRestriction; import org.dllearner.core.owl.ObjectCardinalityRestriction; import org.dllearner.core.owl.ObjectMaxCardinalityRestriction; @@ -245,13 +246,13 @@ OWLDataRange range = it.next(); if(range.isDatatype()) { URI uri = ((OWLDatatype)range).getIRI().toURI(); - if(uri.equals(Datatype.BOOLEAN.getURI())) + if(uri.equals(OWL2Datatype.BOOLEAN.getURI())) booleanDatatypeProperties.add(dtp); - else if(uri.equals(Datatype.DOUBLE.getURI())) + else if(uri.equals(OWL2Datatype.DOUBLE.getURI())) doubleDatatypeProperties.add(dtp); - else if(uri.equals(Datatype.INT.getURI())) + else if(uri.equals(OWL2Datatype.INT.getURI())) intDatatypeProperties.add(dtp); - else if(uri.equals(Datatype.STRING.getURI())) + else if(uri.equals(OWL2Datatype.STRING.getURI())) stringDatatypeProperties.add(dtp); } } Modified: trunk/components-core/src/main/java/org/dllearner/reasoning/fuzzydll/FuzzyOWLAPIReasoner.java =================================================================== --- trunk/components-core/src/main/java/org/dllearner/reasoning/fuzzydll/FuzzyOWLAPIReasoner.java 2011-08-09 09:42:41 UTC (rev 3016) +++ trunk/components-core/src/main/java/org/dllearner/reasoning/fuzzydll/FuzzyOWLAPIReasoner.java 2011-08-09 11:32:08 UTC (rev 3017) @@ -58,6 +58,7 @@ import org.dllearner.core.owl.Description; import org.dllearner.core.owl.Entity; import org.dllearner.core.owl.Individual; +import org.dllearner.core.owl.OWL2Datatype; import org.dllearner.core.owl.fuzzydll.FuzzyIndividual; import org.dllearner.core.owl.KB; import org.dllearner.core.owl.NamedClass; @@ -416,13 +417,13 @@ OWLDataRange range = it.next(); if(range.isDatatype()) { URI uri = ((OWLDatatype)range).getIRI().toURI(); - if(uri.equals(Datatype.BOOLEAN.getURI())) + if(uri.equals(OWL2Datatype.BOOLEAN.getURI())) booleanDatatypeProperties.add(dtp); - else if(uri.equals(Datatype.DOUBLE.getURI())) + else if(uri.equals(OWL2Datatype.DOUBLE.getURI())) doubleDatatypeProperties.add(dtp); - else if(uri.equals(Datatype.INT.getURI())) + else if(uri.equals(OWL2Datatype.INT.getURI())) intDatatypeProperties.add(dtp); - else if(uri.equals(Datatype.STRING.getURI())) + else if(uri.equals(OWL2Datatype.STRING.getURI())) stringDatatypeProperties.add(dtp); } } else { Modified: trunk/components-core/src/main/java/org/dllearner/utilities/owl/OWLAPIConverter.java =================================================================== --- trunk/components-core/src/main/java/org/dllearner/utilities/owl/OWLAPIConverter.java 2011-08-09 09:42:41 UTC (rev 3016) +++ trunk/components-core/src/main/java/org/dllearner/utilities/owl/OWLAPIConverter.java 2011-08-09 11:32:08 UTC (rev 3017) @@ -33,6 +33,7 @@ import org.dllearner.core.owl.Individual; import org.dllearner.core.owl.NamedClass; import org.dllearner.core.owl.Nothing; +import org.dllearner.core.owl.OWL2Datatype; import org.dllearner.core.owl.ObjectProperty; import org.dllearner.core.owl.Thing; import org.dllearner.core.owl.TypedConstant; @@ -177,20 +178,20 @@ public static Datatype convertDatatype(OWLDatatype dataType) { URI uri = dataType.getIRI().toURI(); - if(uri.equals(Datatype.BOOLEAN.getURI())) - return Datatype.BOOLEAN; - else if(uri.equals(Datatype.DOUBLE.getURI())) - return Datatype.DOUBLE; - else if(uri.equals(Datatype.INT.getURI())) - return Datatype.INT; - else if(uri.equals(Datatype.INTEGER.getURI())) - return Datatype.INTEGER; - else if(uri.equals(Datatype.STRING.getURI())) - return Datatype.STRING; - else if(uri.equals(Datatype.DATE.getURI())) - return Datatype.DATE; - else if(uri.equals(Datatype.DATETIME.getURI())) - return Datatype.DATETIME; + if(uri.equals(OWL2Datatype.BOOLEAN.getURI())) + return OWL2Datatype.BOOLEAN.getDatatype(); + else if(uri.equals(OWL2Datatype.DOUBLE.getURI())) + return OWL2Datatype.DOUBLE.getDatatype(); + else if(uri.equals(OWL2Datatype.INT.getURI())) + return OWL2Datatype.INT.getDatatype(); + else if(uri.equals(OWL2Datatype.INTEGER.getURI())) + return OWL2Datatype.INTEGER.getDatatype(); + else if(uri.equals(OWL2Datatype.STRING.getURI())) + return OWL2Datatype.STRING.getDatatype(); + else if(uri.equals(OWL2Datatype.DATE.getURI())) + return OWL2Datatype.DATE.getDatatype(); + else if(uri.equals(OWL2Datatype.DATETIME.getURI())) + return OWL2Datatype.DATETIME.getDatatype(); throw new Error("Unsupported datatype " + dataType + ". Please inform a DL-Learner developer to add it."); } Modified: trunk/components-core/src/main/java/org/dllearner/utilities/owl/OWLAPIDescriptionConvertVisitor.java =================================================================== --- trunk/components-core/src/main/java/org/dllearner/utilities/owl/OWLAPIDescriptionConvertVisitor.java 2011-08-09 09:42:41 UTC (rev 3016) +++ trunk/components-core/src/main/java/org/dllearner/utilities/owl/OWLAPIDescriptionConvertVisitor.java 2011-08-09 11:32:08 UTC (rev 3017) @@ -39,6 +39,7 @@ import org.dllearner.core.owl.NamedClass; import org.dllearner.core.owl.Negation; import org.dllearner.core.owl.Nothing; +import org.dllearner.core.owl.OWL2Datatype; import org.dllearner.core.owl.ObjectAllRestriction; import org.dllearner.core.owl.ObjectExactCardinalityRestriction; import org.dllearner.core.owl.ObjectMaxCardinalityRestriction; @@ -332,11 +333,11 @@ } public OWLDatatype convertDatatype(Datatype datatype) { - if(datatype.equals(Datatype.BOOLEAN)) + if(datatype.equals(OWL2Datatype.BOOLEAN.getDatatype())) return factory.getBooleanOWLDatatype(); - else if(datatype.equals(Datatype.INT)) + else if(datatype.equals(OWL2Datatype.INT.getDatatype())) return factory.getIntegerOWLDatatype(); - else if(datatype.equals(Datatype.DOUBLE)) + else if(datatype.equals(OWL2Datatype.DOUBLE.getDatatype())) return factory.getDoubleOWLDatatype(); // else if(datatype.equals(Datatype.STRING)) // return factory.getOWLDataType(Datatype.STRING.getURI()); Modified: trunk/scripts/src/main/java/org/dllearner/examples/Flags.java =================================================================== --- trunk/scripts/src/main/java/org/dllearner/examples/Flags.java 2011-08-09 09:42:41 UTC (rev 3016) +++ trunk/scripts/src/main/java/org/dllearner/examples/Flags.java 2011-08-09 11:32:08 UTC (rev 3017) @@ -14,6 +14,7 @@ import org.dllearner.core.owl.Individual; import org.dllearner.core.owl.KB; import org.dllearner.core.owl.NamedClass; +import org.dllearner.core.owl.OWL2Datatype; import org.dllearner.core.owl.ObjectProperty; import org.dllearner.core.owl.ObjectPropertyAssertion; import org.dllearner.core.owl.ObjectPropertyDomainAxiom; @@ -253,103 +254,103 @@ kb.addAxiom(new DatatypePropertyDomainAxiom(hasName, Language)); kb.addAxiom(new DatatypePropertyDomainAxiom(hasName, Color)); kb.addAxiom(new DatatypePropertyDomainAxiom(hasName, Flag)); - kb.addAxiom(new DatatypePropertyRangeAxiom(hasName, Datatype.STRING)); + kb.addAxiom(new DatatypePropertyRangeAxiom(hasName, OWL2Datatype.STRING.getDatatype())); // DatatypeProperty hasArea = new DatatypeProperty(getIRI("hasArea")); kb.addAxiom(new DatatypePropertyDomainAxiom(hasArea, Country)); kb.addAxiom(new DatatypePropertyDomainAxiom(hasArea, Landmass)); kb.addAxiom(new DatatypePropertyDomainAxiom(hasArea, Hemisphere)); - kb.addAxiom(new DatatypePropertyRangeAxiom(hasArea, Datatype.DOUBLE)); + kb.addAxiom(new DatatypePropertyRangeAxiom(hasArea, OWL2Datatype.DOUBLE.getDatatype())); // DatatypeProperty hasPopulation = new DatatypeProperty(getIRI("hasPopulation")); kb.addAxiom(new DatatypePropertyDomainAxiom(hasPopulation, Country)); kb.addAxiom(new DatatypePropertyDomainAxiom(hasPopulation, Landmass)); kb.addAxiom(new DatatypePropertyDomainAxiom(hasPopulation, Hemisphere)); - kb.addAxiom(new DatatypePropertyRangeAxiom(hasPopulation, Datatype.DOUBLE)); + kb.addAxiom(new DatatypePropertyRangeAxiom(hasPopulation, OWL2Datatype.DOUBLE.getDatatype())); // DatatypeProperty numberOfVericalBars = new DatatypeProperty(getIRI("numberOfVericalBars")); kb.addAxiom(new DatatypePropertyDomainAxiom(numberOfVericalBars, Flag)); - kb.addAxiom(new DatatypePropertyRangeAxiom(numberOfVericalBars, Datatype.DOUBLE)); + kb.addAxiom(new DatatypePropertyRangeAxiom(numberOfVericalBars, OWL2Datatype.DOUBLE.getDatatype())); // DatatypeProperty numberOfHorizontalStripes = new DatatypeProperty(getIRI("numberOfHorizontalStripes")); kb.addAxiom(new DatatypePropertyDomainAxiom(numberOfHorizontalStripes, Flag)); - kb.addAxiom(new DatatypePropertyRangeAxiom(numberOfHorizontalStripes, Datatype.DOUBLE)); + kb.addAxiom(new DatatypePropertyRangeAxiom(numberOfHorizontalStripes, OWL2Datatype.DOUBLE.getDatatype())); // DatatypeProperty numberOfDifferentColors = new DatatypeProperty(getIRI("numberOfVericalBars")); kb.addAxiom(new DatatypePropertyDomainAxiom(numberOfDifferentColors, Flag)); - kb.addAxiom(new DatatypePropertyRangeAxiom(numberOfDifferentColors, Datatype.DOUBLE)); + kb.addAxiom(new DatatypePropertyRangeAxiom(numberOfDifferentColors, OWL2Datatype.DOUBLE.getDatatype())); // DatatypeProperty hasColorRed = new DatatypeProperty(getIRI("hasColorRed")); kb.addAxiom(new DatatypePropertyDomainAxiom(hasColorRed, Flag)); - kb.addAxiom(new DatatypePropertyRangeAxiom(hasColorRed, Datatype.BOOLEAN)); + kb.addAxiom(new DatatypePropertyRangeAxiom(hasColorRed, OWL2Datatype.BOOLEAN.getDatatype())); // DatatypeProperty hasColorGreen = new DatatypeProperty(getIRI("hasColorGreen")); kb.addAxiom(new DatatypePropertyDomainAxiom(hasColorGreen, Flag)); - kb.addAxiom(new DatatypePropertyRangeAxiom(hasColorGreen, Datatype.BOOLEAN)); + kb.addAxiom(new DatatypePropertyRangeAxiom(hasColorGreen, OWL2Datatype.BOOLEAN.getDatatype())); // DatatypeProperty hasColorBlue = new DatatypeProperty(getIRI("hasColorBlue")); kb.addAxiom(new DatatypePropertyDomainAxiom(hasColorBlue, Flag)); - kb.addAxiom(new DatatypePropertyRangeAxiom(hasColorBlue, Datatype.BOOLEAN)); + kb.addAxiom(new DatatypePropertyRangeAxiom(hasColorBlue, OWL2Datatype.BOOLEAN.getDatatype())); // DatatypeProperty hasColorGold = new DatatypeProperty(getIRI("hasColorGold")); kb.addAxiom(new DatatypePropertyDomainAxiom(hasColorGold, Flag)); - kb.addAxiom(new DatatypePropertyRangeAxiom(hasColorGold, Datatype.BOOLEAN)); + kb.addAxiom(new DatatypePropertyRangeAxiom(hasColorGold, OWL2Datatype.BOOLEAN.getDatatype())); // DatatypeProperty hasColorWhite = new DatatypeProperty(getIRI("hasColorWhite")); kb.addAxiom(new DatatypePropertyDomainAxiom(hasColorWhite, Flag)); - kb.addAxiom(new DatatypePropertyRangeAxiom(hasColorWhite, Datatype.BOOLEAN)); + kb.addAxiom(new DatatypePropertyRangeAxiom(hasColorWhite, OWL2Datatype.BOOLEAN.getDatatype())); // DatatypeProperty hasColorBlack = new DatatypeProperty(getIRI("hasColorBlack")); kb.addAxiom(new DatatypePropertyDomainAxiom(hasColorBlack, Flag)); - kb.addAxiom(new DatatypePropertyRangeAxiom(hasColorBlack, Datatype.BOOLEAN)); + kb.addAxiom(new DatatypePropertyRangeAxiom(hasColorBlack, OWL2Datatype.BOOLEAN.getDatatype())); // DatatypeProperty hasColorOrange = new DatatypeProperty(getIRI("hasColorOrange")); kb.addAxiom(new DatatypePropertyDomainAxiom(hasColorOrange, Flag)); - kb.addAxiom(new DatatypePropertyRangeAxiom(hasColorOrange, Datatype.BOOLEAN)); + kb.addAxiom(new DatatypePropertyRangeAxiom(hasColorOrange, OWL2Datatype.BOOLEAN.getDatatype())); // DatatypeProperty numberOfCircles = new DatatypeProperty(getIRI("numberOfCircles")); kb.addAxiom(new DatatypePropertyDomainAxiom(numberOfCircles, Flag)); - kb.addAxiom(new DatatypePropertyRangeAxiom(numberOfCircles, Datatype.DOUBLE)); + kb.addAxiom(new DatatypePropertyRangeAxiom(numberOfCircles, OWL2Datatype.DOUBLE.getDatatype())); // DatatypeProperty numberOfUprightCrosses = new DatatypeProperty(getIRI("numberOfUprightCrosses")); kb.addAxiom(new DatatypePropertyDomainAxiom(numberOfUprightCrosses, Flag)); - kb.addAxiom(new DatatypePropertyRangeAxiom(numberOfUprightCrosses, Datatype.DOUBLE)); + kb.addAxiom(new DatatypePropertyRangeAxiom(numberOfUprightCrosses, OWL2Datatype.DOUBLE.getDatatype())); // DatatypeProperty numberOfDiagonalCrosses = new DatatypeProperty(getIRI("numberOfDiagonalCrosses")); kb.addAxiom(new DatatypePropertyDomainAxiom(numberOfDiagonalCrosses, Flag)); - kb.addAxiom(new DatatypePropertyRangeAxiom(numberOfDiagonalCrosses, Datatype.DOUBLE)); + kb.addAxiom(new DatatypePropertyRangeAxiom(numberOfDiagonalCrosses, OWL2Datatype.DOUBLE.getDatatype())); // DatatypeProperty numberOfQuarterSections = new DatatypeProperty(getIRI("numberOfQuarterSections")); kb.addAxiom(new DatatypePropertyDomainAxiom(numberOfQuarterSections, Flag)); - kb.addAxiom(new DatatypePropertyRangeAxiom(numberOfQuarterSections, Datatype.DOUBLE)); + kb.addAxiom(new DatatypePropertyRangeAxiom(numberOfQuarterSections, OWL2Datatype.DOUBLE.getDatatype())); // DatatypeProperty numberOfQuarteredSections = new DatatypeProperty(getIRI("numberOfQuarteredSections")); kb.addAxiom(new DatatypePropertyDomainAxiom(numberOfQuarteredSections, Flag)); - kb.addAxiom(new DatatypePropertyRangeAxiom(numberOfQuarteredSections, Datatype.DOUBLE)); + kb.addAxiom(new DatatypePropertyRangeAxiom(numberOfQuarteredSections, OWL2Datatype.DOUBLE.getDatatype())); // DatatypeProperty numberOfSunOrStarSymbols = new DatatypeProperty(getIRI("numberOfSunOrStarSymbols")); kb.addAxiom(new DatatypePropertyDomainAxiom(numberOfSunOrStarSymbols, Flag)); - kb.addAxiom(new DatatypePropertyRangeAxiom(numberOfSunOrStarSymbols, Datatype.DOUBLE)); + kb.addAxiom(new DatatypePropertyRangeAxiom(numberOfSunOrStarSymbols, OWL2Datatype.DOUBLE.getDatatype())); // DatatypeProperty hasCrescentMoonSymbol = new DatatypeProperty(getIRI("hasCrescentMoonSymbol")); kb.addAxiom(new DatatypePropertyDomainAxiom(hasCrescentMoonSymbol, Flag)); - kb.addAxiom(new DatatypePropertyRangeAxiom(hasCrescentMoonSymbol, Datatype.BOOLEAN)); + kb.addAxiom(new DatatypePropertyRangeAxiom(hasCrescentMoonSymbol, OWL2Datatype.BOOLEAN.getDatatype())); // DatatypeProperty hasTriangle = new DatatypeProperty(getIRI("hasTriangle")); kb.addAxiom(new DatatypePropertyDomainAxiom(hasTriangle, Flag)); - kb.addAxiom(new DatatypePropertyRangeAxiom(hasTriangle, Datatype.BOOLEAN)); + kb.addAxiom(new DatatypePropertyRangeAxiom(hasTriangle, OWL2Datatype.BOOLEAN.getDatatype())); // DatatypeProperty hasImageInanimate = new DatatypeProperty(getIRI("hasImageInanimate")); kb.addAxiom(new DatatypePropertyDomainAxiom(hasImageInanimate, Flag)); - kb.addAxiom(new DatatypePropertyRangeAxiom(hasImageInanimate, Datatype.BOOLEAN)); + kb.addAxiom(new DatatypePropertyRangeAxiom(hasImageInanimate, OWL2Datatype.BOOLEAN.getDatatype())); // DatatypeProperty hasImageAnimate = new DatatypeProperty(getIRI("hasImageAnimate")); kb.addAxiom(new DatatypePropertyDomainAxiom(hasImageAnimate, Flag)); - kb.addAxiom(new DatatypePropertyRangeAxiom(hasImageAnimate, Datatype.BOOLEAN)); + kb.addAxiom(new DatatypePropertyRangeAxiom(hasImageAnimate, OWL2Datatype.BOOLEAN.getDatatype())); // DatatypeProperty hasText = new DatatypeProperty(getIRI("hasText")); kb.addAxiom(new DatatypePropertyDomainAxiom(hasText, Flag)); - kb.addAxiom(new DatatypePropertyRangeAxiom(hasText, Datatype.BOOLEAN)); + kb.addAxiom(new DatatypePropertyRangeAxiom(hasText, OWL2Datatype.BOOLEAN.getDatatype())); Modified: trunk/scripts/src/main/java/org/dllearner/examples/MonogenicDiseases.java =================================================================== --- trunk/scripts/src/main/java/org/dllearner/examples/MonogenicDiseases.java 2011-08-09 09:42:41 UTC (rev 3016) +++ trunk/scripts/src/main/java/org/dllearner/examples/MonogenicDiseases.java 2011-08-09 11:32:08 UTC (rev 3017) @@ -42,6 +42,7 @@ import org.dllearner.core.owl.Individual; import org.dllearner.core.owl.KB; import org.dllearner.core.owl.NamedClass; +import org.dllearner.core.owl.OWL2Datatype; import org.dllearner.core.owl.SubClassAxiom; import org.dllearner.reasoning.OWLAPIReasoner; import org.dllearner.utilities.Files; @@ -188,7 +189,7 @@ // score DatatypeProperty scoreProp = new DatatypeProperty(getURI("modifScore")); kb.addAxiom(new DatatypePropertyDomainAxiom(scoreProp, mutationClass)); - kb.addAxiom(new DatatypePropertyRangeAxiom(scoreProp, Datatype.DOUBLE)); + kb.addAxiom(new DatatypePropertyRangeAxiom(scoreProp, OWL2Datatype.DOUBLE.getDatatype())); // g_p NamedClass gpIncClass = new NamedClass(getURI("GPIncreasingMutation")); @@ -201,22 +202,22 @@ // conservation_wt DatatypeProperty conservationWTProp = new DatatypeProperty(getURI("convservationWT")); kb.addAxiom(new DatatypePropertyDomainAxiom(conservationWTProp, mutationClass)); - kb.addAxiom(new DatatypePropertyRangeAxiom(conservationWTProp, Datatype.DOUBLE)); + kb.addAxiom(new DatatypePropertyRangeAxiom(conservationWTProp, OWL2Datatype.DOUBLE.getDatatype())); // conservation_mut DatatypeProperty conservationMutProp = new DatatypeProperty(getURI("convservationMut")); kb.addAxiom(new DatatypePropertyDomainAxiom(conservationMutProp, mutationClass)); - kb.addAxiom(new DatatypePropertyRangeAxiom(conservationMutProp, Datatype.DOUBLE)); + kb.addAxiom(new DatatypePropertyRangeAxiom(conservationMutProp, OWL2Datatype.DOUBLE.getDatatype())); // freq_at_pos DatatypeProperty freqAtPosProp = new DatatypeProperty(getURI("freqAtPos")); kb.addAxiom(new DatatypePropertyDomainAxiom(freqAtPosProp, mutationClass)); - kb.addAxiom(new DatatypePropertyRangeAxiom(freqAtPosProp, Datatype.DOUBLE)); + kb.addAxiom(new DatatypePropertyRangeAxiom(freqAtPosProp, OWL2Datatype.DOUBLE.getDatatype())); // cluster_5res_size DatatypeProperty cluster5ResSizeProp = new DatatypeProperty(getURI("cluster5resSize")); kb.addAxiom(new DatatypePropertyDomainAxiom(cluster5ResSizeProp, mutationClass)); - kb.addAxiom(new DatatypePropertyRangeAxiom(cluster5ResSizeProp, Datatype.DOUBLE)); + kb.addAxiom(new DatatypePropertyRangeAxiom(cluster5ResSizeProp, OWL2Datatype.DOUBLE.getDatatype())); // secondary_struc NamedClass scHelixClass = new NamedClass(getURI("SCHelixMutation")); @@ -229,64 +230,64 @@ // gain_contact DatatypeProperty gainContactProp = new DatatypeProperty(getURI("gainContact")); kb.addAxiom(new DatatypePropertyDomainAxiom(gainContactProp, mutationClass)); - kb.addAxiom(new DatatypePropertyRangeAxiom(gainContactProp, Datatype.DOUBLE)); + kb.addAxiom(new DatatypePropertyRangeAxiom(gainContactProp, OWL2Datatype.DOUBLE.getDatatype())); // lost_contact DatatypeProperty lostContactProp = new DatatypeProperty(getURI("lostContact")); kb.addAxiom(new DatatypePropertyDomainAxiom(lostContactProp, mutationClass)); - kb.addAxiom(new DatatypePropertyRangeAxiom(lostContactProp, Datatype.DOUBLE)); + kb.addAxiom(new DatatypePropertyRangeAxiom(lostContactProp, OWL2Datatype.DOUBLE.getDatatype())); // identical_contact DatatypeProperty identicalContactProp = new DatatypeProperty(getURI("identicalContact")); kb.addAxiom(new DatatypePropertyDomainAxiom(identicalContactProp, mutationClass)); - kb.addAxiom(new DatatypePropertyRangeAxiom(identicalContactProp, Datatype.DOUBLE)); + kb.addAxiom(new DatatypePropertyRangeAxiom(identicalContactProp, OWL2Datatype.DOUBLE.getDatatype())); // gain_n1_contact DatatypeProperty gainN1ContactProp = new DatatypeProperty(getURI("gainN1Contact")); kb.addAxiom(new DatatypePropertyDomainAxiom(gainN1ContactProp, mutationClass)); - kb.addAxiom(new DatatypePropertyRangeAxiom(gainN1ContactProp, Datatype.DOUBLE)); + kb.addAxiom(new DatatypePropertyRangeAxiom(gainN1ContactProp, OWL2Datatype.DOUBLE.getDatatype())); // lost_n1_contact DatatypeProperty lostN1ContactProp = new DatatypeProperty(getURI("lostN1Contact")); kb.addAxiom(new DatatypePropertyDomainAxiom(lostN1ContactProp, mutationClass)); - kb.addAxiom(new DatatypePropertyRangeAxiom(lostN1ContactProp, Datatype.DOUBLE)); + kb.addAxiom(new DatatypePropertyRangeAxiom(lostN1ContactProp, OWL2Datatype.DOUBLE.getDatatype())); // identical_n1_contact DatatypeProperty identicalN1ContactProp = new DatatypeProperty(getURI("identicalN1Contact")); kb.addAxiom(new DatatypePropertyDomainAxiom(identicalN1ContactProp, mutationClass)); - kb.addAxiom(new DatatypePropertyRangeAxiom(identicalN1ContactProp, Datatype.DOUBLE)); + kb.addAxiom(new DatatypePropertyRangeAxiom(identicalN1ContactProp, OWL2Datatype.DOUBLE.getDatatype())); // wt_accessibility DatatypeProperty wtAccessibilityProp = new DatatypeProperty(getURI("wtAccessibility")); kb.addAxiom(new DatatypePropertyDomainAxiom(wtAccessibilityProp, mutationClass)); - kb.addAxiom(new DatatypePropertyRangeAxiom(wtAccessibilityProp, Datatype.DOUBLE)); + kb.addAxiom(new DatatypePropertyRangeAxiom(wtAccessibilityProp, OWL2Datatype.DOUBLE.getDatatype())); // mut_accessibility DatatypeProperty mutAccessibilityProp = new DatatypeProperty(getURI("mutAccessibility")); kb.addAxiom(new DatatypePropertyDomainAxiom(mutAccessibilityProp, mutationClass)); - kb.addAxiom(new DatatypePropertyRangeAxiom(mutAccessibilityProp, Datatype.DOUBLE)); + kb.addAxiom(new DatatypePropertyRangeAxiom(mutAccessibilityProp, OWL2Datatype.DOUBLE.getDatatype())); // cluster3d_10 DatatypeProperty cluster3D10Prop = new DatatypeProperty(getURI("cluster3d10")); kb.addAxiom(new DatatypePropertyDomainAxiom(cluster3D10Prop, mutationClass)); - kb.addAxiom(new DatatypePropertyRangeAxiom(cluster3D10Prop, Datatype.DOUBLE)); + kb.addAxiom(new DatatypePropertyRangeAxiom(cluster3D10Prop, OWL2Datatype.DOUBLE.getDatatype())); // cluster3d_20 DatatypeProperty cluster3D20Prop = new DatatypeProperty(getURI("cluster3d20")); kb.addAxiom(new DatatypePropertyDomainAxiom(cluster3D20Prop, mutationClass)); - kb.addAxiom(new DatatypePropertyRangeAxiom(cluster3D20Prop, Datatype.DOUBLE)); + kb.addAxiom(new DatatypePropertyRangeAxiom(cluster3D20Prop, OWL2Datatype.DOUBLE.getDatatype())); // cluster3d_30 DatatypeProperty cluster3D30Prop = new DatatypeProperty(getURI("cluster3d30")); kb.addAxiom(new DatatypePropertyDomainAxiom(cluster3D30Prop, mutationClass)); - kb.addAxiom(new DatatypePropertyRangeAxiom(cluster3D30Prop, Datatype.DOUBLE)); + kb.addAxiom(new DatatypePropertyRangeAxiom(cluster3D30Prop, OWL2Datatype.DOUBLE.getDatatype())); // TODO: stability missing // reliability_deltag DatatypeProperty reliabilityDeltagProp = new DatatypeProperty(getURI("reliabilityDeltag")); kb.addAxiom(new DatatypePropertyDomainAxiom(reliabilityDeltagProp, mutationClass)); - kb.addAxiom(new DatatypePropertyRangeAxiom(reliabilityDeltagProp, Datatype.DOUBLE)); + kb.addAxiom(new DatatypePropertyRangeAxiom(reliabilityDeltagProp, OWL2Datatype.DOUBLE.getDatatype())); if(generatePosExampleClass) { kb.addAxiom(new SubClassAxiom(deleteriousMutationClass, mutationClass)); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jen...@us...> - 2011-08-09 15:47:26
|
Revision: 3020 http://dl-learner.svn.sourceforge.net/dl-learner/?rev=3020&view=rev Author: jenslehmann Date: 2011-08-09 15:47:19 +0000 (Tue, 09 Aug 2011) Log Message: ----------- ctd. eval script Modified Paths: -------------- trunk/scripts/src/main/java/org/dllearner/scripts/evaluation/EnrichmentEvaluation.java Added Paths: ----------- trunk/components-core/src/main/java/org/dllearner/algorithms/DisjointClassesLearner.java trunk/components-core/src/main/java/org/dllearner/algorithms/SimpleSubclassLearner.java Added: trunk/components-core/src/main/java/org/dllearner/algorithms/DisjointClassesLearner.java =================================================================== --- trunk/components-core/src/main/java/org/dllearner/algorithms/DisjointClassesLearner.java (rev 0) +++ trunk/components-core/src/main/java/org/dllearner/algorithms/DisjointClassesLearner.java 2011-08-09 15:47:19 UTC (rev 3020) @@ -0,0 +1,63 @@ +/** + * Copyright (C) 2007-2011, Jens Lehmann + * + * This file is part of DL-Learner. + * + * DL-Learner is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * DL-Learner is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + * + */ +package org.dllearner.algorithms; + +import java.util.List; + +import org.dllearner.core.ClassExpressionLearningAlgorithm; +import org.dllearner.core.ComponentInitException; +import org.dllearner.core.EvaluatedDescription; +import org.dllearner.core.owl.Description; + +/** + * Learns disjoint classes using SPARQL queries. + * + * @author Lorenz Bühmann + * @author Jens Lehmann + * + */ +public class DisjointClassesLearner implements ClassExpressionLearningAlgorithm { + + @Override + public List<Description> getCurrentlyBestDescriptions(int nrOfDescriptions) { + // TODO Auto-generated method stub + return null; + } + + @Override + public List<? extends EvaluatedDescription> getCurrentlyBestEvaluatedDescriptions( + int nrOfDescriptions) { + // TODO Auto-generated method stub + return null; + } + + @Override + public void start() { + // TODO Auto-generated method stub + + } + + @Override + public void init() throws ComponentInitException { + // TODO Auto-generated method stub + + } + +} Added: trunk/components-core/src/main/java/org/dllearner/algorithms/SimpleSubclassLearner.java =================================================================== --- trunk/components-core/src/main/java/org/dllearner/algorithms/SimpleSubclassLearner.java (rev 0) +++ trunk/components-core/src/main/java/org/dllearner/algorithms/SimpleSubclassLearner.java 2011-08-09 15:47:19 UTC (rev 3020) @@ -0,0 +1,63 @@ +/** + * Copyright (C) 2007-2011, Jens Lehmann + * + * This file is part of DL-Learner. + * + * DL-Learner is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * DL-Learner is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + * + */ +package org.dllearner.algorithms; + +import java.util.List; + +import org.dllearner.core.ClassExpressionLearningAlgorithm; +import org.dllearner.core.ComponentInitException; +import org.dllearner.core.EvaluatedDescription; +import org.dllearner.core.owl.Description; + +/** + * Learns sub classes using SPARQL queries. + * + * @author Lorenz Bühmann + * @author Jens Lehmann + * + */ +public class SimpleSubclassLearner implements ClassExpressionLearningAlgorithm { + + @Override + public List<Description> getCurrentlyBestDescriptions(int nrOfDescriptions) { + // TODO Auto-generated method stub + return null; + } + + @Override + public List<? extends EvaluatedDescription> getCurrentlyBestEvaluatedDescriptions( + int nrOfDescriptions) { + // TODO Auto-generated method stub + return null; + } + + @Override + public void start() { + // TODO Auto-generated method stub + + } + + @Override + public void init() throws ComponentInitException { + // TODO Auto-generated method stub + + } + +} Modified: trunk/scripts/src/main/java/org/dllearner/scripts/evaluation/EnrichmentEvaluation.java =================================================================== --- trunk/scripts/src/main/java/org/dllearner/scripts/evaluation/EnrichmentEvaluation.java 2011-08-09 12:41:57 UTC (rev 3019) +++ trunk/scripts/src/main/java/org/dllearner/scripts/evaluation/EnrichmentEvaluation.java 2011-08-09 15:47:19 UTC (rev 3020) @@ -41,6 +41,9 @@ import java.util.prefs.Preferences; import org.apache.log4j.Logger; +import org.dllearner.algorithms.DisjointClassesLearner; +import org.dllearner.algorithms.SimpleSubclassLearner; +import org.dllearner.algorithms.celoe.CELOE; import org.dllearner.algorithms.properties.EquivalentPropertyAxiomLearner; import org.dllearner.algorithms.properties.FunctionalPropertyAxiomLearner; import org.dllearner.algorithms.properties.PropertyDomainAxiomLearner; @@ -52,6 +55,7 @@ import org.dllearner.core.ComponentInitException; import org.dllearner.core.ComponentManager; import org.dllearner.core.EvaluatedAxiom; +import org.dllearner.core.LearningAlgorithm; import org.dllearner.core.config.ConfigHelper; import org.dllearner.core.owl.ObjectProperty; import org.dllearner.kb.SparqlEndpointKS; @@ -87,6 +91,7 @@ private int maxClasses = 3; private List<Class<? extends AxiomLearningAlgorithm>> objectPropertyAlgorithms; private List<Class<? extends AxiomLearningAlgorithm>> dataPropertyAlgorithms; + private List<Class<? extends LearningAlgorithm>> classAlgorithms; private String baseURI = "http://dbpedia.org/resource/"; private Map<String,String> prefixes; @@ -118,6 +123,11 @@ dataPropertyAlgorithms.add(PropertyDomainAxiomLearner.class); dataPropertyAlgorithms.add(PropertyRangeAxiomLearner.class); // ? dataPropertyAlgorithms.add(SubPropertyOfAxiomLearner.class); + + classAlgorithms = new LinkedList<Class<? extends LearningAlgorithm>>(); + classAlgorithms.add(DisjointClassesLearner.class); + classAlgorithms.add(SimpleSubclassLearner.class); + classAlgorithms.add(CELOE.class); } private void initDBConnection() { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jen...@us...> - 2011-08-10 09:04:07
|
Revision: 3022 http://dl-learner.svn.sourceforge.net/dl-learner/?rev=3022&view=rev Author: jenslehmann Date: 2011-08-10 09:04:00 +0000 (Wed, 10 Aug 2011) Log Message: ----------- - started enrichment commandline interface - updated jopt-simple to version 3.3 Modified Paths: -------------- trunk/components-core/src/main/java/org/dllearner/kb/sparql/SparqlEndpoint.java trunk/pom.xml Added Paths: ----------- trunk/interfaces/src/main/java/org/dllearner/cli/Enrichment.java Modified: trunk/components-core/src/main/java/org/dllearner/kb/sparql/SparqlEndpoint.java =================================================================== --- trunk/components-core/src/main/java/org/dllearner/kb/sparql/SparqlEndpoint.java 2011-08-10 06:53:19 UTC (rev 3021) +++ trunk/components-core/src/main/java/org/dllearner/kb/sparql/SparqlEndpoint.java 2011-08-10 09:04:00 UTC (rev 3022) @@ -49,7 +49,6 @@ this.namedGraphURIs=namedGraphURIs; } - public URL getURL() { return this.url; } Added: trunk/interfaces/src/main/java/org/dllearner/cli/Enrichment.java =================================================================== --- trunk/interfaces/src/main/java/org/dllearner/cli/Enrichment.java (rev 0) +++ trunk/interfaces/src/main/java/org/dllearner/cli/Enrichment.java 2011-08-10 09:04:00 UTC (rev 3022) @@ -0,0 +1,108 @@ +/** + * Copyright (C) 2007-2011, Jens Lehmann + * + * This file is part of DL-Learner. + * + * DL-Learner is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * DL-Learner is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + * + */ +package org.dllearner.cli; + +import static java.util.Arrays.asList; + +import java.io.IOException; +import java.net.URL; +import java.util.LinkedList; + +import joptsimple.OptionParser; +import joptsimple.OptionSet; + +import org.dllearner.kb.sparql.SparqlEndpoint; +import org.dllearner.kb.sparql.SparqlQuery; + +import com.hp.hpl.jena.query.ResultSet; + +/** + * Command Line Interface for Enrichment. + * + * @author Jens Lehmann + * + */ +public class Enrichment { + + public static void main(String[] args) throws IOException { + OptionParser parser = new OptionParser(); + parser.acceptsAll(asList("h", "?", "help"), "Show help."); + parser.acceptsAll(asList("v", "verbose"), "Verbosity level."); + parser.acceptsAll(asList("e", "endpoint"), "SPARQL endpoint URL to be used.") + .withRequiredArg().ofType(URL.class); + parser.acceptsAll(asList("g", "graph"), + "URI of default graph for queries on SPARQL endpoint.").withOptionalArg() + .ofType(URL.class); + parser.acceptsAll(asList("r", "resource"), + "The resource for which enrichment axioms should be suggested.").withOptionalArg(); + parser.acceptsAll(asList("o", "output"), "Specify a file where the output can be written.") + .withOptionalArg(); + parser.acceptsAll(asList("f", "format"), + "Format of the generated output (plain, html, rdf).").withOptionalArg() + .ofType(String.class).defaultsTo("plain"); + + // parse options and display a message for the user in case of problems + OptionSet options = null; + try { + options = parser.parse(args); + } catch (Exception e) { + System.out.println("Error: " + e.getMessage() + ". Use -? to get help."); + System.exit(0); + } + + // print help screen + if (options.has("?")) { + parser.printHelpOn(System.out); + String addHelp = "Additional explanations: The resource specified should " + + "be a class, object \nproperty or data property. DL-Learner will try to " + + "automatically detect its \ntype. If no resource is specified, DL-Learner will " + + "generate enrichment \nsuggestions for all detected classes and properties in " + + "the given endpoint \nand graph. This can take several hours."; + System.out.println(); + System.out.println(addHelp); + // main script + } else { + // create SPARQL endpoint object + URL endpoint = (URL) options.valueOf("endpoint"); + URL graph = (URL) options.valueOf("graph"); + LinkedList<String> defaultGraphURIs = new LinkedList<String>(); + defaultGraphURIs.add(graph.toString()); + SparqlEndpoint se = new SparqlEndpoint(endpoint, defaultGraphURIs, null); + + // sanity check that endpoint/graph returns at least one triple + String query = "SELECT * WHERE {?s ?p ?o} LIMIT 1"; + SparqlQuery sq = new SparqlQuery(query, se); + ResultSet q = sq.send(); + while (q.hasNext()) { + q.next(); + } + + // run an algorithm using the resource as input + + + // TODO: detect type of the resource + // TODO: run all possible algorithms + // TODO: automatically run over all resources if no specific resource was specified + + } + + } + +} Modified: trunk/pom.xml =================================================================== --- trunk/pom.xml 2011-08-10 06:53:19 UTC (rev 3021) +++ trunk/pom.xml 2011-08-10 09:04:00 UTC (rev 3022) @@ -164,7 +164,7 @@ <dependency> <groupId>net.sf.jopt-simple</groupId> <artifactId>jopt-simple</artifactId> - <version>3.1</version> + <version>3.3</version> <!--This version is the one released with DL-Learner 2048 --> </dependency> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jen...@us...> - 2011-08-10 14:19:11
|
Revision: 3025 http://dl-learner.svn.sourceforge.net/dl-learner/?rev=3025&view=rev Author: jenslehmann Date: 2011-08-10 14:19:01 +0000 (Wed, 10 Aug 2011) Log Message: ----------- disallowed using refexamples in config files (use ocel instead) Modified Paths: -------------- trunk/examples/arch/arch.conf trunk/examples/arch/arch_owl.conf trunk/examples/carcinogenesis/param.conf trunk/examples/carcinogenesis/train.conf trunk/examples/carcinogenesis/validate.conf trunk/examples/datatypes/double.conf trunk/examples/datatypes/stringtyped.conf trunk/examples/datatypes/stringuntyped.conf trunk/examples/epc/rs002.conf trunk/examples/epc/rs004.conf trunk/examples/epc/rs005.conf trunk/examples/epc/rs006.conf trunk/examples/family-benchmark/Aunt.conf trunk/examples/family-benchmark/Cousin.conf trunk/examples/krk/KRK_ONE_ZERO_fastInstance.conf trunk/examples/krk/KRK_ZERO_ONE_fastInstance.conf trunk/examples/krk/KRK_ZERO_against_1to5_fastInstance.conf trunk/examples/krk/complete_no_draw.conf trunk/examples/krk/test_ZERO_against_1to16.conf trunk/examples/lymphography/lymphography_Class1.conf trunk/examples/lymphography/lymphography_Class2.conf trunk/examples/lymphography/lymphography_Class3.conf trunk/examples/lymphography/lymphography_Class4.conf trunk/examples/mutagenesis/train1.conf trunk/examples/mutagenesis/train2.conf trunk/examples/semantic_bible/hasvalue_example.conf trunk/examples/semantic_bible/hasvalue_simple.conf trunk/examples/semantic_bible/normal.conf trunk/examples/semantic_bible/normal_long_retrieval_time.conf trunk/examples/semantic_bible/sparqlbible.conf trunk/examples/semantic_bible/woman.conf trunk/examples/sparql/Aristotle.conf trunk/examples/sparql/AristotlePos.conf trunk/examples/sparql/actors2.conf trunk/examples/sparql/britishPrimeMinisters.conf trunk/examples/sparql/govtrack.conf trunk/examples/sparql/scrobble.conf trunk/examples/swore/swore.conf trunk/interfaces/src/main/java/org/dllearner/cli/ConfMapper.java trunk/test/alzheimer/train1.conf trunk/test/alzheimer/train2.conf trunk/test/alzheimer/train3.conf trunk/test/alzheimer/train4.conf trunk/test/breasttissue/train1.conf trunk/test/breasttissue/train2.conf trunk/test/breasttissue/train3.conf trunk/test/breasttissue/train4.conf trunk/test/breasttissue/train5.conf trunk/test/breasttissue/train6.conf trunk/test/breasttissue/train7.conf trunk/test/cardiotocography/train1.conf trunk/test/cardiotocography/train10.conf trunk/test/cardiotocography/train11.conf trunk/test/cardiotocography/train12.conf trunk/test/cardiotocography/train13.conf trunk/test/cardiotocography/train2.conf trunk/test/cardiotocography/train3.conf trunk/test/cardiotocography/train4.conf trunk/test/cardiotocography/train5.conf trunk/test/cardiotocography/train6.conf trunk/test/cardiotocography/train7.conf trunk/test/cardiotocography/train8.conf trunk/test/cardiotocography/train9.conf trunk/test/heart/train.conf trunk/test/mammographic/train.conf trunk/test/parkinsons/train.conf trunk/test/suramin/train.conf trunk/test/testCaseSPARQLDescription/1266166637085.conf trunk/test/testCaseSPARQLDescription/combined.conf trunk/test/testDomainRange/notWorking.conf trunk/test/testDomainRange/working.conf Modified: trunk/examples/arch/arch.conf =================================================================== --- trunk/examples/arch/arch.conf 2011-08-10 13:54:06 UTC (rev 3024) +++ trunk/examples/arch/arch.conf 2011-08-10 14:19:01 UTC (rev 3025) @@ -16,10 +16,10 @@ * Copyright (C) 2007, Sebastian Hellmann */ -algorithm = refexamples; +algorithm = ocel; reasoner = fastInstanceChecker; // comment this out if the search should start from construction -// refexamples.startClass = "http://localhost/foo#construction"; +// ocel.startClass = "http://localhost/foo#construction"; // export("arch.owl"); import("arch.kb"); Modified: trunk/examples/arch/arch_owl.conf =================================================================== --- trunk/examples/arch/arch_owl.conf 2011-08-10 13:54:06 UTC (rev 3024) +++ trunk/examples/arch/arch_owl.conf 2011-08-10 14:19:01 UTC (rev 3025) @@ -16,8 +16,8 @@ * Copyright (C) 2007, Sebastian Hellmann */ -refexamples.writeSearchTree = true; -refexamples.searchTreeFile = "log/test.txt"; +ocel.writeSearchTree = true; +ocel.searchTreeFile = "log/test.txt"; /** background knowledge **/ import("arch.owl"); Modified: trunk/examples/carcinogenesis/param.conf =================================================================== --- trunk/examples/carcinogenesis/param.conf 2011-08-10 13:54:06 UTC (rev 3024) +++ trunk/examples/carcinogenesis/param.conf 2011-08-10 14:19:01 UTC (rev 3025) @@ -4,20 +4,20 @@ // general setup reasoner = fastInstanceChecker; -algorithm = refexamples; -refexamples.noisePercentage = 30; -refexamples.startClass = "http://dl-learner.org/carcinogenesis#Compound"; +algorithm = ocel; +ocel.noisePercentage = 30; +ocel.startClass = "http://dl-learner.org/carcinogenesis#Compound"; // search tree -refexamples.writeSearchTree = false; -refexamples.searchTreeFile = "log/carcinogenesis/searchTree.log"; +ocel.writeSearchTree = false; +ocel.searchTreeFile = "log/carcinogenesis/searchTree.log"; // store some settings to make the experiment reproducable in the future -refexamples.negativeWeight = 0.8; -refexamples.startNodeBonus = 1.0; -refexamples.forceRefinementLengthIncrease = false; -refexamples.cardinalityLimit = 5; -refexamples.usePropernessChecks = false; +ocel.negativeWeight = 0.8; +ocel.startNodeBonus = 1.0; +ocel.forceRefinementLengthIncrease = false; +ocel.cardinalityLimit = 5; +ocel.usePropernessChecks = false; +"http://dl-learner.org/carcinogenesis#d1" +"http://dl-learner.org/carcinogenesis#d10" Modified: trunk/examples/carcinogenesis/train.conf =================================================================== --- trunk/examples/carcinogenesis/train.conf 2011-08-10 13:54:06 UTC (rev 3024) +++ trunk/examples/carcinogenesis/train.conf 2011-08-10 14:19:01 UTC (rev 3025) @@ -2,20 +2,20 @@ // general setup reasoner = fastInstanceChecker; -algorithm = refexamples; -refexamples.noisePercentage = 32; -refexamples.startClass = "http://dl-learner.org/carcinogenesis#Compound"; +algorithm = ocel; +ocel.noisePercentage = 32; +ocel.startClass = "http://dl-learner.org/carcinogenesis#Compound"; // search tree -refexamples.writeSearchTree = false; -refexamples.searchTreeFile = "log/carcinogenesis/searchTree.log"; +ocel.writeSearchTree = false; +ocel.searchTreeFile = "log/carcinogenesis/searchTree.log"; // store some settings to make the experiment reproducable in the future -refexamples.negativeWeight = 0.8; -refexamples.startNodeBonus = 1.0; -refexamples.forceRefinementLengthIncrease = false; -refexamples.cardinalityLimit = 5; -refexamples.usePropernessChecks = false; +ocel.negativeWeight = 0.8; +ocel.startNodeBonus = 1.0; +ocel.forceRefinementLengthIncrease = false; +ocel.cardinalityLimit = 5; +ocel.usePropernessChecks = false; +"http://dl-learner.org/carcinogenesis#d1" +"http://dl-learner.org/carcinogenesis#d10" Modified: trunk/examples/carcinogenesis/validate.conf =================================================================== --- trunk/examples/carcinogenesis/validate.conf 2011-08-10 13:54:06 UTC (rev 3024) +++ trunk/examples/carcinogenesis/validate.conf 2011-08-10 14:19:01 UTC (rev 3025) @@ -4,20 +4,20 @@ // general setup reasoner = fastInstanceChecker; -algorithm = refexamples; -refexamples.noisePercentage = 30; -refexamples.startClass = "http://dl-learner.org/carcinogenesis#Compound"; +algorithm = ocel; +ocel.noisePercentage = 30; +ocel.startClass = "http://dl-learner.org/carcinogenesis#Compound"; // search tree -refexamples.writeSearchTree = false; -refexamples.searchTreeFile = "log/carcinogenesis/searchTree.log"; +ocel.writeSearchTree = false; +ocel.searchTreeFile = "log/carcinogenesis/searchTree.log"; // store some settings to make the experiment reproducable in the future -refexamples.negativeWeight = 0.8; -refexamples.startNodeBonus = 1.0; -refexamples.forceRefinementLengthIncrease = false; -refexamples.cardinalityLimit = 5; -refexamples.usePropernessChecks = false; +ocel.negativeWeight = 0.8; +ocel.startNodeBonus = 1.0; +ocel.forceRefinementLengthIncrease = false; +ocel.cardinalityLimit = 5; +ocel.usePropernessChecks = false; +"http://dl-learner.org/carcinogenesis#d25" +"http://dl-learner.org/carcinogenesis#d252" Modified: trunk/examples/datatypes/double.conf =================================================================== --- trunk/examples/datatypes/double.conf 2011-08-10 13:54:06 UTC (rev 3024) +++ trunk/examples/datatypes/double.conf 2011-08-10 14:19:01 UTC (rev 3025) @@ -8,9 +8,9 @@ * Copyright (C) 2008, Jens Lehmann */ -algorithm = refexamples; -// refexamples.writeSearchTree = true; -refexamples.searchTreeFile = "log/doubleTree.txt"; +algorithm = ocel; +// ocel.writeSearchTree = true; +ocel.searchTreeFile = "log/doubleTree.txt"; reasoner = fastInstanceChecker; import("double.owl"); Modified: trunk/examples/datatypes/stringtyped.conf =================================================================== --- trunk/examples/datatypes/stringtyped.conf 2011-08-10 13:54:06 UTC (rev 3024) +++ trunk/examples/datatypes/stringtyped.conf 2011-08-10 14:19:01 UTC (rev 3025) @@ -4,11 +4,11 @@ * typedLiteral hasValue "test" */ -algorithm = refexamples; -// refexamples.writeSearchTree = true; -refexamples.searchTreeFile = "log/stringTypedTree.txt"; +algorithm = ocel; +// ocel.writeSearchTree = true; +ocel.searchTreeFile = "log/stringTypedTree.txt"; reasoner = fastInstanceChecker; -refexamples.useDataHasValueConstructor=true; +ocel.useDataHasValueConstructor=true; import("string.owl"); Modified: trunk/examples/datatypes/stringuntyped.conf =================================================================== --- trunk/examples/datatypes/stringuntyped.conf 2011-08-10 13:54:06 UTC (rev 3024) +++ trunk/examples/datatypes/stringuntyped.conf 2011-08-10 14:19:01 UTC (rev 3025) @@ -4,10 +4,10 @@ * notType hasValue "test" */ -algorithm = refexamples; -// refexamples.writeSearchTree = true; -refexamples.searchTreeFile = "log/stringUntypedTree.txt"; -refexamples.useDataHasValueConstructor=true; +algorithm = ocel; +// ocel.writeSearchTree = true; +ocel.searchTreeFile = "log/stringUntypedTree.txt"; +ocel.useDataHasValueConstructor=true; reasoner = fastInstanceChecker; import("string.owl"); Modified: trunk/examples/epc/rs002.conf =================================================================== --- trunk/examples/epc/rs002.conf 2011-08-10 13:54:06 UTC (rev 3024) +++ trunk/examples/epc/rs002.conf 2011-08-10 14:19:01 UTC (rev 3025) @@ -1,8 +1,8 @@ import("sap_epc.owl"); -refexamples.startClass = "http://localhost/aris/sap_model.owl#EPC"; +ocel.startClass = "http://localhost/aris/sap_model.owl#EPC"; // this enforces a breadth like search -refexamples.expansionPenaltyFactor = 0.5; +ocel.expansionPenaltyFactor = 0.5; +"http://localhost/aris/sap_model.owl#bsj0__6_____u__" +"http://localhost/aris/sap_model.owl#fa6v__6_____u__" Modified: trunk/examples/epc/rs004.conf =================================================================== --- trunk/examples/epc/rs004.conf 2011-08-10 13:54:06 UTC (rev 3024) +++ trunk/examples/epc/rs004.conf 2011-08-10 14:19:01 UTC (rev 3025) @@ -1,7 +1,7 @@ import("sap_epc.owl"); -refexamples.startClass = "http://localhost/aris/sap_model.owl#EPC"; -refexamples.expansionPenaltyFactor = 0.5; +ocel.startClass = "http://localhost/aris/sap_model.owl#EPC"; +ocel.expansionPenaltyFactor = 0.5; +"http://localhost/aris/sap_model.owl#4vqy__6_____u__" +"http://localhost/aris/sap_model.owl#ab0h__6_____u__" Modified: trunk/examples/epc/rs005.conf =================================================================== --- trunk/examples/epc/rs005.conf 2011-08-10 13:54:06 UTC (rev 3024) +++ trunk/examples/epc/rs005.conf 2011-08-10 14:19:01 UTC (rev 3025) @@ -1,7 +1,7 @@ import("sap_epc.owl"); -refexamples.startClass = "http://localhost/aris/sap_model.owl#EPC"; -refexamples.expansionPenaltyFactor = 0.5; +ocel.startClass = "http://localhost/aris/sap_model.owl#EPC"; +ocel.expansionPenaltyFactor = 0.5; +"http://localhost/aris/sap_model.owl#8kx7__6_____u__" -"http://localhost/aris/sap_model.owl#50ni__6_____u__" Modified: trunk/examples/epc/rs006.conf =================================================================== --- trunk/examples/epc/rs006.conf 2011-08-10 13:54:06 UTC (rev 3024) +++ trunk/examples/epc/rs006.conf 2011-08-10 14:19:01 UTC (rev 3025) @@ -1,7 +1,7 @@ import("sap_epc.owl"); -refexamples.startClass = "http://localhost/aris/sap_model.owl#EPC"; -refexamples.expansionPenaltyFactor = 0.5; +ocel.startClass = "http://localhost/aris/sap_model.owl#EPC"; +ocel.expansionPenaltyFactor = 0.5; +"http://localhost/aris/sap_model.owl#h19w__6_____u__" +"http://localhost/aris/sap_model.owl#9eke__6_____u__" Modified: trunk/examples/family-benchmark/Aunt.conf =================================================================== --- trunk/examples/family-benchmark/Aunt.conf 2011-08-10 13:54:06 UTC (rev 3024) +++ trunk/examples/family-benchmark/Aunt.conf 2011-08-10 14:19:01 UTC (rev 3025) @@ -1,7 +1,7 @@ import("family-benchmark.owl"); // TODO All Quantifier causes "wrong" areas of the search space to be explored -refexamples.useAllConstructor = false; +ocel.useAllConstructor = false; +"http://www.benchmark.org/family#F2F14" +"http://www.benchmark.org/family#F2F12" Modified: trunk/examples/family-benchmark/Cousin.conf =================================================================== --- trunk/examples/family-benchmark/Cousin.conf 2011-08-10 13:54:06 UTC (rev 3024) +++ trunk/examples/family-benchmark/Cousin.conf 2011-08-10 14:19:01 UTC (rev 3025) @@ -1,7 +1,7 @@ import("family-benchmark.owl"); // TODO All Quantifier causes "wrong" areas of the search space to be explored -refexamples.useAllConstructor = false; +ocel.useAllConstructor = false; +"http://www.benchmark.org/family#F2M13" +"http://www.benchmark.org/family#F2F14" Modified: trunk/examples/krk/KRK_ONE_ZERO_fastInstance.conf =================================================================== --- trunk/examples/krk/KRK_ONE_ZERO_fastInstance.conf 2011-08-10 13:54:06 UTC (rev 3024) +++ trunk/examples/krk/KRK_ONE_ZERO_fastInstance.conf 2011-08-10 14:19:01 UTC (rev 3025) @@ -11,11 +11,11 @@ import("KRK_ZERO_ONE.owl"); -refexamples.ignoredConcepts={ +ocel.ignoredConcepts={ "http://www.test.de/test#ONE", "http://www.test.de/test#ZERO"}; -algorithm = refexamples; +algorithm = ocel; reasoner=fastInstanceChecker; +"http://www.test.de/test#game100" Modified: trunk/examples/krk/KRK_ZERO_ONE_fastInstance.conf =================================================================== --- trunk/examples/krk/KRK_ZERO_ONE_fastInstance.conf 2011-08-10 13:54:06 UTC (rev 3024) +++ trunk/examples/krk/KRK_ZERO_ONE_fastInstance.conf 2011-08-10 14:19:01 UTC (rev 3025) @@ -25,13 +25,13 @@ */ import("KRK_ZERO_ONE.owl"); -refexamples.ignoredConcepts={ +ocel.ignoredConcepts={ "http://www.test.de/test#ONE", "http://www.test.de/test#ZERO"}; -algorithm = refexamples; +algorithm = ocel; reasoner=fastInstanceChecker; +"http://www.test.de/test#game1" Modified: trunk/examples/krk/KRK_ZERO_against_1to5_fastInstance.conf =================================================================== --- trunk/examples/krk/KRK_ZERO_against_1to5_fastInstance.conf 2011-08-10 13:54:06 UTC (rev 3024) +++ trunk/examples/krk/KRK_ZERO_against_1to5_fastInstance.conf 2011-08-10 14:19:01 UTC (rev 3025) @@ -8,7 +8,7 @@ import("KRK_ZERO_against_1to5.owl"); -refexamples.ignoredConcepts={ +ocel.ignoredConcepts={ "http://www.test.de/test#FIVE", "http://www.test.de/test#FOUR", "http://www.test.de/test#ONE", @@ -16,11 +16,11 @@ "http://www.test.de/test#TWO", "http://www.test.de/test#ZERO"}; -algorithm = refexamples; +algorithm = ocel; reasoner=fastInstanceChecker; -refexamples.startClass = "http://www.test.de/test#Game"; -refexamples.useAllConstructor = false; -refexamples.noisePercentage = 2; +ocel.startClass = "http://www.test.de/test#Game"; +ocel.useAllConstructor = false; +ocel.noisePercentage = 2; /**ZERO**/ +"http://www.test.de/test#game1" Modified: trunk/examples/krk/complete_no_draw.conf =================================================================== --- trunk/examples/krk/complete_no_draw.conf 2011-08-10 13:54:06 UTC (rev 3024) +++ trunk/examples/krk/complete_no_draw.conf 2011-08-10 14:19:01 UTC (rev 3025) @@ -5,7 +5,7 @@ */ import("complete_nodraw.owl"); -refexamples.ignoredConcepts={ +ocel.ignoredConcepts={ "http://dl-learner.org/krk#EIGHT", "http://dl-learner.org/krk#ELEVEN", @@ -25,15 +25,15 @@ "http://dl-learner.org/krk#TWO", "http://dl-learner.org/krk#ZERO"}; -algorithm = refexamples; +algorithm = ocel; reasoner=fastInstanceChecker; //reasoner=owlAPIReasoner; //fastInstanceChecker.reasonerType = fact; -refexamples.useAllConstructor = false; -refexamples.useExistsConstructor = true; -refexamples.useCardinalityRestrictions = false; -refexamples.useNegation = false; +ocel.useAllConstructor = false; +ocel.useExistsConstructor = true; +ocel.useCardinalityRestrictions = false; +ocel.useNegation = false; /**ZERO**/ +"http://dl-learner.org/krk#game1" Modified: trunk/examples/krk/test_ZERO_against_1to16.conf =================================================================== --- trunk/examples/krk/test_ZERO_against_1to16.conf 2011-08-10 13:54:06 UTC (rev 3024) +++ trunk/examples/krk/test_ZERO_against_1to16.conf 2011-08-10 14:19:01 UTC (rev 3025) @@ -13,7 +13,7 @@ import("test_ZERO_against_1to16.owl"); -refexamples.ignoredConcepts={ +ocel.ignoredConcepts={ "http://www.test.de/test#EIGHT", "http://www.test.de/test#ELEVEN", "http://www.test.de/test#FIFTEEN", @@ -34,7 +34,7 @@ //problem = posOnlyDefinition; -algorithm = refexamples; +algorithm = ocel; //algorithm = refinement; //refinement.heuristic=flexible; reasoner=fastInstanceChecker; Modified: trunk/examples/lymphography/lymphography_Class1.conf =================================================================== --- trunk/examples/lymphography/lymphography_Class1.conf 2011-08-10 13:54:06 UTC (rev 3024) +++ trunk/examples/lymphography/lymphography_Class1.conf 2011-08-10 14:19:01 UTC (rev 3025) @@ -17,17 +17,17 @@ */ -algorithm = refexamples; -refexamples.ignoredConcepts = { +algorithm = ocel; +ocel.ignoredConcepts = { "http://www.example.org/lymphography#Target1_NormalFind", "http://www.example.org/lymphography#Target2_Metastases", "http://www.example.org/lymphography#Target3_MalignLymph", "http://www.example.org/lymphography#Target4_Fibrosis" }; -refexamples.useAllConstructor = false; -refexamples.useExistsConstructor = true; -refexamples.useNegation = false; +ocel.useAllConstructor = false; +ocel.useExistsConstructor = true; +ocel.useNegation = false; import("lymphography.owl"); /*Class1*/ Modified: trunk/examples/lymphography/lymphography_Class2.conf =================================================================== --- trunk/examples/lymphography/lymphography_Class2.conf 2011-08-10 13:54:06 UTC (rev 3024) +++ trunk/examples/lymphography/lymphography_Class2.conf 2011-08-10 14:19:01 UTC (rev 3025) @@ -15,18 +15,18 @@ a new experimental version of the refinement algorithm) */ -algorithm = refexamples; -refexamples.ignoredConcepts = { +algorithm = ocel; +ocel.ignoredConcepts = { "http://www.example.org/lymphography#Target1_NormalFind", "http://www.example.org/lymphography#Target2_Metastases", "http://www.example.org/lymphography#Target3_MalignLymph", "http://www.example.org/lymphography#Target4_Fibrosis" }; -//refexamples.useAllConstructor = false; -//refexamples.useExistsConstructor = true; -//refexamples.useNegation = false; -refexamples.noisePercentage = 16.0; +//ocel.useAllConstructor = false; +//ocel.useExistsConstructor = true; +//ocel.useNegation = false; +ocel.noisePercentage = 16.0; import("lymphography.owl"); Modified: trunk/examples/lymphography/lymphography_Class3.conf =================================================================== --- trunk/examples/lymphography/lymphography_Class3.conf 2011-08-10 13:54:06 UTC (rev 3024) +++ trunk/examples/lymphography/lymphography_Class3.conf 2011-08-10 14:19:01 UTC (rev 3025) @@ -17,18 +17,18 @@ */ -algorithm = refexamples; -refexamples.ignoredConcepts = { +algorithm = ocel; +ocel.ignoredConcepts = { "http://www.example.org/lymphography#Target1_NormalFind", "http://www.example.org/lymphography#Target2_Metastases", "http://www.example.org/lymphography#Target3_MalignLymph", "http://www.example.org/lymphography#Target4_Fibrosis" }; -refexamples.useAllConstructor = false; -refexamples.useExistsConstructor = true; -refexamples.useNegation = false; -refexamples.noisePercentage = 19.0; +ocel.useAllConstructor = false; +ocel.useExistsConstructor = true; +ocel.useNegation = false; +ocel.noisePercentage = 19.0; import("lymphography.owl"); /*Class3*/ Modified: trunk/examples/lymphography/lymphography_Class4.conf =================================================================== --- trunk/examples/lymphography/lymphography_Class4.conf 2011-08-10 13:54:06 UTC (rev 3024) +++ trunk/examples/lymphography/lymphography_Class4.conf 2011-08-10 14:19:01 UTC (rev 3025) @@ -15,18 +15,18 @@ a new experimental version of the refinement algorithm) */ -algorithm = refexamples; +algorithm = ocel; -refexamples.ignoredConcepts = { +ocel.ignoredConcepts = { "http://www.example.org/lymphography#Target1_NormalFind", "http://www.example.org/lymphography#Target2_Metastases", "http://www.example.org/lymphography#Target3_MalignLymph", "http://www.example.org/lymphography#Target4_Fibrosis" }; -refexamples.useAllConstructor = false; -refexamples.useExistsConstructor = true; -refexamples.useNegation = false; +ocel.useAllConstructor = false; +ocel.useExistsConstructor = true; +ocel.useNegation = false; import("lymphography.owl"); Modified: trunk/examples/mutagenesis/train1.conf =================================================================== --- trunk/examples/mutagenesis/train1.conf 2011-08-10 13:54:06 UTC (rev 3024) +++ trunk/examples/mutagenesis/train1.conf 2011-08-10 14:19:01 UTC (rev 3025) @@ -1,11 +1,11 @@ import("mutagenesis.owl"); reasoner = fastInstanceChecker; -algorithm = refexamples; -refexamples.noisePercentage = 30; -refexamples.startClass = "http://dl-learner.org/mutagenesis#Compound"; -refexamples.writeSearchTree = false; -refexamples.searchTreeFile = "log/mutagenesis/searchTree.log"; +algorithm = ocel; +ocel.noisePercentage = 30; +ocel.startClass = "http://dl-learner.org/mutagenesis#Compound"; +ocel.writeSearchTree = false; +ocel.searchTreeFile = "log/mutagenesis/searchTree.log"; +"http://dl-learner.org/mutagenesis#d1" +"http://dl-learner.org/mutagenesis#d10" Modified: trunk/examples/mutagenesis/train2.conf =================================================================== --- trunk/examples/mutagenesis/train2.conf 2011-08-10 13:54:06 UTC (rev 3024) +++ trunk/examples/mutagenesis/train2.conf 2011-08-10 14:19:01 UTC (rev 3025) @@ -1,11 +1,11 @@ import("mutagenesis.owl"); reasoner = fastInstanceChecker; -algorithm = refexamples; -refexamples.noisePercentage = 30; -refexamples.startClass = "http://dl-learner.org/mutagenesis#Compound"; -refexamples.writeSearchTree = false; -refexamples.searchTreeFile = "log/mutagenesis/searchTree.log"; +algorithm = ocel; +ocel.noisePercentage = 30; +ocel.startClass = "http://dl-learner.org/mutagenesis#Compound"; +ocel.writeSearchTree = false; +ocel.searchTreeFile = "log/mutagenesis/searchTree.log"; -"http://dl-learner.org/mutagenesis#d1" -"http://dl-learner.org/mutagenesis#d10" Modified: trunk/examples/semantic_bible/hasvalue_example.conf =================================================================== --- trunk/examples/semantic_bible/hasvalue_example.conf 2011-08-10 13:54:06 UTC (rev 3024) +++ trunk/examples/semantic_bible/hasvalue_example.conf 2011-08-10 14:19:01 UTC (rev 3025) @@ -4,7 +4,7 @@ import("NTNcombined.owl"); -refexamples.useHasValueConstructor = true; +ocel.useHasValueConstructor = true; +"http://semanticbible.org/ns/2006/NTNames#Hezron" +"http://semanticbible.org/ns/2006/NTNames#Jehoshaphat" Modified: trunk/examples/semantic_bible/hasvalue_simple.conf =================================================================== --- trunk/examples/semantic_bible/hasvalue_simple.conf 2011-08-10 13:54:06 UTC (rev 3024) +++ trunk/examples/semantic_bible/hasvalue_simple.conf 2011-08-10 14:19:01 UTC (rev 3025) @@ -1,7 +1,7 @@ import("hasvalue_simple.kb"); reasoner = owlAPIReasoner; -refexamples.useHasValueConstructor = true; +ocel.useHasValueConstructor = true; +a +b Modified: trunk/examples/semantic_bible/normal.conf =================================================================== --- trunk/examples/semantic_bible/normal.conf 2011-08-10 13:54:06 UTC (rev 3024) +++ trunk/examples/semantic_bible/normal.conf 2011-08-10 14:19:01 UTC (rev 3025) @@ -7,13 +7,13 @@ // export("arch.owl"); import("NTNcombined.owl"); -algorithm = refexamples; -refexamples.useAllConstructor = false; -refexamples.useNegation = false; -refexamples.useCardinalityRestrictions = false; +algorithm = ocel; +ocel.useAllConstructor = false; +ocel.useNegation = false; +ocel.useCardinalityRestrictions = false; -refexamples.guaranteeXgoodDescriptions = 20; -//refexamples.ignoredConcepts = {"http://semanticbible.org/ns/2006/NTNames#God"}; +ocel.guaranteeXgoodDescriptions = 20; +//ocel.ignoredConcepts = {"http://semanticbible.org/ns/2006/NTNames#God"}; //reasoner = fastInstanceChecker; reasoner = owlAPIReasoner; Modified: trunk/examples/semantic_bible/normal_long_retrieval_time.conf =================================================================== --- trunk/examples/semantic_bible/normal_long_retrieval_time.conf 2011-08-10 13:54:06 UTC (rev 3024) +++ trunk/examples/semantic_bible/normal_long_retrieval_time.conf 2011-08-10 14:19:01 UTC (rev 3025) @@ -7,13 +7,13 @@ // export("arch.owl"); import("NTNcombined.owl"); -algorithm = refexamples; -refexamples.useAllConstructor = true; -refexamples.useNegation = true; -refexamples.useCardinalityRestrictions = true; +algorithm = ocel; +ocel.useAllConstructor = true; +ocel.useNegation = true; +ocel.useCardinalityRestrictions = true; -refexamples.guaranteeXgoodDescriptions = 20; -//refexamples.ignoredConcepts = {"http://semanticbible.org/ns/2006/NTNames#God"}; +ocel.guaranteeXgoodDescriptions = 20; +//ocel.ignoredConcepts = {"http://semanticbible.org/ns/2006/NTNames#God"}; //reasoner = fastInstanceChecker; reasoner = owlAPIReasoner; Modified: trunk/examples/semantic_bible/sparqlbible.conf =================================================================== --- trunk/examples/semantic_bible/sparqlbible.conf 2011-08-10 13:54:06 UTC (rev 3024) +++ trunk/examples/semantic_bible/sparqlbible.conf 2011-08-10 14:19:01 UTC (rev 3025) @@ -8,12 +8,12 @@ sparql.predefinedEndpoint = "LOCALJOSEKIBIBLE"; import("lalala","SPARQL"); -algorithm = refexamples; -refexamples.useAllConstructor = false; -refexamples.useNegation = false; -refexamples.useCardinalityRestrictions = false; -refexamples.guaranteeXgoodDescriptions = 30; -//refexamples.ignoredConcepts = {"http://semanticbible.org/ns/2006/NTNames#God"}; +algorithm = ocel; +ocel.useAllConstructor = false; +ocel.useNegation = false; +ocel.useCardinalityRestrictions = false; +ocel.guaranteeXgoodDescriptions = 30; +//ocel.ignoredConcepts = {"http://semanticbible.org/ns/2006/NTNames#God"}; //reasoner = fastInstanceChecker; reasoner = owlAPIReasoner; Modified: trunk/examples/semantic_bible/woman.conf =================================================================== --- trunk/examples/semantic_bible/woman.conf 2011-08-10 13:54:06 UTC (rev 3024) +++ trunk/examples/semantic_bible/woman.conf 2011-08-10 14:19:01 UTC (rev 3025) @@ -4,13 +4,13 @@ import("NTNcombined.owl"); -algorithm = refexamples; -refexamples.useAllConstructor = false; -refexamples.useNegation = false; -refexamples.useCardinalityRestrictions = false; +algorithm = ocel; +ocel.useAllConstructor = false; +ocel.useNegation = false; +ocel.useCardinalityRestrictions = false; -refexamples.guaranteeXgoodDescriptions = 20; -//refexamples.ignoredConcepts = {"http://semanticbible.org/ns/2006/NTNames#God"}; +ocel.guaranteeXgoodDescriptions = 20; +//ocel.ignoredConcepts = {"http://semanticbible.org/ns/2006/NTNames#God"}; reasoner = fastInstanceChecker; //reasoner = owlAPIReasoner; Modified: trunk/examples/sparql/Aristotle.conf =================================================================== --- trunk/examples/sparql/Aristotle.conf 2011-08-10 13:54:06 UTC (rev 3024) +++ trunk/examples/sparql/Aristotle.conf 2011-08-10 14:19:01 UTC (rev 3025) @@ -15,7 +15,7 @@ sparql.predefinedEndpoint = "DBPEDIA"; import("http://dbpedia.org/sparql","SPARQL"); -algorithm = refexamples; +algorithm = ocel; reasoner = fastInstanceChecker; sparql.instances = { Modified: trunk/examples/sparql/AristotlePos.conf =================================================================== --- trunk/examples/sparql/AristotlePos.conf 2011-08-10 13:54:06 UTC (rev 3024) +++ trunk/examples/sparql/AristotlePos.conf 2011-08-10 14:19:01 UTC (rev 3025) @@ -16,7 +16,7 @@ import("http://dbpedia.openlinksw.com:8890/sparql","SPARQL"); -algorithm = refexamples; +algorithm = ocel; reasoner = fastInstanceChecker; // comment this out to enable positive only learning // problem = posOnlyDefinitionLP; Modified: trunk/examples/sparql/actors2.conf =================================================================== --- trunk/examples/sparql/actors2.conf 2011-08-10 13:54:06 UTC (rev 3024) +++ trunk/examples/sparql/actors2.conf 2011-08-10 14:19:01 UTC (rev 3025) @@ -4,7 +4,7 @@ * Note: DBpedia is always subject to change, solutions will change over time */ -refexamples.useAllConstructor = false; +ocel.useAllConstructor = false; // recursion depth of extraction algorithm sparql.recursionDepth = 1; Modified: trunk/examples/sparql/britishPrimeMinisters.conf =================================================================== --- trunk/examples/sparql/britishPrimeMinisters.conf 2011-08-10 13:54:06 UTC (rev 3024) +++ trunk/examples/sparql/britishPrimeMinisters.conf 2011-08-10 14:19:01 UTC (rev 3025) @@ -21,16 +21,16 @@ // import("http://139.18.2.37:8890/sparql","SPARQL"); import("http://dbpedia.org/sparql","SPARQL"); -algorithm = refexamples; +algorithm = ocel; reasoner = fastInstanceChecker; -refexamples.useAllConstructor = false; -refexamples.useExistsConstructor = true; -refexamples.useCardinalityRestrictions = false; -refexamples.useNegation = false; -refexamples.maxExecutionTimeInSeconds = 10; +ocel.useAllConstructor = false; +ocel.useExistsConstructor = true; +ocel.useCardinalityRestrictions = false; +ocel.useNegation = false; +ocel.maxExecutionTimeInSeconds = 10; -//refexamples.ignoredConcepts={"http://dbpedia.org/class/yago/Abstainer109758173"}; +//ocel.ignoredConcepts={"http://dbpedia.org/class/yago/Abstainer109758173"}; sparql.instances = { "http://dbpedia.org/resource/Benjamin_Netanyahu" Modified: trunk/examples/sparql/govtrack.conf =================================================================== --- trunk/examples/sparql/govtrack.conf 2011-08-10 13:54:06 UTC (rev 3024) +++ trunk/examples/sparql/govtrack.conf 2011-08-10 14:19:01 UTC (rev 3025) @@ -11,10 +11,10 @@ sparql.saveExtractedFragment = true; sparql.dissolveBlankNodes = false; -algorithm = refexamples; -refexamples.ignoredRoles = { "http://www.w3.org/2002/07/owl#sameAs"}; -refexamples.useHasValueConstructor = true; -refexamples.valueFrequencyThreshold = 1; +algorithm = ocel; +ocel.ignoredRoles = { "http://www.w3.org/2002/07/owl#sameAs"}; +ocel.useHasValueConstructor = true; +ocel.valueFrequencyThreshold = 1; reasoner = fastInstanceChecker; Modified: trunk/examples/sparql/scrobble.conf =================================================================== --- trunk/examples/sparql/scrobble.conf 2011-08-10 13:54:06 UTC (rev 3024) +++ trunk/examples/sparql/scrobble.conf 2011-08-10 14:19:01 UTC (rev 3025) @@ -23,15 +23,15 @@ sparql.predefinedEndpoint = "MUSICBRAINZ"; sparql.saveExtractedFragment = true; -algorithm = refexamples; -refexamples.useNegation = false; -refexamples.useAllConstructor = false; -refexamples.useCardinalityRestrictions = false; -refexamples.maxExecutionTimeInSeconds = 10; +algorithm = ocel; +ocel.useNegation = false; +ocel.useAllConstructor = false; +ocel.useCardinalityRestrictions = false; +ocel.maxExecutionTimeInSeconds = 10; -refexamples.writeSearchTree = true; -refexamples.searchTreeFile = "log/searchtree.txt"; -// refexamples.replaceSearchTree = true; +ocel.writeSearchTree = true; +ocel.searchTreeFile = "log/searchtree.txt"; +// ocel.replaceSearchTree = true; reasoner = fastInstanceChecker; Modified: trunk/examples/swore/swore.conf =================================================================== --- trunk/examples/swore/swore.conf 2011-08-10 13:54:06 UTC (rev 3024) +++ trunk/examples/swore/swore.conf 2011-08-10 14:19:01 UTC (rev 3025) @@ -10,22 +10,22 @@ import("swore.rdf"); // ignore class for which we want to learn a definition -refexamples.ignoredConcepts = { "http://ns.softwiki.de/req/Goal" }; +ocel.ignoredConcepts = { "http://ns.softwiki.de/req/Goal" }; // we usually have a configurable minimum accuracy and should set noise to 100 - (min. accuracy)/2 // because min. accuracy is recommended to be 90%, we set the noise value to 5% -refexamples.noisePercentage = 5; +ocel.noisePercentage = 5; // we do not want to terminate when the noise level is reached -refexamples.terminateOnNoiseReached = false; +ocel.terminateOnNoiseReached = false; // maximum execution time should be sufficiently low value (because the user has to wait for the result) -refexamples.maxExecutionTimeInSeconds = 20; +ocel.maxExecutionTimeInSeconds = 20; // negations are penalised, because they are often not desired, e.g. // $superclass AND NOT $neighbourclass1 AND NOT $neighbourclass2 is // one of the patterns which is learned but only sometimes/rarely useful -refexamples.negationPenalty = 2; +ocel.negationPenalty = 2; +"http://ns.softwiki.de/req/determineCoreRequirements" +"http://ns.softwiki.de/req/determineSystemRequirements" Modified: trunk/interfaces/src/main/java/org/dllearner/cli/ConfMapper.java =================================================================== --- trunk/interfaces/src/main/java/org/dllearner/cli/ConfMapper.java 2011-08-10 13:54:06 UTC (rev 3024) +++ trunk/interfaces/src/main/java/org/dllearner/cli/ConfMapper.java 2011-08-10 14:19:01 UTC (rev 3025) @@ -105,7 +105,7 @@ learningAlgorithmMapping.put("bruteForce", BruteForceLearner.class); learningAlgorithmMapping.put("gp", GP.class); learningAlgorithmMapping.put("refinement", ROLearner.class); - learningAlgorithmMapping.put("refexamples", OCEL.class); +// learningAlgorithmMapping.put("refexamples", OCEL.class); learningAlgorithmMapping.put("ocel", OCEL.class); learningAlgorithmMapping.put("el", ELLearningAlgorithm.class); learningAlgorithmMapping.put("disjunctiveEL", ELLearningAlgorithmDisjunctive.class); Modified: trunk/test/alzheimer/train1.conf =================================================================== --- trunk/test/alzheimer/train1.conf 2011-08-10 13:54:06 UTC (rev 3024) +++ trunk/test/alzheimer/train1.conf 2011-08-10 14:19:01 UTC (rev 3025) @@ -1,11 +1,11 @@ import("alzheimer.owl"); reasoner = fastInstanceChecker; -algorithm = refexamples; -refexamples.noisePercentage = 15; -refexamples.startClass = "http://dl-learner.org/alzheimer#Drug"; -refexamples.writeSearchTree = false; -refexamples.searchTreeFile = "log/alzheimer/searchTree.log"; +algorithm = ocel; +ocel.noisePercentage = 15; +ocel.startClass = "http://dl-learner.org/alzheimer#Drug"; +ocel.writeSearchTree = false; +ocel.searchTreeFile = "log/alzheimer/searchTree.log"; -"http://dl-learner.org/alzheimer#b1" +"http://dl-learner.org/alzheimer#g1" Modified: trunk/test/alzheimer/train2.conf =================================================================== --- trunk/test/alzheimer/train2.conf 2011-08-10 13:54:06 UTC (rev 3024) +++ trunk/test/alzheimer/train2.conf 2011-08-10 14:19:01 UTC (rev 3025) @@ -1,11 +1,11 @@ import("alzheimer.owl"); reasoner = fastInstanceChecker; -algorithm = refexamples; -refexamples.noisePercentage = 15; -refexamples.startClass = "http://dl-learner.org/alzheimer#Drug"; -refexamples.writeSearchTree = false; -refexamples.searchTreeFile = "log/alzheimer/searchTree.log"; +algorithm = ocel; +ocel.noisePercentage = 15; +ocel.startClass = "http://dl-learner.org/alzheimer#Drug"; +ocel.writeSearchTree = false; +ocel.searchTreeFile = "log/alzheimer/searchTree.log"; +"http://dl-learner.org/alzheimer#e1" -"http://dl-learner.org/alzheimer#f1" Modified: trunk/test/alzheimer/train3.conf =================================================================== --- trunk/test/alzheimer/train3.conf 2011-08-10 13:54:06 UTC (rev 3024) +++ trunk/test/alzheimer/train3.conf 2011-08-10 14:19:01 UTC (rev 3025) @@ -1,11 +1,11 @@ import("alzheimer.owl"); reasoner = fastInstanceChecker; -algorithm = refexamples; -refexamples.noisePercentage = 15; -refexamples.startClass = "http://dl-learner.org/alzheimer#Drug"; -refexamples.writeSearchTree = false; -refexamples.searchTreeFile = "log/alzheimer/searchTree.log"; +algorithm = ocel; +ocel.noisePercentage = 15; +ocel.startClass = "http://dl-learner.org/alzheimer#Drug"; +ocel.writeSearchTree = false; +ocel.searchTreeFile = "log/alzheimer/searchTree.log"; -"http://dl-learner.org/alzheimer#a1" -"http://dl-learner.org/alzheimer#b1" Modified: trunk/test/alzheimer/train4.conf =================================================================== --- trunk/test/alzheimer/train4.conf 2011-08-10 13:54:06 UTC (rev 3024) +++ trunk/test/alzheimer/train4.conf 2011-08-10 14:19:01 UTC (rev 3025) @@ -1,11 +1,11 @@ import("alzheimer.owl"); reasoner = fastInstanceChecker; -algorithm = refexamples; -refexamples.noisePercentage = 15; -refexamples.startClass = "http://dl-learner.org/alzheimer#Drug"; -refexamples.writeSearchTree = false; -refexamples.searchTreeFile = "log/alzheimer/searchTree.log"; +algorithm = ocel; +ocel.noisePercentage = 15; +ocel.startClass = "http://dl-learner.org/alzheimer#Drug"; +ocel.writeSearchTree = false; +ocel.searchTreeFile = "log/alzheimer/searchTree.log"; -"http://dl-learner.org/alzheimer#b1" -"http://dl-learner.org/alzheimer#f1" Modified: trunk/test/breasttissue/train1.conf =================================================================== --- trunk/test/breasttissue/train1.conf 2011-08-10 13:54:06 UTC (rev 3024) +++ trunk/test/breasttissue/train1.conf 2011-08-10 14:19:01 UTC (rev 3025) @@ -1,11 +1,11 @@ import("breasttissue.owl"); reasoner = fastInstanceChecker; -algorithm = refexamples; -refexamples.noisePercentage = 30; -refexamples.startClass = "http://dl-learner.org/breasttissue#Patient"; -refexamples.writeSearchTree = false; -refexamples.searchTreeFile = "log/breasttissue/searchTree.log"; +algorithm = ocel; +ocel.noisePercentage = 30; +ocel.startClass = "http://dl-learner.org/breasttissue#Patient"; +ocel.writeSearchTree = false; +ocel.searchTreeFile = "log/breasttissue/searchTree.log"; -"http://dl-learner.org/breasttissue#Patient102" -"http://dl-learner.org/breasttissue#Patient103" Modified: trunk/test/breasttissue/train2.conf =================================================================== --- trunk/test/breasttissue/train2.conf 2011-08-10 13:54:06 UTC (rev 3024) +++ trunk/test/breasttissue/train2.conf 2011-08-10 14:19:01 UTC (rev 3025) @@ -1,11 +1,11 @@ import("breasttissue.owl"); reasoner = fastInstanceChecker; -algorithm = refexamples; -refexamples.noisePercentage = 30; -refexamples.startClass = "http://dl-learner.org/breasttissue#Patient"; -refexamples.writeSearchTree = false; -refexamples.searchTreeFile = "log/breasttissue/searchTree.log"; +algorithm = ocel; +ocel.noisePercentage = 30; +ocel.startClass = "http://dl-learner.org/breasttissue#Patient"; +ocel.writeSearchTree = false; +ocel.searchTreeFile = "log/breasttissue/searchTree.log"; -"http://dl-learner.org/breasttissue#Patient102" -"http://dl-learner.org/breasttissue#Patient103" Modified: trunk/test/breasttissue/train3.conf =================================================================== --- trunk/test/breasttissue/train3.conf 2011-08-10 13:54:06 UTC (rev 3024) +++ trunk/test/breasttissue/train3.conf 2011-08-10 14:19:01 UTC (rev 3025) @@ -1,11 +1,11 @@ import("breasttissue.owl"); reasoner = fastInstanceChecker; -algorithm = refexamples; -refexamples.noisePercentage = 30; -refexamples.startClass = "http://dl-learner.org/breasttissue#Patient"; -refexamples.writeSearchTree = false; -refexamples.searchTreeFile = "log/breasttissue/searchTree.log"; +algorithm = ocel; +ocel.noisePercentage = 30; +ocel.startClass = "http://dl-learner.org/breasttissue#Patient"; +ocel.writeSearchTree = false; +ocel.searchTreeFile = "log/breasttissue/searchTree.log"; -"http://dl-learner.org/breasttissue#Patient102" -"http://dl-learner.org/breasttissue#Patient103" Modified: trunk/test/breasttissue/train4.conf =================================================================== --- trunk/test/breasttissue/train4.conf 2011-08-10 13:54:06 UTC (rev 3024) +++ trunk/test/breasttissue/train4.conf 2011-08-10 14:19:01 UTC (rev 3025) @@ -1,11 +1,11 @@ import("breasttissue.owl"); reasoner = fastInstanceChecker; -algorithm = refexamples; -refexamples.noisePercentage = 30; -refexamples.startClass = "http://dl-learner.org/breasttissue#Patient"; -refexamples.writeSearchTree = false; -refexamples.searchTreeFile = "log/breasttissue/searchTree.log"; +algorithm = ocel; +ocel.noisePercentage = 30; +ocel.startClass = "http://dl-learner.org/breasttissue#Patient"; +ocel.writeSearchTree = false; +ocel.searchTreeFile = "log/breasttissue/searchTree.log"; -"http://dl-learner.org/breasttissue#Patient102" -"http://dl-learner.org/breasttissue#Patient103" Modified: trunk/test/breasttissue/train5.conf =================================================================== --- trunk/test/breasttissue/train5.conf 2011-08-10 13:54:06 UTC (rev 3024) +++ trunk/test/breasttissue/train5.conf 2011-08-10 14:19:01 UTC (rev 3025) @@ -1,11 +1,11 @@ import("breasttissue.owl"); reasoner = fastInstanceChecker; -algorithm = refexamples; -refexamples.noisePercentage = 30; -refexamples.startClass = "http://dl-learner.org/breasttissue#Patient"; -refexamples.writeSearchTree = false; -refexamples.searchTreeFile = "log/breasttissue/searchTree.log"; +algorithm = ocel; +ocel.noisePercentage = 30; +ocel.startClass = "http://dl-learner.org/breasttissue#Patient"; +ocel.writeSearchTree = false; +ocel.searchTreeFile = "log/breasttissue/searchTree.log"; -"http://dl-learner.org/breasttissue#Patient102" -"http://dl-learner.org/breasttissue#Patient103" Modified: trunk/test/breasttissue/train6.conf =================================================================== --- trunk/test/breasttissue/train6.conf 2011-08-10 13:54:06 UTC (rev 3024) +++ trunk/test/breasttissue/train6.conf 2011-08-10 14:19:01 UTC (rev 3025) @@ -1,11 +1,11 @@ import("breasttissue.owl"); reasoner = fastInstanceChecker; -algorithm = refexamples; -refexamples.noisePercentage = 30; -refexamples.startClass = "http://dl-learner.org/breasttissue#Patient"; -refexamples.writeSearchTree = false; -refexamples.searchTreeFile = "log/breasttissue/searchTree.log"; +algorithm = ocel; +ocel.noisePercentage = 30; +ocel.startClass = "http://dl-learner.org/breasttissue#Patient"; +ocel.writeSearchTree = false; +ocel.searchTreeFile = "log/breasttissue/searchTree.log"; +"http://dl-learner.org/breasttissue#Patient102" +"http://dl-learner.org/breasttissue#Patient103" Modified: trunk/test/breasttissue/train7.conf =================================================================== --- trunk/test/breasttissue/train7.conf 2011-08-10 13:54:06 UTC (rev 3024) +++ trunk/test/breasttissue/train7.conf 2011-08-10 14:19:01 UTC (rev 3025) @@ -1,11 +1,11 @@ import("breasttissue.owl"); reasoner = fastInstanceChecker; -algorithm = refexamples; -refexamples.noisePercentage = 30; -refexamples.startClass = "http://dl-learner.org/breasttissue#Patient"; -refexamples.writeSearchTree = false; -refexamples.searchTreeFile = "log/breasttissue/searchTree.log"; +algorithm = ocel; +ocel.noisePercentage = 30; +ocel.startClass = "http://dl-learner.org/breasttissue#Patient"; +ocel.writeSearchTree = false; +ocel.searchTreeFile = "log/breasttissue/searchTree.log"; -"http://dl-learner.org/breasttissue#Patient102" -"http://dl-learner.org/breasttissue#Patient103" Modified: trunk/test/cardiotocography/train1.conf =================================================================== --- trunk/test/cardiotocography/train1.conf 2011-08-10 13:54:06 UTC (rev 3024) +++ trunk/test/cardiotocography/train1.conf 2011-08-10 14:19:01 UTC (rev 3025) @@ -1,11 +1,11 @@ import("cardiotocography.owl"); reasoner = fastInstanceChecker; -algorithm = refexamples; -refexamples.noisePercentage = 30; -refexamples.startClass = "http://dl-learner.org/cardiotocography#Patient"; -refexamples.writeSearchTree = false; -refexamples.searchTreeFile = "log/cardiotocography/searchTree.log"; +algorithm = ocel; +ocel.noisePercentage = 30; +ocel.startClass = "http://dl-learner.org/cardiotocography#Patient"; +ocel.writeSearchTree = false; +ocel.searchTreeFile = "log/cardiotocography/searchTree.log"; +"http://dl-learner.org/cardiotocography#Patient756" +"http://dl-learner.org/cardiotocography#Patient755" Modified: trunk/test/cardiotocography/train10.conf =================================================================== --- trunk/test/cardiotocography/train10.conf 2011-08-10 13:54:06 UTC (rev 3024) +++ trunk/test/cardiotocography/train10.conf 2011-08-10 14:19:01 UTC (rev 3025) @@ -1,11 +1,11 @@ import("cardiotocography.owl"); reasoner = fastInstanceChecker; -algorithm = refexamples; -refexamples.noisePercentage = 30; -refexamples.startClass = "http://dl-learner.org/cardiotocography#Patient"; -refexamples.writeSearchTree = false; -refexamples.searchTreeFile = "log/cardiotocography/searchTree.log"; +algorithm = ocel; +ocel.noisePercentage = 30; +ocel.startClass = "http://dl-learner.org/cardiotocography#Patient"; +ocel.writeSearchTree = false; +ocel.searchTreeFile = "log/cardiotocography/searchTree.log"; -"http://dl-learner.org/cardiotocography#Patient756" -"http://dl-learner.org/cardiotocography#Patient755" Modified: trunk/test/cardiotocography/train11.conf =================================================================== --- trunk/test/cardiotocography/train11.conf 2011-08-10 13:54:06 UTC (rev 3024) +++ trunk/test/cardiotocography/train11.conf 2011-08-10 14:19:01 UTC (rev 3025) @@ -1,11 +1,11 @@ import("cardiotocography.owl"); reasoner = fastInstanceChecker; -algorithm = refexamples; -refexamples.noisePercentage = 30; -refexamples.startClass = "http://dl-learner.org/cardiotocography#Patient"; -refexamples.writeSearchTree = false; -refexamples.searchTreeFile = "log/cardiotocography/searchTree.log"; +algorithm = ocel; +ocel.noisePercentage = 30; +ocel.startClass = "http://dl-learner.org/cardiotocography#Patient"; +ocel.writeSearchTree = false; +ocel.searchTreeFile = "log/cardiotocography/searchTree.log"; +"http://dl-learner.org/cardiotocography#Patient756" +"http://dl-learner.org/cardiotocography#Patient755" Modified: trunk/test/cardiotocography/train12.conf =================================================================== --- trunk/test/cardiotocography/train12.conf 2011-08-10 13:54:06 UTC (rev 3024) +++ trunk/test/cardiotocography/train12.conf 2011-08-10 14:19:01 UTC (rev 3025) @@ -1,11 +1,11 @@ import("cardiotocography.owl"); reasoner = fastInstanceChecker; -algorithm = refexamples; -refexamples.noisePercentage = 30; -refexamples.startClass = "http://dl-learner.org/cardiotocography#Patient"; -refexamples.writeSearchTree = false; -refexamples.searchTreeFile = "log/cardiotocography/searchTree.log"; +algorithm = ocel; +ocel.noisePercentage = 30; +ocel.startClass = "http://dl-learner.org/cardiotocography#Patient"; +ocel.writeSearchTree = false; +ocel.searchTreeFile = "log/cardiotocography/searchTree.log"; -"http://dl-learner.org/cardiotocography#Patient756" -"http://dl-learner.org/cardiotocography#Patient755" Modified: trunk/test/cardiotocography/train13.conf =================================================================== --- trunk/test/cardiotocography/train13.conf 2011-08-10 13:54:06 UTC (rev 3024) +++ trunk/test/cardiotocography/train13.conf 2011-08-10 14:19:01 UTC (rev 3025) @@ -1,11 +1,11 @@ import("cardiotocography.owl"); reasoner = fastInstanceChecker; -algorithm = refexamples; -refexamples.noisePercentage = 30; -refexamples.startClass = "http://dl-learner.org/cardiotocography#Patient"; -refexamples.writeSearchTree = false; -refexamples.searchTreeFile = "log/cardiotocography/searchTree.log"; +algorithm = ocel; +ocel.noisePercentage = 30; +ocel.startClass = "http://dl-learner.org/cardiotocography#Patient"; +ocel.writeSearchTree = false; +ocel.searchTreeFile = "log/cardiotocography/searchTree.log"; -"http://dl-learner.org/cardiotocography#Patient756" -"http://dl-learner.org/cardiotocography#Patient755" Modified: trunk/test/cardiotocography/train2.conf =================================================================== --- trunk/test/cardiotocography/train2.conf 2011-08-10 13:54:06 UTC (rev 3024) +++ trunk/test/cardiotocography/train2.conf 2011-08-10 14:19:01 UTC (rev 3025) @@ -1,11 +1,11 @@ import("cardiotocography.owl"); reasoner = fastInstanceChecker; -algorithm = refexamples; -refexamples.noisePercentage = 30; -refexamples.startClass = "http://dl-learner.org/cardiotocography#Patient"; -refexamples.writeSearchTree = false; -refexamples.searchTreeFile = "log/cardiotocography/searchTree.log"; +algorithm = ocel; +ocel.noisePercentage = 30; +ocel.startClass = "http://dl-learner.org/cardiotocography#Patient"; +ocel.writeSearchTree = false; +ocel.searchTreeFile = "log/cardiotocography/searchTree.log"; -"http://dl-learner.org/cardiotocography#Patient756" -"http://dl-learner.org/cardiotocography#Patient755" Modified: trunk/test/cardiotocography/train3.conf =================================================================== --- trunk/test/cardiotocography/train3.conf 2011-08-10 13:54:06 UTC (rev 3024) +++ trunk/test/cardiotocography/train3.conf 2011-08-10 14:19:01 UTC (rev 3025) @@ -1,11 +1,11 @@ import("cardiotocography.owl"); reasoner = fastInstanceChecker; -algorithm = refexamples; -refexamples.noisePercentage = 30; -refexamples.startClass = "http://dl-learner.org/cardiotocography#Patient"; -refexamples.writeSearchTree = false; -refexamples.searchTreeFile = "log/cardiotocography/searchTree.log"; +algorithm = ocel; +ocel.noisePercentage = 30; +ocel.startClass = "http://dl-learner.org/cardiotocography#Patient"; +ocel.writeSearchTree = false; +ocel.searchTreeFile = "log/cardiotocography/searchTree.log"; -"http://dl-learner.org/cardiotocography#Patient756" -"http://dl-learner.org/cardiotocography#Patient755" Modified: trunk/test/cardiotocography/train4.conf =================================================================== --- trunk/test/cardiotocography/train4.conf 2011-08-10 13:54:06 UTC (rev 3024) +++ trunk/test/cardiotocography/train4.conf 2011-08-10 14:19:01 UTC (rev 3025) @@ -1,11 +1,11 @@ import("cardiotocography.owl"); reasoner = fastInstanceChecker; -algorithm = refexamples; -refexamples.noisePercentage = 30; -refexamples.startClass = "http://dl-learner.org/cardiotocography#Patient"; -refexamples.writeSearchTree = false; -refexamples.searchTreeFile = "log/cardiotocography/searchTree.log"; +algorithm = ocel; +ocel.noisePercentage = 30; +ocel.startClass = "http://dl-learner.org/cardiotocography#Patient"; +ocel.writeSearchTree = false; +ocel.searchTreeFile = "log/cardiotocography/searchTree.log"; -"http://dl-learner.org/cardiotocography#Patient756" -"http://dl-learner.org/cardiotocography#Patient755" Modified: trunk/test/cardiotocography/train5.conf =================================================================== --- trunk/test/cardiotocography/train5.conf 2011-08-10 13:54:06 UTC (rev 3024) +++ trunk/test/cardiotocography/train5.conf 2011-08-10 14:19:01 UTC (rev 3025) @@ -1,11 +1,11 @@ import("cardiotocography.owl"); reasoner = fastInstanceChecker; -algorithm = refexamples; -refexamples.noisePercentage = 30; -refexamples.startClass = "http://dl-learner.org/cardiotocography#Patient"; -refexamples.writeSearchTree = false; -refexamples.searchTreeFile = "log/cardiotocography/searchTree.log"; +algorithm = ocel; +ocel.noisePercentage = 30; +ocel.startClass = "http://dl-learner.org/cardiotocography#Patient"; +ocel.writeSearchTree = false; +ocel.searchTreeFile = "log/cardiotocography/searchTree.log"; -"http://dl-learner.org/cardiotocography#Patient756" -"http://dl-learner.org/cardiotocography#Patient755" Modified: trunk/test/cardiotocography/train6.conf =================================================================== --- trunk/test/cardiotocography/train6.conf 2011-08-10 13:54:06 UTC (rev 3024) +++ trunk/test/cardiotocography/train6.conf 2011-08-10 14:19:01 UTC (rev 3025) @@ -1,11 +1,11 @@ import("cardiotocography.owl"); reasoner = fastInstanceChecker; -algorithm = refexamples; -refexamples.noisePercentage = 30; -refexamples.startClass = "http://dl-learner.org/cardiotocography#Patient"; -refexamples.writeSearchTree = false; -refexamples.searchTreeFile = "log/cardiotocography/searchTree.log"; +algorithm = ocel; +ocel.noisePercentage = 30; +ocel.startClass = "http://dl-learner.org/cardiotocography#Patient"; +ocel.writeSearchTree = false; +ocel.searchTreeFile = "log/cardiotocography/searchTree.log"; -"http://dl-learner.org/cardiotocography#Patient756" -"http://dl-learner.org/cardiotocography#Patient755" Modified: trunk/test/cardiotocography/train7.conf =================================================================== --- trunk/test/cardiotocography/train7.conf 2011-08-10 13:54:06 UTC (rev 3024) +++ trunk/test/cardiotocography/train7.conf 2011-08-10 14:19:01 UTC (rev 3025) @@ -1,11 +1,11 @@ import("cardiotocography.owl"); reasoner = fastInstanceChecker; -algorithm = refexamples; -refexamples.noisePercentage = 30; -refexamples.startClass = "http://dl-learner.org/cardiotocography#Patient"; -refexamples.writeSearchTree = false; -refexamples.searchTreeFile = "log/cardiotocography/searchTree.log"; +algorithm = ocel; +ocel.noisePercentage = 30; +ocel.startClass = "http://dl-learner.org/cardiotocography#Patient"; +ocel.writeSearchTree = false; +ocel.searchTreeFile = "log/cardiotocography/searchTree.log"; -"http://dl-learner.org/cardiotocography#Patient756" -"http://dl-learner.org/cardiotocography#Patient755" Modified: trunk/test/cardiotocography/train8.conf =================================================================== --- trunk/test/cardiotocography/train8.conf 2011-08-10 13:54:06 UTC (rev 3024) +++ trunk/test/cardiotocography/train8.conf 2011-08-10 14:19:01 UTC (rev 3025) @@ -1,11 +1,11 @@ import("cardiotocography.owl"); reasoner = fastInstanceChecker; -algorithm = refexamples; -refexamples.noisePercentage = 30; -refexamples.startClass = "http://dl-learner.org/cardiotocography#Patient"; -refexamples.writeSearchTree = false; -refexamples.searchTreeFile = "log/cardiotocography/searchTree.log"; +algorithm = ocel; +ocel.noisePercentage = 30; +ocel.startClass = "http://dl-learner.org/cardiotocography#Patient"; +ocel.writeSearchTree = false; +ocel.searchTreeFile = "log/cardiotocography/searchTree.log"; -"http://dl-learner.org/cardiotocography#Patient756" -"http://dl-learner.org/cardiotocography#Patient755" Modified: trunk/test/cardiotocography/train9.conf =================================================================== --- trunk/test/cardiotocography/train9.conf 2011-08-10 13:54:06 UTC (rev 3024) +++ trunk/test/cardiotocography/train9.conf 2011-08-10 14:19:01 UTC (rev 3025) @@ -1,11 +1,11 @@ import("cardiotocography.owl"); reasoner = fastInstanceChecker; -algorithm = refexamples; -refexamples.noisePercentage = 30; -refexamples.startClass = "http://dl-learner.org/cardiotocography#Patient"; -refexamples.writeSearchTree = false; -refexamples.searchTreeFile = "log/cardiotocography/searchTree.log"; +algorithm = ocel; +ocel.noisePercentage = 30; +ocel.startClass = "http://dl-learner.org/cardiotocography#Patient"; +ocel.writeSearchTree = false; +ocel.searchTreeFile = "log/cardiotocography/searchTree.log"; -"http://dl-learner.org/cardiotocography#Patient756" -"http://dl-learner.org/cardiotocography#Patient755" Modified: trunk/test/heart/train.conf =================================================================== --- trunk/test/heart/train.conf 2011-08-10 13:54:06 UTC (rev 3024) +++ trunk/test/heart/train.conf 2011-08-10 14:19:01 UTC (rev 3025) @@ -1,11 +1,11 @@ import("heart.owl"); reasoner = fastInstanceChecker; -algorithm = refexamples; -refexamples.noisePercentage = 15; -refexamples.startClass = "http://dl-learner.org/heart#Patient"; -refexamples.writeSearchTree = false; -refexamples.searchTreeFile = "log/heart/searchTree.log"; +algorithm = ocel; +ocel.noisePercentage = 15; +ocel.startClass = "http://dl-learner.org/heart#Patient"; +ocel.writeSearchTree = false; +ocel.searchTreeFile = "log/heart/searchTree.log"; +"http://dl-learner.org/heart#Patient240" -"http://dl-learner.org/heart#Patient242" Modified: trunk/test/mammographic/train.conf =================================================================== --- trunk/test/mammographic/train.conf 2011-08-10 13:54:06 UTC (rev 3024) +++ trunk/test/mammographic/train.conf 2011-08-10 14:19:01 UTC (rev 3025) @@ -1,12 +1,12 @@ import("mammographic.owl"); reasoner = fastInstanceChecker; -// algorithm = refexamples; -refexamples.noisePercentage = 30; -refexamples.startClass = "http://dl-learner.org/mammographic#Patient"; -refexamples.writeSearchTree = true; -// refexamples.replaceSearchTree = true; -refexamples.searchTreeFile = "log/mammo_ocel_searchTree.log"; +// algorithm = ocel; +ocel.noisePercentage = 30; +ocel.startClass = "http://dl-learner.org/mammographic#Patient"; +ocel.writeSearchTree = true; +// ocel.replaceSearchTree = true; +ocel.searchTreeFile = "log/mammo_ocel_searchTree.log"; algorithm = celoe; celoe.noisePercentage = 22; Modified: trunk/test/parkinsons/train.conf =================================================================== --- trunk/test/parkinsons/train.conf 2011-08-10 13:54:06 UTC (rev 3024) +++ trunk/test/parkinsons/train.conf 2011-08-10 14:19:01 UTC (rev 3025) @@ -1,11 +1,11 @@ import("parkinsons.owl"); reasoner = fastInstanceChecker; -algorithm = refexamples; -refexamples.noisePercentage = 0; -refexamples.startClass = "http://dl-learner.org/parkinsons#Patient"; -refexamples.writeSearchTree = false; -refexamples.searchTreeFile = "log/parkinsons/searchTree.log"; +algorithm = ocel; +ocel.noisePercentage = 0; +ocel.startClass = "http://dl-learner.org/parkinsons#Patient"; +ocel.writeSearchTree = false; +ocel.searchTreeFile = "log/parkinsons/searchTree.log"; -"http://dl-learner.org/parkinsons#phon_R01_S39_6" -"http://dl-learner.org/parkinsons#phon_R01_S39_5" Modified: trunk/test/suramin/train.conf =================================================================== --- trunk/test/suramin/train.conf 2011-08-10 13:54:06 UTC (rev 3024) +++ trunk/test/suramin/train.conf 2011-08-10 14:19:01 UTC (rev 3025) @@ -1,11 +1,11 @@ import("suramin.owl"); reasoner = fastInstanceChecker; -algorithm = refexamples; -refexamples.noisePercentage = 31; -refexamples.startClass = "http://dl-learner.org/suramin#Compound"; -refexamples.writeSearchTree = false; -refexamples.searchTreeFile = "log/suramin/searchTree.log"; +algorithm = ocel; +ocel.noisePercentage = 31; +ocel.startClass = "http://dl-learner.org/suramin#Compound"; +ocel.writeSearchTree = false; +ocel.searchTreeFile = "log/suramin/searchTree.log"; -"http://dl-learner.org/suramin#cpd0" -"http://dl-learner.org/suramin#cpd1" Modified: trunk/test/testCaseSPARQLDescri... [truncated message content] |
From: <lor...@us...> - 2011-08-11 11:24:03
|
Revision: 3028 http://dl-learner.svn.sourceforge.net/dl-learner/?rev=3028&view=rev Author: lorenz_b Date: 2011-08-11 11:23:56 +0000 (Thu, 11 Aug 2011) Log Message: ----------- Renamed algorithm. Added algorithm for irreflexive property axioms. Modified Paths: -------------- trunk/components-core/src/main/java/org/dllearner/algorithms/properties/InverseFunctionalObjectPropertyAxiomLearner.java trunk/components-core/src/main/java/org/dllearner/algorithms/properties/ReflexiveObjectPropertyAxiomLearner.java trunk/components-core/src/main/java/org/dllearner/core/ComponentManager.java trunk/components-core/src/main/java/org/dllearner/core/owl/PropertyAxiomVisitor.java trunk/components-core/src/main/java/org/dllearner/utilities/owl/OWLAPIAxiomConvertVisitor.java trunk/components-core/src/test/java/org/dllearner/test/junit/PropertyLearningTest.java trunk/scripts/src/main/java/org/dllearner/scripts/evaluation/EnrichmentEvaluation.java Added Paths: ----------- trunk/components-core/src/main/java/org/dllearner/algorithms/properties/IrreflexiveObjectPropertyAxiomLearner.java trunk/components-core/src/main/java/org/dllearner/algorithms/properties/ObjectPropertyRangeAxiomLearner.java trunk/components-core/src/main/java/org/dllearner/core/owl/AsymmetricObjectPropertyAxiom.java trunk/components-core/src/main/java/org/dllearner/core/owl/IrreflexiveObjectPropertyAxiom.java Removed Paths: ------------- trunk/components-core/src/main/java/org/dllearner/algorithms/properties/PropertyRangeAxiomLearner.java Modified: trunk/components-core/src/main/java/org/dllearner/algorithms/properties/InverseFunctionalObjectPropertyAxiomLearner.java =================================================================== --- trunk/components-core/src/main/java/org/dllearner/algorithms/properties/InverseFunctionalObjectPropertyAxiomLearner.java 2011-08-11 07:04:39 UTC (rev 3027) +++ trunk/components-core/src/main/java/org/dllearner/algorithms/properties/InverseFunctionalObjectPropertyAxiomLearner.java 2011-08-11 11:23:56 UTC (rev 3028) @@ -4,8 +4,8 @@ import java.util.Collections; import java.util.List; +import org.dllearner.core.AbstractComponent; import org.dllearner.core.AxiomLearningAlgorithm; -import org.dllearner.core.AbstractComponent; import org.dllearner.core.ComponentAnn; import org.dllearner.core.ComponentInitException; import org.dllearner.core.EvaluatedAxiom; @@ -14,7 +14,7 @@ import org.dllearner.core.config.ObjectPropertyEditor; import org.dllearner.core.configurators.Configurator; import org.dllearner.core.owl.Axiom; -import org.dllearner.core.owl.FunctionalObjectPropertyAxiom; +import org.dllearner.core.owl.InverseFunctionalObjectPropertyAxiom; import org.dllearner.core.owl.ObjectProperty; import org.dllearner.kb.SparqlEndpointKS; import org.dllearner.kb.sparql.ExtendedQueryEngineHTTP; @@ -84,7 +84,7 @@ currentlyBestAxioms = new ArrayList<EvaluatedAxiom>(); //check if property is already declared as symmetric in knowledge base - String query = String.format("ASK {<%s> a <%s>}", propertyToDescribe, OWL.FunctionalProperty.getURI()); + String query = String.format("ASK {<%s> a <%s>}", propertyToDescribe, OWL.InverseFunctionalProperty.getURI()); boolean declaredAsFunctional = executeAskQuery(query); if(declaredAsFunctional) { logger.info("Property is already declared as functional in knowledge base."); @@ -110,7 +110,7 @@ } if(all > 0){ double frac = (all - notFunctional) / (double)all; - currentlyBestAxioms.add(new EvaluatedAxiom(new FunctionalObjectPropertyAxiom(propertyToDescribe), new AxiomScore(frac))); + currentlyBestAxioms.add(new EvaluatedAxiom(new InverseFunctionalObjectPropertyAxiom(propertyToDescribe), new AxiomScore(frac))); } logger.info("...finished in {}ms.", (System.currentTimeMillis()-startTime)); Added: trunk/components-core/src/main/java/org/dllearner/algorithms/properties/IrreflexiveObjectPropertyAxiomLearner.java =================================================================== --- trunk/components-core/src/main/java/org/dllearner/algorithms/properties/IrreflexiveObjectPropertyAxiomLearner.java (rev 0) +++ trunk/components-core/src/main/java/org/dllearner/algorithms/properties/IrreflexiveObjectPropertyAxiomLearner.java 2011-08-11 11:23:56 UTC (rev 3028) @@ -0,0 +1,175 @@ +package org.dllearner.algorithms.properties; + +import java.util.ArrayList; +import java.util.Collections; +import java.util.List; + +import org.dllearner.core.AbstractComponent; +import org.dllearner.core.AxiomLearningAlgorithm; +import org.dllearner.core.ComponentAnn; +import org.dllearner.core.ComponentInitException; +import org.dllearner.core.EvaluatedAxiom; +import org.dllearner.core.config.ConfigOption; +import org.dllearner.core.config.IntegerEditor; +import org.dllearner.core.config.ObjectPropertyEditor; +import org.dllearner.core.configurators.Configurator; +import org.dllearner.core.owl.Axiom; +import org.dllearner.core.owl.IrreflexiveObjectPropertyAxiom; +import org.dllearner.core.owl.ObjectProperty; +import org.dllearner.kb.SparqlEndpointKS; +import org.dllearner.kb.sparql.ExtendedQueryEngineHTTP; +import org.dllearner.learningproblems.AxiomScore; +import org.dllearner.reasoning.SPARQLReasoner; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import com.hp.hpl.jena.query.QuerySolution; +import com.hp.hpl.jena.query.ResultSet; +import com.hp.hpl.jena.sparql.engine.http.QueryEngineHTTP; +import com.hp.hpl.jena.vocabulary.OWL2; + +@ComponentAnn(name="irreflexive objectproperty axiom learner") +public class IrreflexiveObjectPropertyAxiomLearner extends AbstractComponent implements AxiomLearningAlgorithm { + + private static final Logger logger = LoggerFactory.getLogger(IrreflexiveObjectPropertyAxiomLearner.class); + + @ConfigOption(name="propertyToDescribe", description="", propertyEditorClass=ObjectPropertyEditor.class) + private ObjectProperty propertyToDescribe; + @ConfigOption(name="maxExecutionTimeInSeconds", description="", propertyEditorClass=IntegerEditor.class) + private int maxExecutionTimeInSeconds = 10; + @ConfigOption(name="maxFetchedRows", description="The maximum number of rows fetched from the endpoint to approximate the result.", propertyEditorClass=IntegerEditor.class) + private int maxFetchedRows = 0; + + private SPARQLReasoner reasoner; + private SparqlEndpointKS ks; + + private List<EvaluatedAxiom> currentlyBestAxioms; + private long startTime; + private int fetchedRows; + + + public IrreflexiveObjectPropertyAxiomLearner(SparqlEndpointKS ks){ + this.ks = ks; + } + + public int getMaxExecutionTimeInSeconds() { + return maxExecutionTimeInSeconds; + } + + public void setMaxExecutionTimeInSeconds(int maxExecutionTimeInSeconds) { + this.maxExecutionTimeInSeconds = maxExecutionTimeInSeconds; + } + + public ObjectProperty getPropertyToDescribe() { + return propertyToDescribe; + } + + public void setPropertyToDescribe(ObjectProperty propertyToDescribe) { + this.propertyToDescribe = propertyToDescribe; + } + + public int getMaxFetchedRows() { + return maxFetchedRows; + } + + public void setMaxFetchedRows(int maxFetchedRows) { + this.maxFetchedRows = maxFetchedRows; + } + + @Override + public void start() { + logger.info("Start learning..."); + startTime = System.currentTimeMillis(); + fetchedRows = 0; + currentlyBestAxioms = new ArrayList<EvaluatedAxiom>(); + + //check if property is already declared as reflexive in knowledge base + String query = String.format("ASK {<%s> a <%s>}", propertyToDescribe, OWL2.IrreflexiveProperty.getURI()); + boolean declaredAsReflexive = executeAskQuery(query); + if(declaredAsReflexive) { + logger.info("Property is already declared as irreflexive in knowledge base."); + } + + //get all instance s with <s p o> + query = String.format("SELECT (COUNT(DISTINCT ?s) AS ?all) WHERE {?s <%s> ?o.}", propertyToDescribe); + ResultSet rs = executeQuery(query); + QuerySolution qs; + int all = 0; + while(rs.hasNext()){ + qs = rs.next(); + all = qs.getLiteral("all").getInt(); + + } + + //get number of instances s where not exists <s p s> + query = "SELECT (COUNT(DISTINCT ?s) AS ?irreflexive) WHERE {?s <%s> ?o. OPTIONAL{?s <%s> ?o1.FILTER(?s = ?o1)} FILTER(!BOUND(?o1))}"; + query = query.replace("%s", propertyToDescribe.getURI().toString()); + rs = executeQuery(query); + int irreflexive = 0; + while(rs.hasNext()){ + qs = rs.next(); + irreflexive = qs.getLiteral("irreflexive").getInt(); + } + + if(all > 0){ + double frac = irreflexive / (double)all; + currentlyBestAxioms.add(new EvaluatedAxiom(new IrreflexiveObjectPropertyAxiom(propertyToDescribe), new AxiomScore(frac))); + } + + logger.info("...finished in {}ms.", (System.currentTimeMillis()-startTime)); + } + + @Override + public List<Axiom> getCurrentlyBestAxioms(int nrOfAxioms) { + return currentlyBestAxioms.isEmpty() ? Collections.<Axiom>emptyList() : Collections.singletonList(currentlyBestAxioms.get(0).getAxiom()); + } + + @Override + public List<EvaluatedAxiom> getCurrentlyBestEvaluatedAxioms(int nrOfAxioms) { + return currentlyBestAxioms; + } + + @Override + public Configurator getConfigurator() { + // TODO Auto-generated method stub + return null; + } + + @Override + public void init() throws ComponentInitException { + reasoner = new SPARQLReasoner(ks); + } + + private boolean executeAskQuery(String query){ + logger.info("Sending query \n {}", query); + + QueryEngineHTTP queryExecution = new QueryEngineHTTP(ks.getEndpoint().getURL().toString(), query); + for (String dgu : ks.getEndpoint().getDefaultGraphURIs()) { + queryExecution.addDefaultGraph(dgu); + } + for (String ngu : ks.getEndpoint().getNamedGraphURIs()) { + queryExecution.addNamedGraph(ngu); + } + boolean result = queryExecution.execAsk(); + return result; + } + + /* + * Executes a SELECT query and returns the result. + */ + private ResultSet executeQuery(String query){ + logger.info("Sending query \n {}", query); + + ExtendedQueryEngineHTTP queryExecution = new ExtendedQueryEngineHTTP(ks.getEndpoint().getURL().toString(), query); + queryExecution.setTimeout(maxExecutionTimeInSeconds * 1000); + for (String dgu : ks.getEndpoint().getDefaultGraphURIs()) { + queryExecution.addDefaultGraph(dgu); + } + for (String ngu : ks.getEndpoint().getNamedGraphURIs()) { + queryExecution.addNamedGraph(ngu); + } + ResultSet resultSet = queryExecution.execSelect(); + return resultSet; + } + +} Copied: trunk/components-core/src/main/java/org/dllearner/algorithms/properties/ObjectPropertyRangeAxiomLearner.java (from rev 3023, trunk/components-core/src/main/java/org/dllearner/algorithms/properties/PropertyRangeAxiomLearner.java) =================================================================== --- trunk/components-core/src/main/java/org/dllearner/algorithms/properties/ObjectPropertyRangeAxiomLearner.java (rev 0) +++ trunk/components-core/src/main/java/org/dllearner/algorithms/properties/ObjectPropertyRangeAxiomLearner.java 2011-08-11 11:23:56 UTC (rev 3028) @@ -0,0 +1,246 @@ +package org.dllearner.algorithms.properties; + +import java.util.ArrayList; +import java.util.Comparator; +import java.util.HashMap; +import java.util.HashSet; +import java.util.Iterator; +import java.util.List; +import java.util.Map; +import java.util.Map.Entry; +import java.util.Set; +import java.util.SortedSet; +import java.util.TreeSet; + +import org.dllearner.core.AbstractComponent; +import org.dllearner.core.AxiomLearningAlgorithm; +import org.dllearner.core.ComponentAnn; +import org.dllearner.core.ComponentInitException; +import org.dllearner.core.EvaluatedAxiom; +import org.dllearner.core.config.ConfigOption; +import org.dllearner.core.config.IntegerEditor; +import org.dllearner.core.config.ObjectPropertyEditor; +import org.dllearner.core.configurators.Configurator; +import org.dllearner.core.owl.Axiom; +import org.dllearner.core.owl.DatatypeProperty; +import org.dllearner.core.owl.Description; +import org.dllearner.core.owl.Individual; +import org.dllearner.core.owl.NamedClass; +import org.dllearner.core.owl.ObjectProperty; +import org.dllearner.core.owl.ObjectPropertyRangeAxiom; +import org.dllearner.kb.SparqlEndpointKS; +import org.dllearner.kb.sparql.ExtendedQueryEngineHTTP; +import org.dllearner.kb.sparql.SparqlEndpoint; +import org.dllearner.learningproblems.AxiomScore; +import org.dllearner.reasoning.SPARQLReasoner; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import com.hp.hpl.jena.query.QuerySolution; +import com.hp.hpl.jena.query.ResultSet; + +@ComponentAnn(name="objectproperty range learner") +public class ObjectPropertyRangeAxiomLearner extends AbstractComponent implements AxiomLearningAlgorithm { + + private static final Logger logger = LoggerFactory.getLogger(ObjectPropertyRangeAxiomLearner.class); + + @ConfigOption(name="propertyToDescribe", description="", propertyEditorClass=ObjectPropertyEditor.class) + private ObjectProperty propertyToDescribe; + @ConfigOption(name="maxExecutionTimeInSeconds", description="", propertyEditorClass=IntegerEditor.class) + private int maxExecutionTimeInSeconds = 10; + @ConfigOption(name="maxFetchedRows", description="The maximum number of rows fetched from the endpoint to approximate the result.", propertyEditorClass=IntegerEditor.class) + private int maxFetchedRows = 0; + + private SPARQLReasoner reasoner; + private SparqlEndpointKS ks; + + private List<EvaluatedAxiom> currentlyBestAxioms; + private long startTime; + private int fetchedRows; + + public ObjectPropertyRangeAxiomLearner(SparqlEndpointKS ks){ + this.ks = ks; + } + + public int getMaxExecutionTimeInSeconds() { + return maxExecutionTimeInSeconds; + } + + public void setMaxExecutionTimeInSeconds(int maxExecutionTimeInSeconds) { + this.maxExecutionTimeInSeconds = maxExecutionTimeInSeconds; + } + + public ObjectProperty getPropertyToDescribe() { + return propertyToDescribe; + } + + public void setPropertyToDescribe(ObjectProperty propertyToDescribe) { + this.propertyToDescribe = propertyToDescribe; + } + + public int getMaxFetchedRows() { + return maxFetchedRows; + } + + public void setMaxFetchedRows(int maxFetchedRows) { + this.maxFetchedRows = maxFetchedRows; + } + + @Override + public void start() { + logger.info("Start learning..."); + startTime = System.currentTimeMillis(); + fetchedRows = 0; + currentlyBestAxioms = new ArrayList<EvaluatedAxiom>(); + //get existing range + Description existingRange = reasoner.getRange(propertyToDescribe); + logger.debug("Existing range: " + existingRange); + + //get objects with types + Map<Individual, Set<NamedClass>> individual2Types = new HashMap<Individual, Set<NamedClass>>(); + Map<Individual, Set<NamedClass>> newIndividual2Types; + boolean repeat = true; + while(!terminationCriteriaSatisfied() && repeat){ + newIndividual2Types = getObjectsWithTypes(fetchedRows); + individual2Types.putAll(newIndividual2Types); + currentlyBestAxioms = buildBestAxioms(individual2Types); + fetchedRows += 1000; + repeat = !newIndividual2Types.isEmpty(); + } + logger.info("...finished in {}ms.", (System.currentTimeMillis()-startTime)); + } + + @Override + public List<Axiom> getCurrentlyBestAxioms(int nrOfAxioms) { + List<Axiom> bestAxioms = new ArrayList<Axiom>(); + + Iterator<EvaluatedAxiom> it = currentlyBestAxioms.iterator(); + while(bestAxioms.size() < nrOfAxioms && it.hasNext()){ + bestAxioms.add(it.next().getAxiom()); + } + + return bestAxioms; + } + + @Override + public List<EvaluatedAxiom> getCurrentlyBestEvaluatedAxioms(int nrOfAxioms) { + int max = Math.min(currentlyBestAxioms.size(), nrOfAxioms); + + List<EvaluatedAxiom> bestAxioms = currentlyBestAxioms.subList(0, max); + + return bestAxioms; + } + + @Override + public Configurator getConfigurator() { + // TODO Auto-generated method stub + return null; + } + + @Override + public void init() throws ComponentInitException { + reasoner = new SPARQLReasoner(ks); + + } + + private boolean terminationCriteriaSatisfied(){ + boolean timeLimitExceeded = maxExecutionTimeInSeconds == 0 ? false : (System.currentTimeMillis() - startTime) >= maxExecutionTimeInSeconds * 1000; + boolean resultLimitExceeded = maxFetchedRows == 0 ? false : fetchedRows >= maxFetchedRows; + return timeLimitExceeded || resultLimitExceeded; + } + + private List<EvaluatedAxiom> buildBestAxioms(Map<Individual, Set<NamedClass>> individual2Types){ + List<EvaluatedAxiom> axioms = new ArrayList<EvaluatedAxiom>(); + Map<NamedClass, Integer> result = new HashMap<NamedClass, Integer>(); + for(Entry<Individual, Set<NamedClass>> entry : individual2Types.entrySet()){ + for(NamedClass nc : entry.getValue()){ + Integer cnt = result.get(nc); + if(cnt == null){ + cnt = Integer.valueOf(1); + } else { + cnt = Integer.valueOf(cnt + 1); + } + result.put(nc, cnt); + } + } + + EvaluatedAxiom evalAxiom; + for(Entry<NamedClass, Integer> entry : sortByValues(result)){ + evalAxiom = new EvaluatedAxiom(new ObjectPropertyRangeAxiom(propertyToDescribe, entry.getKey()), + new AxiomScore(entry.getValue() / (double)individual2Types.keySet().size())); + axioms.add(evalAxiom); + } + + return axioms; + } + + /* + * Returns the entries of the map sorted by value. + */ + private SortedSet<Entry<NamedClass, Integer>> sortByValues(Map<NamedClass, Integer> map){ + SortedSet<Entry<NamedClass, Integer>> sortedSet = new TreeSet<Map.Entry<NamedClass,Integer>>(new Comparator<Entry<NamedClass, Integer>>() { + + @Override + public int compare(Entry<NamedClass, Integer> value1, Entry<NamedClass, Integer> value2) { + if(value1.getValue() < value2.getValue()){ + return 1; + } else if(value2.getValue() < value1.getValue()){ + return -1; + } else { + return value1.getKey().compareTo(value2.getKey()); + } + } + }); + sortedSet.addAll(map.entrySet()); + return sortedSet; + } + + private Map<Individual, Set<NamedClass>> getObjectsWithTypes(int offset){ + Map<Individual, Set<NamedClass>> individual2Types = new HashMap<Individual, Set<NamedClass>>(); + int limit = 1000; + String query = String.format("SELECT DISTINCT ?ind ?type WHERE {?s <%s> ?ind. ?ind a ?type.} LIMIT %d OFFSET %d", propertyToDescribe.getName(), limit, offset); + ResultSet rs = executeQuery(query); + QuerySolution qs; + Individual ind; + Set<NamedClass> types; + while(rs.hasNext()){ + qs = rs.next(); + ind = new Individual(qs.getResource("ind").getURI()); + types = individual2Types.get(ind); + if(types == null){ + types = new HashSet<NamedClass>(); + individual2Types.put(ind, types); + } + types.add(new NamedClass(qs.getResource("type").getURI())); + } + return individual2Types; + } + + /* + * Executes a SELECT query and returns the result. + */ + private ResultSet executeQuery(String query){ + logger.info("Sending query \n {}", query); + + ExtendedQueryEngineHTTP queryExecution = new ExtendedQueryEngineHTTP(ks.getEndpoint().getURL().toString(), query); + queryExecution.setTimeout(maxExecutionTimeInSeconds * 1000); + for (String dgu : ks.getEndpoint().getDefaultGraphURIs()) { + queryExecution.addDefaultGraph(dgu); + } + for (String ngu : ks.getEndpoint().getNamedGraphURIs()) { + queryExecution.addNamedGraph(ngu); + } + ResultSet resultSet = queryExecution.execSelect(); + return resultSet; + } + + public static void main(String[] args) throws Exception{ + ObjectPropertyRangeAxiomLearner l = new ObjectPropertyRangeAxiomLearner(new SparqlEndpointKS(SparqlEndpoint.getEndpointDBpediaLiveAKSW())); + l.setPropertyToDescribe(new ObjectProperty("http://dbpedia.org/ontology/aircraftElectronic")); + l.setMaxExecutionTimeInSeconds(0); + l.init(); + l.start(); + System.out.println(l.getCurrentlyBestEvaluatedAxioms(5)); + } + +} Deleted: trunk/components-core/src/main/java/org/dllearner/algorithms/properties/PropertyRangeAxiomLearner.java =================================================================== --- trunk/components-core/src/main/java/org/dllearner/algorithms/properties/PropertyRangeAxiomLearner.java 2011-08-11 07:04:39 UTC (rev 3027) +++ trunk/components-core/src/main/java/org/dllearner/algorithms/properties/PropertyRangeAxiomLearner.java 2011-08-11 11:23:56 UTC (rev 3028) @@ -1,246 +0,0 @@ -package org.dllearner.algorithms.properties; - -import java.util.ArrayList; -import java.util.Comparator; -import java.util.HashMap; -import java.util.HashSet; -import java.util.Iterator; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; -import java.util.Set; -import java.util.SortedSet; -import java.util.TreeSet; - -import org.dllearner.core.AbstractComponent; -import org.dllearner.core.AxiomLearningAlgorithm; -import org.dllearner.core.ComponentAnn; -import org.dllearner.core.ComponentInitException; -import org.dllearner.core.EvaluatedAxiom; -import org.dllearner.core.config.ConfigOption; -import org.dllearner.core.config.IntegerEditor; -import org.dllearner.core.config.ObjectPropertyEditor; -import org.dllearner.core.configurators.Configurator; -import org.dllearner.core.owl.Axiom; -import org.dllearner.core.owl.DatatypeProperty; -import org.dllearner.core.owl.Description; -import org.dllearner.core.owl.Individual; -import org.dllearner.core.owl.NamedClass; -import org.dllearner.core.owl.ObjectProperty; -import org.dllearner.core.owl.ObjectPropertyRangeAxiom; -import org.dllearner.kb.SparqlEndpointKS; -import org.dllearner.kb.sparql.ExtendedQueryEngineHTTP; -import org.dllearner.kb.sparql.SparqlEndpoint; -import org.dllearner.learningproblems.AxiomScore; -import org.dllearner.reasoning.SPARQLReasoner; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -import com.hp.hpl.jena.query.QuerySolution; -import com.hp.hpl.jena.query.ResultSet; - -@ComponentAnn(name="objectproperty range learner") -public class PropertyRangeAxiomLearner extends AbstractComponent implements AxiomLearningAlgorithm { - - private static final Logger logger = LoggerFactory.getLogger(PropertyRangeAxiomLearner.class); - - @ConfigOption(name="propertyToDescribe", description="", propertyEditorClass=ObjectPropertyEditor.class) - private ObjectProperty propertyToDescribe; - @ConfigOption(name="maxExecutionTimeInSeconds", description="", propertyEditorClass=IntegerEditor.class) - private int maxExecutionTimeInSeconds = 10; - @ConfigOption(name="maxFetchedRows", description="The maximum number of rows fetched from the endpoint to approximate the result.", propertyEditorClass=IntegerEditor.class) - private int maxFetchedRows = 0; - - private SPARQLReasoner reasoner; - private SparqlEndpointKS ks; - - private List<EvaluatedAxiom> currentlyBestAxioms; - private long startTime; - private int fetchedRows; - - public PropertyRangeAxiomLearner(SparqlEndpointKS ks){ - this.ks = ks; - } - - public int getMaxExecutionTimeInSeconds() { - return maxExecutionTimeInSeconds; - } - - public void setMaxExecutionTimeInSeconds(int maxExecutionTimeInSeconds) { - this.maxExecutionTimeInSeconds = maxExecutionTimeInSeconds; - } - - public ObjectProperty getPropertyToDescribe() { - return propertyToDescribe; - } - - public void setPropertyToDescribe(ObjectProperty propertyToDescribe) { - this.propertyToDescribe = propertyToDescribe; - } - - public int getMaxFetchedRows() { - return maxFetchedRows; - } - - public void setMaxFetchedRows(int maxFetchedRows) { - this.maxFetchedRows = maxFetchedRows; - } - - @Override - public void start() { - logger.info("Start learning..."); - startTime = System.currentTimeMillis(); - fetchedRows = 0; - currentlyBestAxioms = new ArrayList<EvaluatedAxiom>(); - //get existing range - Description existingRange = reasoner.getRange(propertyToDescribe); - logger.debug("Existing range: " + existingRange); - - //get objects with types - Map<Individual, Set<NamedClass>> individual2Types = new HashMap<Individual, Set<NamedClass>>(); - Map<Individual, Set<NamedClass>> newIndividual2Types; - boolean repeat = true; - while(!terminationCriteriaSatisfied() && repeat){ - newIndividual2Types = getObjectsWithTypes(fetchedRows); - individual2Types.putAll(newIndividual2Types); - currentlyBestAxioms = buildBestAxioms(individual2Types); - fetchedRows += 1000; - repeat = !newIndividual2Types.isEmpty(); - } - logger.info("...finished in {}ms.", (System.currentTimeMillis()-startTime)); - } - - @Override - public List<Axiom> getCurrentlyBestAxioms(int nrOfAxioms) { - List<Axiom> bestAxioms = new ArrayList<Axiom>(); - - Iterator<EvaluatedAxiom> it = currentlyBestAxioms.iterator(); - while(bestAxioms.size() < nrOfAxioms && it.hasNext()){ - bestAxioms.add(it.next().getAxiom()); - } - - return bestAxioms; - } - - @Override - public List<EvaluatedAxiom> getCurrentlyBestEvaluatedAxioms(int nrOfAxioms) { - int max = Math.min(currentlyBestAxioms.size(), nrOfAxioms); - - List<EvaluatedAxiom> bestAxioms = currentlyBestAxioms.subList(0, max); - - return bestAxioms; - } - - @Override - public Configurator getConfigurator() { - // TODO Auto-generated method stub - return null; - } - - @Override - public void init() throws ComponentInitException { - reasoner = new SPARQLReasoner(ks); - - } - - private boolean terminationCriteriaSatisfied(){ - boolean timeLimitExceeded = maxExecutionTimeInSeconds == 0 ? false : (System.currentTimeMillis() - startTime) >= maxExecutionTimeInSeconds * 1000; - boolean resultLimitExceeded = maxFetchedRows == 0 ? false : fetchedRows >= maxFetchedRows; - return timeLimitExceeded || resultLimitExceeded; - } - - private List<EvaluatedAxiom> buildBestAxioms(Map<Individual, Set<NamedClass>> individual2Types){ - List<EvaluatedAxiom> axioms = new ArrayList<EvaluatedAxiom>(); - Map<NamedClass, Integer> result = new HashMap<NamedClass, Integer>(); - for(Entry<Individual, Set<NamedClass>> entry : individual2Types.entrySet()){ - for(NamedClass nc : entry.getValue()){ - Integer cnt = result.get(nc); - if(cnt == null){ - cnt = Integer.valueOf(1); - } else { - cnt = Integer.valueOf(cnt + 1); - } - result.put(nc, cnt); - } - } - - EvaluatedAxiom evalAxiom; - for(Entry<NamedClass, Integer> entry : sortByValues(result)){System.out.println(entry.getKey());System.out.println(entry.getValue()); - evalAxiom = new EvaluatedAxiom(new ObjectPropertyRangeAxiom(propertyToDescribe, entry.getKey()), - new AxiomScore(entry.getValue() / (double)individual2Types.keySet().size())); - axioms.add(evalAxiom); - } - - return axioms; - } - - /* - * Returns the entries of the map sorted by value. - */ - private SortedSet<Entry<NamedClass, Integer>> sortByValues(Map<NamedClass, Integer> map){ - SortedSet<Entry<NamedClass, Integer>> sortedSet = new TreeSet<Map.Entry<NamedClass,Integer>>(new Comparator<Entry<NamedClass, Integer>>() { - - @Override - public int compare(Entry<NamedClass, Integer> value1, Entry<NamedClass, Integer> value2) { - if(value1.getValue() < value2.getValue()){ - return 1; - } else if(value2.getValue() < value1.getValue()){ - return -1; - } else { - return value1.getKey().compareTo(value2.getKey()); - } - } - }); - sortedSet.addAll(map.entrySet()); - return sortedSet; - } - - private Map<Individual, Set<NamedClass>> getObjectsWithTypes(int offset){ - Map<Individual, Set<NamedClass>> individual2Types = new HashMap<Individual, Set<NamedClass>>(); - int limit = 1000; - String query = String.format("SELECT DISTINCT ?ind ?type WHERE {?s <%s> ?ind. ?ind a ?type.} LIMIT %d OFFSET %d", propertyToDescribe.getName(), limit, offset); - ResultSet rs = executeQuery(query); - QuerySolution qs; - Individual ind; - Set<NamedClass> types; - while(rs.hasNext()){ - qs = rs.next(); - ind = new Individual(qs.getResource("ind").getURI()); - types = individual2Types.get(ind); - if(types == null){ - types = new HashSet<NamedClass>(); - individual2Types.put(ind, types); - } - types.add(new NamedClass(qs.getResource("type").getURI())); - } - return individual2Types; - } - - /* - * Executes a SELECT query and returns the result. - */ - private ResultSet executeQuery(String query){ - logger.info("Sending query \n {}", query); - - ExtendedQueryEngineHTTP queryExecution = new ExtendedQueryEngineHTTP(ks.getEndpoint().getURL().toString(), query); - queryExecution.setTimeout(maxExecutionTimeInSeconds * 1000); - for (String dgu : ks.getEndpoint().getDefaultGraphURIs()) { - queryExecution.addDefaultGraph(dgu); - } - for (String ngu : ks.getEndpoint().getNamedGraphURIs()) { - queryExecution.addNamedGraph(ngu); - } - ResultSet resultSet = queryExecution.execSelect(); - return resultSet; - } - - public static void main(String[] args) throws Exception{ - PropertyRangeAxiomLearner l = new PropertyRangeAxiomLearner(new SparqlEndpointKS(SparqlEndpoint.getEndpointDBpediaLiveAKSW())); - l.setPropertyToDescribe(new ObjectProperty("http://dbpedia.org/ontology/aircraftElectronic")); - l.setMaxExecutionTimeInSeconds(0); - l.init(); - l.start(); - System.out.println(l.getCurrentlyBestEvaluatedAxioms(5)); - } - -} Modified: trunk/components-core/src/main/java/org/dllearner/algorithms/properties/ReflexiveObjectPropertyAxiomLearner.java =================================================================== --- trunk/components-core/src/main/java/org/dllearner/algorithms/properties/ReflexiveObjectPropertyAxiomLearner.java 2011-08-11 07:04:39 UTC (rev 3027) +++ trunk/components-core/src/main/java/org/dllearner/algorithms/properties/ReflexiveObjectPropertyAxiomLearner.java 2011-08-11 11:23:56 UTC (rev 3028) @@ -28,7 +28,7 @@ import com.hp.hpl.jena.sparql.engine.http.QueryEngineHTTP; import com.hp.hpl.jena.vocabulary.OWL2; -@ComponentAnn(name="reflexive property axiom learner") +@ComponentAnn(name="reflexive objectproperty axiom learner") public class ReflexiveObjectPropertyAxiomLearner extends AbstractComponent implements AxiomLearningAlgorithm { private static final Logger logger = LoggerFactory.getLogger(ReflexiveObjectPropertyAxiomLearner.class); Modified: trunk/components-core/src/main/java/org/dllearner/core/ComponentManager.java =================================================================== --- trunk/components-core/src/main/java/org/dllearner/core/ComponentManager.java 2011-08-11 07:04:39 UTC (rev 3027) +++ trunk/components-core/src/main/java/org/dllearner/core/ComponentManager.java 2011-08-11 11:23:56 UTC (rev 3028) @@ -108,8 +108,7 @@ "org.dllearner.algorithms.celoe.CELOE", "org.dllearner.algorithms.fuzzydll.FuzzyCELOE", //added by Josue "org.dllearner.algorithms.isle.ISLE", - "org.dllearner.algorithm.qtl.QTL", - "org.dllearner.algorithms.properties.SubPropertyOfAxiomLearner" + "org.dllearner.algorithm.qtl.QTL" } )); private static ComponentManager cm = null; Added: trunk/components-core/src/main/java/org/dllearner/core/owl/AsymmetricObjectPropertyAxiom.java =================================================================== --- trunk/components-core/src/main/java/org/dllearner/core/owl/AsymmetricObjectPropertyAxiom.java (rev 0) +++ trunk/components-core/src/main/java/org/dllearner/core/owl/AsymmetricObjectPropertyAxiom.java 2011-08-11 11:23:56 UTC (rev 3028) @@ -0,0 +1,49 @@ +package org.dllearner.core.owl; + +import java.util.Map; + +public class AsymmetricObjectPropertyAxiom extends PropertyAxiom { + + /** + * + */ + private static final long serialVersionUID = 8698680348695324368L; + private ObjectProperty role; + + public AsymmetricObjectPropertyAxiom(ObjectProperty role) { + this.role = role; + } + + public ObjectProperty getRole() { + return role; + } + + public int getLength() { + return 1 + role.getLength(); + } + + public String toString(String baseURI, Map<String,String> prefixes) { + return "Asymmetric(" + role.toString(baseURI, prefixes) + ")"; + } + + public String toKBSyntaxString(String baseURI, Map<String,String> prefixes) { + return "Asymmetric(" + role.toKBSyntaxString(baseURI, prefixes) + ")"; + } + + @Override + public void accept(AxiomVisitor visitor) { + visitor.visit(this); + } + + public void accept(KBElementVisitor visitor) { + visitor.visit(this); + } + + /* (non-Javadoc) + * @see org.dllearner.core.owl.KBElement#toManchesterSyntaxString(java.lang.String, java.util.Map) + */ + @Override + public String toManchesterSyntaxString(String baseURI, Map<String, String> prefixes) { + return "Asymmetric(" + role.toString(baseURI, prefixes) + ")"; + } +} Added: trunk/components-core/src/main/java/org/dllearner/core/owl/IrreflexiveObjectPropertyAxiom.java =================================================================== --- trunk/components-core/src/main/java/org/dllearner/core/owl/IrreflexiveObjectPropertyAxiom.java (rev 0) +++ trunk/components-core/src/main/java/org/dllearner/core/owl/IrreflexiveObjectPropertyAxiom.java 2011-08-11 11:23:56 UTC (rev 3028) @@ -0,0 +1,49 @@ +package org.dllearner.core.owl; + +import java.util.Map; + +public class IrreflexiveObjectPropertyAxiom extends PropertyAxiom { + + /** + * + */ + private static final long serialVersionUID = -3877477886974844568L; + private ObjectPropertyExpression role; + + public IrreflexiveObjectPropertyAxiom(ObjectPropertyExpression role) { + this.role = role; + } + + public int getLength() { + return 1 + role.getLength(); + } + + public ObjectPropertyExpression getRole() { + return role; + } + + public String toString(String baseURI, Map<String,String> prefixes) { + return "Irreflexive(" + role.toString(baseURI, prefixes) + ")"; + } + + public String toKBSyntaxString(String baseURI, Map<String,String> prefixes) { + return "Irreflexive(" + role.toKBSyntaxString(baseURI, prefixes) + ")"; + } + + @Override + public void accept(AxiomVisitor visitor) { + visitor.visit(this); + } + + public void accept(KBElementVisitor visitor) { + visitor.visit(this); + } + + /* (non-Javadoc) + * @see org.dllearner.core.owl.KBElement#toManchesterSyntaxString(java.lang.String, java.util.Map) + */ + @Override + public String toManchesterSyntaxString(String baseURI, Map<String, String> prefixes) { + return "Irreflexive(" + role.toManchesterSyntaxString(baseURI, prefixes) + ")"; + } +} Modified: trunk/components-core/src/main/java/org/dllearner/core/owl/PropertyAxiomVisitor.java =================================================================== --- trunk/components-core/src/main/java/org/dllearner/core/owl/PropertyAxiomVisitor.java 2011-08-11 07:04:39 UTC (rev 3027) +++ trunk/components-core/src/main/java/org/dllearner/core/owl/PropertyAxiomVisitor.java 2011-08-11 11:23:56 UTC (rev 3028) @@ -37,10 +37,14 @@ public void visit(SymmetricObjectPropertyAxiom axiom); + public void visit(AsymmetricObjectPropertyAxiom axiom); + public void visit(TransitiveObjectPropertyAxiom axiom); public void visit(ReflexiveObjectPropertyAxiom axiom); + public void visit(IrreflexiveObjectPropertyAxiom axiom); + public void visit(SubObjectPropertyAxiom axiom); public void visit(SubDatatypePropertyAxiom axiom); Modified: trunk/components-core/src/main/java/org/dllearner/utilities/owl/OWLAPIAxiomConvertVisitor.java =================================================================== --- trunk/components-core/src/main/java/org/dllearner/utilities/owl/OWLAPIAxiomConvertVisitor.java 2011-08-11 07:04:39 UTC (rev 3027) +++ trunk/components-core/src/main/java/org/dllearner/utilities/owl/OWLAPIAxiomConvertVisitor.java 2011-08-11 11:23:56 UTC (rev 3028) @@ -24,6 +24,7 @@ import java.util.HashSet; import java.util.Set; +import org.dllearner.core.owl.AsymmetricObjectPropertyAxiom; import org.dllearner.core.owl.Axiom; import org.dllearner.core.owl.AxiomVisitor; import org.dllearner.core.owl.BooleanDatatypePropertyAssertion; @@ -46,6 +47,7 @@ import org.dllearner.core.owl.Individual; import org.dllearner.core.owl.InverseFunctionalObjectPropertyAxiom; import org.dllearner.core.owl.InverseObjectPropertyAxiom; +import org.dllearner.core.owl.IrreflexiveObjectPropertyAxiom; import org.dllearner.core.owl.KB; import org.dllearner.core.owl.ObjectPropertyAssertion; import org.dllearner.core.owl.ObjectPropertyDomainAxiom; @@ -447,6 +449,24 @@ } + @Override + public void visit(AsymmetricObjectPropertyAxiom axiom) { + OWLObjectProperty role = factory.getOWLObjectProperty( + IRI.create(axiom.getRole().getName())); + OWLAxiom axiomOWLAPI = factory.getOWLAsymmetricObjectPropertyAxiom(role); + addAxiom(axiomOWLAPI); + + } + + @Override + public void visit(IrreflexiveObjectPropertyAxiom axiom) { + OWLObjectProperty role = factory.getOWLObjectProperty( + IRI.create(axiom.getRole().getName())); + OWLAxiom axiomOWLAPI = factory.getOWLIrreflexiveObjectPropertyAxiom(role); + addAxiom(axiomOWLAPI); + + } + Modified: trunk/components-core/src/test/java/org/dllearner/test/junit/PropertyLearningTest.java =================================================================== --- trunk/components-core/src/test/java/org/dllearner/test/junit/PropertyLearningTest.java 2011-08-11 07:04:39 UTC (rev 3027) +++ trunk/components-core/src/test/java/org/dllearner/test/junit/PropertyLearningTest.java 2011-08-11 11:23:56 UTC (rev 3028) @@ -3,7 +3,7 @@ import org.dllearner.algorithms.properties.EquivalentObjectPropertyAxiomLearner; import org.dllearner.algorithms.properties.FunctionalObjectPropertyAxiomLearner; import org.dllearner.algorithms.properties.ObjectPropertyDomainAxiomLearner; -import org.dllearner.algorithms.properties.PropertyRangeAxiomLearner; +import org.dllearner.algorithms.properties.ObjectPropertyRangeAxiomLearner; import org.dllearner.algorithms.properties.ReflexiveObjectPropertyAxiomLearner; import org.dllearner.algorithms.properties.SubObjectPropertyOfAxiomLearner; import org.dllearner.algorithms.properties.SymmetricObjectPropertyAxiomLearner; @@ -62,7 +62,7 @@ } public void testPropertyRangeAxiomLearning() throws Exception { - PropertyRangeAxiomLearner l = new PropertyRangeAxiomLearner(ks); + ObjectPropertyRangeAxiomLearner l = new ObjectPropertyRangeAxiomLearner(ks); l.setMaxExecutionTimeInSeconds(maxExecutionTimeInSeconds); l.setPropertyToDescribe(range); l.init(); Modified: trunk/scripts/src/main/java/org/dllearner/scripts/evaluation/EnrichmentEvaluation.java =================================================================== --- trunk/scripts/src/main/java/org/dllearner/scripts/evaluation/EnrichmentEvaluation.java 2011-08-11 07:04:39 UTC (rev 3027) +++ trunk/scripts/src/main/java/org/dllearner/scripts/evaluation/EnrichmentEvaluation.java 2011-08-11 11:23:56 UTC (rev 3028) @@ -52,8 +52,9 @@ import org.dllearner.algorithms.properties.FunctionalDataPropertyAxiomLearner; import org.dllearner.algorithms.properties.FunctionalObjectPropertyAxiomLearner; import org.dllearner.algorithms.properties.InverseFunctionalObjectPropertyAxiomLearner; +import org.dllearner.algorithms.properties.IrreflexiveObjectPropertyAxiomLearner; import org.dllearner.algorithms.properties.ObjectPropertyDomainAxiomLearner; -import org.dllearner.algorithms.properties.PropertyRangeAxiomLearner; +import org.dllearner.algorithms.properties.ObjectPropertyRangeAxiomLearner; import org.dllearner.algorithms.properties.SubDataPropertyOfAxiomLearner; import org.dllearner.algorithms.properties.SubObjectPropertyOfAxiomLearner; import org.dllearner.algorithms.properties.SymmetricObjectPropertyAxiomLearner; @@ -121,10 +122,11 @@ objectPropertyAlgorithms.add(FunctionalObjectPropertyAxiomLearner.class); objectPropertyAlgorithms.add(InverseFunctionalObjectPropertyAxiomLearner.class); objectPropertyAlgorithms.add(ObjectPropertyDomainAxiomLearner.class); - objectPropertyAlgorithms.add(PropertyRangeAxiomLearner.class); + objectPropertyAlgorithms.add(ObjectPropertyRangeAxiomLearner.class); objectPropertyAlgorithms.add(SubObjectPropertyOfAxiomLearner.class); objectPropertyAlgorithms.add(SymmetricObjectPropertyAxiomLearner.class); objectPropertyAlgorithms.add(TransitiveObjectPropertyAxiomLearner.class); + objectPropertyAlgorithms.add(IrreflexiveObjectPropertyAxiomLearner.class); dataPropertyAlgorithms = new LinkedList<Class<? extends AxiomLearningAlgorithm>>(); dataPropertyAlgorithms.add(DisjointDataPropertyAxiomLearner.class); @@ -204,7 +206,7 @@ evaluateObjectProperties(ks); - evaluateDataProperties(ks); +// evaluateDataProperties(ks); System.out.println("Overall runtime: " + (System.currentTimeMillis()-overallStartTime)/1000 + "s."); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jen...@us...> - 2011-08-11 11:31:01
|
Revision: 3029 http://dl-learner.svn.sourceforge.net/dl-learner/?rev=3029&view=rev Author: jenslehmann Date: 2011-08-11 11:30:49 +0000 (Thu, 11 Aug 2011) Log Message: ----------- - extended enrichment CLI - added class for standard prefixes Modified Paths: -------------- trunk/components-core/src/main/java/org/dllearner/kb/sparql/SPARQLTasks.java trunk/interfaces/src/main/java/org/dllearner/cli/Enrichment.java trunk/scripts/src/main/java/org/dllearner/scripts/evaluation/EnrichmentEvaluation.java Added Paths: ----------- trunk/components-core/src/main/java/org/dllearner/utilities/CommonPrefixMap.java Modified: trunk/components-core/src/main/java/org/dllearner/kb/sparql/SPARQLTasks.java =================================================================== --- trunk/components-core/src/main/java/org/dllearner/kb/sparql/SPARQLTasks.java 2011-08-11 11:23:56 UTC (rev 3028) +++ trunk/components-core/src/main/java/org/dllearner/kb/sparql/SPARQLTasks.java 2011-08-11 11:30:49 UTC (rev 3029) @@ -20,10 +20,15 @@ package org.dllearner.kb.sparql; import java.util.List; +import java.util.Set; import java.util.SortedSet; import java.util.TreeSet; import org.apache.log4j.Logger; +import org.dllearner.core.owl.DatatypeProperty; +import org.dllearner.core.owl.Entity; +import org.dllearner.core.owl.NamedClass; +import org.dllearner.core.owl.ObjectProperty; import org.dllearner.utilities.datastructures.RDFNodeTuple; import org.dllearner.utilities.datastructures.StringTuple; import org.dllearner.utilities.owl.OWLVocabulary; @@ -597,6 +602,56 @@ return new SPARQLTasks( Cache.getDefaultCache(), SparqlEndpoint.getEndpointByName(endpointName) ); } + // tries to detect the type of the resource + public Entity guessResourceType(String resource) { + SortedSet<String> types = retrieveObjectsForSubjectAndRole(resource, "http://www.w3.org/1999/02/22-rdf-syntax-ns#type", 10000); + if(types.contains("http://www.w3.org/2002/07/owl#ObjectProperty")) { + return new ObjectProperty(resource); + } else if(types.contains("http://www.w3.org/2002/07/owl#DatatypeProperty")) { + return new DatatypeProperty(resource); + } else if(types.contains("http://www.w3.org/2002/07/owl#Class")) { + return new NamedClass(resource); + } else { + return null; + } + } + + public Set<ObjectProperty> getAllObjectProperties() { + Set<ObjectProperty> properties = new TreeSet<ObjectProperty>(); + String query = "PREFIX owl: <http://www.w3.org/2002/07/owl#> SELECT ?p WHERE {?p a owl:ObjectProperty}"; + SparqlQuery sq = new SparqlQuery(query, sparqlEndpoint); + ResultSet q = sq.send(); + while (q.hasNext()) { + QuerySolution qs = q.next(); + properties.add(new ObjectProperty(qs.getResource("p").getURI())); + } + return properties; + } + + public Set<DatatypeProperty> getAllDataProperties() { + Set<DatatypeProperty> properties = new TreeSet<DatatypeProperty>(); + String query = "PREFIX owl: <http://www.w3.org/2002/07/owl#> SELECT ?p WHERE {?p a owl:DatatypeProperty}"; + SparqlQuery sq = new SparqlQuery(query, sparqlEndpoint); + ResultSet q = sq.send(); + while (q.hasNext()) { + QuerySolution qs = q.next(); + properties.add(new DatatypeProperty(qs.getResource("p").getURI())); + } + return properties; + } + + public Set<NamedClass> getAllClasses() { + Set<NamedClass> classes = new TreeSet<NamedClass>(); + String query = "PREFIX owl: <http://www.w3.org/2002/07/owl#> SELECT ?c WHERE {?c a owl:Class}"; + SparqlQuery sq = new SparqlQuery(query, sparqlEndpoint); + ResultSet q = sq.send(); + while (q.hasNext()) { + QuerySolution qs = q.next(); + classes.add(new NamedClass(qs.getResource("c").getURI())); + } + return classes; + } + } /* Added: trunk/components-core/src/main/java/org/dllearner/utilities/CommonPrefixMap.java =================================================================== --- trunk/components-core/src/main/java/org/dllearner/utilities/CommonPrefixMap.java (rev 0) +++ trunk/components-core/src/main/java/org/dllearner/utilities/CommonPrefixMap.java 2011-08-11 11:30:49 UTC (rev 3029) @@ -0,0 +1,39 @@ +/** + * Copyright (C) 2007-2011, Jens Lehmann + * + * This file is part of DL-Learner. + * + * DL-Learner is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * DL-Learner is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + * + */ +package org.dllearner.utilities; + +import java.util.HashMap; + +/** + * Can be used as base for a prefix map. + * + * @author Jens Lehmann + * + */ +public class CommonPrefixMap extends HashMap<String,String> { + + private static final long serialVersionUID = 5434065917532534702L; + + public CommonPrefixMap() { + put("dbp","http://dbpedia.org/property/"); + put("dbo","http://dbpedia.org/ontology/"); + } + +} Modified: trunk/interfaces/src/main/java/org/dllearner/cli/Enrichment.java =================================================================== --- trunk/interfaces/src/main/java/org/dllearner/cli/Enrichment.java 2011-08-11 11:23:56 UTC (rev 3028) +++ trunk/interfaces/src/main/java/org/dllearner/cli/Enrichment.java 2011-08-11 11:30:49 UTC (rev 3029) @@ -22,14 +22,53 @@ import static java.util.Arrays.asList; import java.io.IOException; +import java.lang.reflect.InvocationTargetException; +import java.net.SocketTimeoutException; +import java.net.URI; import java.net.URL; import java.util.LinkedList; +import java.util.List; import joptsimple.OptionParser; import joptsimple.OptionSet; +import org.apache.log4j.ConsoleAppender; +import org.apache.log4j.Level; +import org.apache.log4j.Logger; +import org.apache.log4j.SimpleLayout; +import org.dllearner.algorithms.DisjointClassesLearner; +import org.dllearner.algorithms.SimpleSubclassLearner; +import org.dllearner.algorithms.celoe.CELOE; +import org.dllearner.algorithms.properties.DataPropertyDomainAxiomLearner; +import org.dllearner.algorithms.properties.DataPropertyRangeAxiomLearner; +import org.dllearner.algorithms.properties.DisjointDataPropertyAxiomLearner; +import org.dllearner.algorithms.properties.DisjointObjectPropertyAxiomLearner; +import org.dllearner.algorithms.properties.EquivalentDataPropertyAxiomLearner; +import org.dllearner.algorithms.properties.EquivalentObjectPropertyAxiomLearner; +import org.dllearner.algorithms.properties.FunctionalDataPropertyAxiomLearner; +import org.dllearner.algorithms.properties.FunctionalObjectPropertyAxiomLearner; +import org.dllearner.algorithms.properties.InverseFunctionalObjectPropertyAxiomLearner; +import org.dllearner.algorithms.properties.ObjectPropertyDomainAxiomLearner; +import org.dllearner.algorithms.properties.ObjectPropertyRangeAxiomLearner; +import org.dllearner.algorithms.properties.SubDataPropertyOfAxiomLearner; +import org.dllearner.algorithms.properties.SubObjectPropertyOfAxiomLearner; +import org.dllearner.algorithms.properties.SymmetricObjectPropertyAxiomLearner; +import org.dllearner.algorithms.properties.TransitiveObjectPropertyAxiomLearner; +import org.dllearner.core.AxiomLearningAlgorithm; +import org.dllearner.core.ComponentInitException; +import org.dllearner.core.ComponentManager; +import org.dllearner.core.EvaluatedAxiom; +import org.dllearner.core.LearningAlgorithm; +import org.dllearner.core.config.ConfigHelper; +import org.dllearner.core.owl.DatatypeProperty; +import org.dllearner.core.owl.Entity; +import org.dllearner.core.owl.NamedClass; +import org.dllearner.core.owl.ObjectProperty; +import org.dllearner.kb.SparqlEndpointKS; +import org.dllearner.kb.sparql.SPARQLTasks; import org.dllearner.kb.sparql.SparqlEndpoint; import org.dllearner.kb.sparql.SparqlQuery; +import org.dllearner.utilities.CommonPrefixMap; import com.hp.hpl.jena.query.ResultSet; @@ -41,17 +80,158 @@ */ public class Enrichment { - public static void main(String[] args) throws IOException { + private static Logger logger = Logger.getLogger(Enrichment.class); + + // enrichment parameters + private SparqlEndpoint se; + private Entity resource; + private boolean verbose; + + // max. execution time for each learner for each entity + private int maxExecutionTimeInSeconds = 10; + + // number of axioms which will be learned/considered (only applies to + // some learners) + private int nrOfAxiomsToLearn = 10; + + // lists of algorithms to apply + private List<Class<? extends AxiomLearningAlgorithm>> objectPropertyAlgorithms; + private List<Class<? extends AxiomLearningAlgorithm>> dataPropertyAlgorithms; + private List<Class<? extends LearningAlgorithm>> classAlgorithms; + + private CommonPrefixMap prefixes = new CommonPrefixMap(); + + public Enrichment(SparqlEndpoint se, Entity resource, boolean verbose) { + this.se = se; + this.resource = resource; + this.verbose = verbose; + + objectPropertyAlgorithms = new LinkedList<Class<? extends AxiomLearningAlgorithm>>(); + objectPropertyAlgorithms.add(DisjointObjectPropertyAxiomLearner.class); + objectPropertyAlgorithms.add(EquivalentObjectPropertyAxiomLearner.class); + objectPropertyAlgorithms.add(FunctionalObjectPropertyAxiomLearner.class); + objectPropertyAlgorithms.add(InverseFunctionalObjectPropertyAxiomLearner.class); + objectPropertyAlgorithms.add(ObjectPropertyDomainAxiomLearner.class); + objectPropertyAlgorithms.add(ObjectPropertyRangeAxiomLearner.class); + objectPropertyAlgorithms.add(SubObjectPropertyOfAxiomLearner.class); + objectPropertyAlgorithms.add(SymmetricObjectPropertyAxiomLearner.class); + objectPropertyAlgorithms.add(TransitiveObjectPropertyAxiomLearner.class); + + dataPropertyAlgorithms = new LinkedList<Class<? extends AxiomLearningAlgorithm>>(); + dataPropertyAlgorithms.add(DisjointDataPropertyAxiomLearner.class); + dataPropertyAlgorithms.add(EquivalentDataPropertyAxiomLearner.class); + dataPropertyAlgorithms.add(FunctionalDataPropertyAxiomLearner.class); + dataPropertyAlgorithms.add(DataPropertyDomainAxiomLearner.class); + dataPropertyAlgorithms.add(DataPropertyRangeAxiomLearner.class); + dataPropertyAlgorithms.add(SubDataPropertyOfAxiomLearner.class); + + classAlgorithms = new LinkedList<Class<? extends LearningAlgorithm>>(); + classAlgorithms.add(DisjointClassesLearner.class); + classAlgorithms.add(SimpleSubclassLearner.class); + classAlgorithms.add(CELOE.class); + } + + public void start() throws ComponentInitException, IllegalArgumentException, SecurityException, InstantiationException, IllegalAccessException, InvocationTargetException, NoSuchMethodException { + + // sanity check that endpoint/graph returns at least one triple + String query = "SELECT * WHERE {?s ?p ?o} LIMIT 1"; + SparqlQuery sq = new SparqlQuery(query, se); + ResultSet q = sq.send(); + while (q.hasNext()) { + q.next(); + } + + // instantiate SPARQL endpoint wrapper component + SparqlEndpointKS ks = new SparqlEndpointKS(se); + ks.init(); + + if(resource == null) { + // TODO: automatically run over all resources if no specific resource was specified + SPARQLTasks st = new SPARQLTasks(se); + st.getAllClasses(); + st.getAllDataProperties(); + st.getAllObjectProperties(); + } else { + if(resource instanceof ObjectProperty) { + for (Class<? extends AxiomLearningAlgorithm> algorithmClass : objectPropertyAlgorithms) { + AxiomLearningAlgorithm learner = algorithmClass.getConstructor( + SparqlEndpointKS.class).newInstance(ks); + ConfigHelper.configure(learner, "propertyToDescribe", resource); + ConfigHelper.configure(learner, "maxExecutionTimeInSeconds", + maxExecutionTimeInSeconds); + learner.init(); + String algName = ComponentManager.getName(learner); + System.out.println("Applying " + algName + " on " + resource + " ... "); + long startTime = System.currentTimeMillis(); + try { + learner.start(); + } catch (Exception e) { + e.printStackTrace(); + if(e.getCause() instanceof SocketTimeoutException){ + System.out.println("Query timed out (endpoint possibly too slow)."); + } + } + long runtime = System.currentTimeMillis() - startTime; + System.out.println("runtime: " + runtime + "ms"); + List<EvaluatedAxiom> learnedAxioms = learner + .getCurrentlyBestEvaluatedAxioms(nrOfAxiomsToLearn); + for (EvaluatedAxiom learnedAxiom : learnedAxioms) { + System.out.println("suggested axiom: " + learnedAxiom); + } + } + } else if(resource instanceof DatatypeProperty) { + for (Class<? extends AxiomLearningAlgorithm> algorithmClass : dataPropertyAlgorithms) { + AxiomLearningAlgorithm learner = algorithmClass.getConstructor( + SparqlEndpointKS.class).newInstance(ks); + ConfigHelper.configure(learner, "propertyToDescribe", resource); + ConfigHelper.configure(learner, "maxExecutionTimeInSeconds", + maxExecutionTimeInSeconds); + learner.init(); + String algName = ComponentManager.getName(learner); + System.out.println("Applying " + algName + " on " + resource + " ... "); + long startTime = System.currentTimeMillis(); + try { + learner.start(); + } catch (Exception e) { + e.printStackTrace(); + if(e.getCause() instanceof SocketTimeoutException){ + System.out.println("Query timed out (endpoint possibly too slow)."); + } + } + long runtime = System.currentTimeMillis() - startTime; + System.out.println("runtime: " + runtime + "ms"); + List<EvaluatedAxiom> learnedAxioms = learner + .getCurrentlyBestEvaluatedAxioms(nrOfAxiomsToLearn); + for (EvaluatedAxiom learnedAxiom : learnedAxioms) { + System.out.println("suggested axiom: " + learnedAxiom); + } + } + } else if(resource instanceof NamedClass) { + throw new Error("not implemented"); + } else { + throw new Error("The type " + resource.getClass() + " of resource " + resource + " cannot be handled by this enrichment tool."); + } + } + } + + public static void main(String[] args) throws IOException, ComponentInitException, IllegalArgumentException, SecurityException, InstantiationException, IllegalAccessException, InvocationTargetException, NoSuchMethodException { + + SimpleLayout layout = new SimpleLayout(); + ConsoleAppender consoleAppender = new ConsoleAppender(layout); + logger.removeAllAppenders(); + logger.addAppender(consoleAppender); + logger.setLevel(Level.WARN); + OptionParser parser = new OptionParser(); parser.acceptsAll(asList("h", "?", "help"), "Show help."); - parser.acceptsAll(asList("v", "verbose"), "Verbosity level."); + parser.acceptsAll(asList("v", "verbose"), "Verbosity level.").withOptionalArg().ofType(Boolean.class).defaultsTo(false); parser.acceptsAll(asList("e", "endpoint"), "SPARQL endpoint URL to be used.") .withRequiredArg().ofType(URL.class); parser.acceptsAll(asList("g", "graph"), "URI of default graph for queries on SPARQL endpoint.").withOptionalArg() - .ofType(URL.class); + .ofType(URI.class); parser.acceptsAll(asList("r", "resource"), - "The resource for which enrichment axioms should be suggested.").withOptionalArg(); + "The resource for which enrichment axioms should be suggested.").withOptionalArg().ofType(URI.class); parser.acceptsAll(asList("o", "output"), "Specify a file where the output can be written.") .withOptionalArg(); parser.acceptsAll(asList("f", "format"), @@ -78,29 +258,32 @@ System.out.println(); System.out.println(addHelp); // main script - } else { + } else { // create SPARQL endpoint object URL endpoint = (URL) options.valueOf("endpoint"); - URL graph = (URL) options.valueOf("graph"); + URI graph = (URI) options.valueOf("graph"); LinkedList<String> defaultGraphURIs = new LinkedList<String>(); - defaultGraphURIs.add(graph.toString()); - SparqlEndpoint se = new SparqlEndpoint(endpoint, defaultGraphURIs, null); + if(graph != null) { + defaultGraphURIs.add(graph.toString()); + } + SparqlEndpoint se = new SparqlEndpoint(endpoint, defaultGraphURIs, new LinkedList<String>()); - // sanity check that endpoint/graph returns at least one triple - String query = "SELECT * WHERE {?s ?p ?o} LIMIT 1"; - SparqlQuery sq = new SparqlQuery(query, se); - ResultSet q = sq.send(); - while (q.hasNext()) { - q.next(); + // map resource to correct type + Entity resource = null; + if(options.valueOf("resource") != null) { + resource = new SPARQLTasks(se).guessResourceType(((URI)options.valueOf("resource")).toString()); + if(resource == null) { + throw new IllegalArgumentException("Could not determine the type (class, object property or data property) of input resource " + options.valueOf("resource")); + } } - // run an algorithm using the resource as input + boolean verbose = (Boolean) options.valueOf("v"); + Enrichment e = new Enrichment(se, resource, verbose); + e.start(); + + // TODO: print output in correct format - // TODO: detect type of the resource - // TODO: run all possible algorithms - // TODO: automatically run over all resources if no specific resource was specified - } } Modified: trunk/scripts/src/main/java/org/dllearner/scripts/evaluation/EnrichmentEvaluation.java =================================================================== --- trunk/scripts/src/main/java/org/dllearner/scripts/evaluation/EnrichmentEvaluation.java 2011-08-11 11:23:56 UTC (rev 3028) +++ trunk/scripts/src/main/java/org/dllearner/scripts/evaluation/EnrichmentEvaluation.java 2011-08-11 11:30:49 UTC (rev 3029) @@ -36,7 +36,6 @@ import java.util.List; import java.util.Map; import java.util.Set; -import java.util.TreeSet; import java.util.prefs.Preferences; import org.apache.log4j.Logger; @@ -54,9 +53,9 @@ import org.dllearner.algorithms.properties.InverseFunctionalObjectPropertyAxiomLearner; import org.dllearner.algorithms.properties.IrreflexiveObjectPropertyAxiomLearner; import org.dllearner.algorithms.properties.ObjectPropertyDomainAxiomLearner; -import org.dllearner.algorithms.properties.ObjectPropertyRangeAxiomLearner; import org.dllearner.algorithms.properties.SubDataPropertyOfAxiomLearner; import org.dllearner.algorithms.properties.SubObjectPropertyOfAxiomLearner; +import org.dllearner.algorithms.properties.ObjectPropertyRangeAxiomLearner; import org.dllearner.algorithms.properties.SymmetricObjectPropertyAxiomLearner; import org.dllearner.algorithms.properties.TransitiveObjectPropertyAxiomLearner; import org.dllearner.core.AxiomLearningAlgorithm; @@ -66,18 +65,15 @@ import org.dllearner.core.LearningAlgorithm; import org.dllearner.core.config.ConfigHelper; import org.dllearner.core.owl.DatatypeProperty; -import org.dllearner.core.owl.NamedClass; import org.dllearner.core.owl.ObjectProperty; import org.dllearner.kb.SparqlEndpointKS; +import org.dllearner.kb.sparql.SPARQLTasks; import org.dllearner.kb.sparql.SparqlEndpoint; -import org.dllearner.kb.sparql.SparqlQuery; +import org.dllearner.utilities.CommonPrefixMap; import org.dllearner.utilities.Files; import org.ini4j.IniPreferences; import org.ini4j.InvalidFileFormatException; -import com.hp.hpl.jena.query.QuerySolution; -import com.hp.hpl.jena.query.ResultSet; - /** * Evaluation of enrichment algorithms on DBpedia (Live). * @@ -104,13 +100,12 @@ private List<Class<? extends LearningAlgorithm>> classAlgorithms; private String baseURI = "http://dbpedia.org/resource/"; - private Map<String,String> prefixes; + private Map<String,String> prefixes = new CommonPrefixMap(); private Connection conn; private PreparedStatement ps; public EnrichmentEvaluation() { - initDBConnection(); prefixes = new HashMap<String,String>(); prefixes.put("dbp","http://dbpedia.org/property/"); @@ -213,7 +208,7 @@ } private void evaluateObjectProperties(SparqlEndpointKS ks)throws IllegalArgumentException, SecurityException, InstantiationException, IllegalAccessException, InvocationTargetException, NoSuchMethodException, ComponentInitException{ - Set<ObjectProperty> properties = getAllObjectProperties(ks.getEndpoint()); + Set<ObjectProperty> properties = new SPARQLTasks(ks.getEndpoint()).getAllObjectProperties(); for (Class<? extends AxiomLearningAlgorithm> algorithmClass : objectPropertyAlgorithms) { int objectProperties = 0; @@ -265,7 +260,7 @@ } private void evaluateDataProperties(SparqlEndpointKS ks) throws IllegalArgumentException, SecurityException, InstantiationException, IllegalAccessException, InvocationTargetException, NoSuchMethodException, ComponentInitException{ - Set<DatatypeProperty> properties = getAllDataProperties(ks.getEndpoint()); + Set<DatatypeProperty> properties = new SPARQLTasks(ks.getEndpoint()).getAllDataProperties(); for (Class<? extends AxiomLearningAlgorithm> algorithmClass : dataPropertyAlgorithms) { int dataProperties = 0; @@ -316,51 +311,6 @@ } } - private Set<ObjectProperty> getAllObjectProperties(SparqlEndpoint se) { - Set<ObjectProperty> properties = new TreeSet<ObjectProperty>(); - String query = "PREFIX owl: <http://www.w3.org/2002/07/owl#> SELECT ?p WHERE {?p a owl:ObjectProperty}"; - SparqlQuery sq = new SparqlQuery(query, se); - // Claus' API - // Sparqler x = new SparqlerHttp(se.getURL().toString()); - // SelectPaginated q = new SelectPaginated(x, , 1000); - ResultSet q = sq.send(); - while (q.hasNext()) { - QuerySolution qs = q.next(); - properties.add(new ObjectProperty(qs.getResource("p").getURI())); - } - return properties; - } - - private Set<DatatypeProperty> getAllDataProperties(SparqlEndpoint se) { - Set<DatatypeProperty> properties = new TreeSet<DatatypeProperty>(); - String query = "PREFIX owl: <http://www.w3.org/2002/07/owl#> SELECT ?p WHERE {?p a owl:DatatypeProperty}"; - SparqlQuery sq = new SparqlQuery(query, se); - // Claus' API - // Sparqler x = new SparqlerHttp(se.getURL().toString()); - // SelectPaginated q = new SelectPaginated(x, , 1000); - ResultSet q = sq.send(); - while (q.hasNext()) { - QuerySolution qs = q.next(); - properties.add(new DatatypeProperty(qs.getResource("p").getURI())); - } - return properties; - } - - private Set<NamedClass> getAllClasses(SparqlEndpoint se) { - Set<NamedClass> classes = new TreeSet<NamedClass>(); - String query = "PREFIX owl: <http://www.w3.org/2002/07/owl#> SELECT ?c WHERE {?c a owl:Class}"; - SparqlQuery sq = new SparqlQuery(query, se); - // Claus' API - // Sparqler x = new SparqlerHttp(se.getURL().toString()); - // SelectPaginated q = new SelectPaginated(x, , 1000); - ResultSet q = sq.send(); - while (q.hasNext()) { - QuerySolution qs = q.next(); - classes.add(new NamedClass(qs.getResource("c").getURI())); - } - return classes; - } - public void printResultsPlain() { } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <lor...@us...> - 2011-08-11 11:40:20
|
Revision: 3030 http://dl-learner.svn.sourceforge.net/dl-learner/?rev=3030&view=rev Author: lorenz_b Date: 2011-08-11 11:40:11 +0000 (Thu, 11 Aug 2011) Log Message: ----------- Added missing dependency. Added axiom type to eval script. Modified Paths: -------------- trunk/interfaces/pom.xml trunk/scripts/src/main/java/org/dllearner/scripts/evaluation/EnrichmentEvaluation.java Modified: trunk/interfaces/pom.xml =================================================================== --- trunk/interfaces/pom.xml 2011-08-11 11:30:49 UTC (rev 3029) +++ trunk/interfaces/pom.xml 2011-08-11 11:40:11 UTC (rev 3030) @@ -131,13 +131,7 @@ <dependency> <groupId>org.dllearner</groupId> <artifactId>components-core</artifactId> - <exclusions> - <exclusion> - <groupId>org.slf4j</groupId> - <!-- Exclude Project-D from Project-B --> - <artifactId>slf4j-log4j12</artifactId> - </exclusion> - </exclusions> + </dependency> <!-- Modified: trunk/scripts/src/main/java/org/dllearner/scripts/evaluation/EnrichmentEvaluation.java =================================================================== --- trunk/scripts/src/main/java/org/dllearner/scripts/evaluation/EnrichmentEvaluation.java 2011-08-11 11:30:49 UTC (rev 3029) +++ trunk/scripts/src/main/java/org/dllearner/scripts/evaluation/EnrichmentEvaluation.java 2011-08-11 11:40:11 UTC (rev 3030) @@ -53,6 +53,7 @@ import org.dllearner.algorithms.properties.InverseFunctionalObjectPropertyAxiomLearner; import org.dllearner.algorithms.properties.IrreflexiveObjectPropertyAxiomLearner; import org.dllearner.algorithms.properties.ObjectPropertyDomainAxiomLearner; +import org.dllearner.algorithms.properties.ReflexiveObjectPropertyAxiomLearner; import org.dllearner.algorithms.properties.SubDataPropertyOfAxiomLearner; import org.dllearner.algorithms.properties.SubObjectPropertyOfAxiomLearner; import org.dllearner.algorithms.properties.ObjectPropertyRangeAxiomLearner; @@ -122,6 +123,7 @@ objectPropertyAlgorithms.add(SymmetricObjectPropertyAxiomLearner.class); objectPropertyAlgorithms.add(TransitiveObjectPropertyAxiomLearner.class); objectPropertyAlgorithms.add(IrreflexiveObjectPropertyAxiomLearner.class); + objectPropertyAlgorithms.add(ReflexiveObjectPropertyAxiomLearner.class); dataPropertyAlgorithms = new LinkedList<Class<? extends AxiomLearningAlgorithm>>(); dataPropertyAlgorithms.add(DisjointDataPropertyAxiomLearner.class); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <lor...@us...> - 2011-08-15 09:04:31
|
Revision: 3040 http://dl-learner.svn.sourceforge.net/dl-learner/?rev=3040&view=rev Author: lorenz_b Date: 2011-08-15 09:04:24 +0000 (Mon, 15 Aug 2011) Log Message: ----------- Outsourced autosparql-lite module. Modified Paths: -------------- trunk/pom.xml Removed Paths: ------------- trunk/autosparql-lite/ Modified: trunk/pom.xml =================================================================== --- trunk/pom.xml 2011-08-15 07:33:24 UTC (rev 3039) +++ trunk/pom.xml 2011-08-15 09:04:24 UTC (rev 3040) @@ -27,7 +27,6 @@ <module>protege</module> <module>evalplugin</module> <module>autosparql</module> - <module>autosparql-lite</module> </modules> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <lor...@us...> - 2011-08-15 09:05:49
|
Revision: 3041 http://dl-learner.svn.sourceforge.net/dl-learner/?rev=3041&view=rev Author: lorenz_b Date: 2011-08-15 09:05:43 +0000 (Mon, 15 Aug 2011) Log Message: ----------- Outsourced autosparql module. Modified Paths: -------------- trunk/pom.xml Removed Paths: ------------- trunk/autosparql/ Modified: trunk/pom.xml =================================================================== --- trunk/pom.xml 2011-08-15 09:04:24 UTC (rev 3040) +++ trunk/pom.xml 2011-08-15 09:05:43 UTC (rev 3041) @@ -26,7 +26,6 @@ <module>scripts</module> <module>protege</module> <module>evalplugin</module> - <module>autosparql</module> </modules> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jen...@us...> - 2011-08-15 13:09:13
|
Revision: 3043 http://dl-learner.svn.sourceforge.net/dl-learner/?rev=3043&view=rev Author: jenslehmann Date: 2011-08-15 13:09:06 +0000 (Mon, 15 Aug 2011) Log Message: ----------- made CELOE invocation compatible with other algorithms Modified Paths: -------------- trunk/components-core/src/main/java/org/dllearner/kb/sparql/SPARQLTasks.java trunk/components-core/src/main/java/org/dllearner/reasoning/SPARQLReasoner.java trunk/interfaces/src/main/java/org/dllearner/cli/Enrichment.java Modified: trunk/components-core/src/main/java/org/dllearner/kb/sparql/SPARQLTasks.java =================================================================== --- trunk/components-core/src/main/java/org/dllearner/kb/sparql/SPARQLTasks.java 2011-08-15 12:56:13 UTC (rev 3042) +++ trunk/components-core/src/main/java/org/dllearner/kb/sparql/SPARQLTasks.java 2011-08-15 13:09:06 UTC (rev 3043) @@ -605,6 +605,7 @@ // tries to detect the type of the resource public Entity guessResourceType(String resource) { SortedSet<String> types = retrieveObjectsForSubjectAndRole(resource, "http://www.w3.org/1999/02/22-rdf-syntax-ns#type", 10000); +// System.out.println(types); if(types.contains("http://www.w3.org/2002/07/owl#ObjectProperty")) { return new ObjectProperty(resource); } else if(types.contains("http://www.w3.org/2002/07/owl#DatatypeProperty")) { Modified: trunk/components-core/src/main/java/org/dllearner/reasoning/SPARQLReasoner.java =================================================================== --- trunk/components-core/src/main/java/org/dllearner/reasoning/SPARQLReasoner.java 2011-08-15 12:56:13 UTC (rev 3042) +++ trunk/components-core/src/main/java/org/dllearner/reasoning/SPARQLReasoner.java 2011-08-15 13:09:06 UTC (rev 3043) @@ -79,11 +79,18 @@ @Override public SortedSet<Individual> getIndividuals(Description description) { + return getIndividuals(description, 0); + } + + public SortedSet<Individual> getIndividuals(Description description, int limit) { if(!(description instanceof NamedClass)){ throw new UnsupportedOperationException("Only named classes are supported."); } SortedSet<Individual> individuals = new TreeSet<Individual>(); String query = String.format("SELECT ?ind WHERE {?ind a %s}", inAngleBrackets(((NamedClass)description).getName())); + if(limit != 0) { + query += " LIMIT " + limit; + } ResultSet rs = executeQuery(query); QuerySolution qs; @@ -92,8 +99,8 @@ individuals.add(new Individual(qs.getResource("ind").getURI())); } return individuals; - } - + } + @Override public SortedSetTuple<Individual> doubleRetrieval(Description description) { throw new UnsupportedOperationException(); Modified: trunk/interfaces/src/main/java/org/dllearner/cli/Enrichment.java =================================================================== --- trunk/interfaces/src/main/java/org/dllearner/cli/Enrichment.java 2011-08-15 12:56:13 UTC (rev 3042) +++ trunk/interfaces/src/main/java/org/dllearner/cli/Enrichment.java 2011-08-15 13:09:06 UTC (rev 3043) @@ -21,7 +21,6 @@ import static java.util.Arrays.asList; -import java.io.File; import java.io.IOException; import java.io.StringWriter; import java.lang.reflect.InvocationTargetException; @@ -29,13 +28,11 @@ import java.net.URI; import java.net.URISyntaxException; import java.net.URL; -import java.util.ArrayList; import java.text.DecimalFormat; -import java.util.Arrays; +import java.util.ArrayList; import java.util.HashSet; import java.util.LinkedList; import java.util.List; -import java.util.Set; import java.util.SortedSet; import java.util.TreeSet; @@ -74,6 +71,7 @@ import org.dllearner.core.EvaluatedDescription; import org.dllearner.core.LearningAlgorithm; import org.dllearner.core.LearningProblemUnsupportedException; +import org.dllearner.core.Score; import org.dllearner.core.config.ConfigHelper; import org.dllearner.core.configurators.CELOEConfigurator; import org.dllearner.core.owl.Axiom; @@ -83,31 +81,27 @@ import org.dllearner.core.owl.Individual; import org.dllearner.core.owl.NamedClass; import org.dllearner.core.owl.ObjectProperty; -import org.dllearner.gui.Config; -import org.dllearner.gui.ConfigSave; import org.dllearner.kb.SparqlEndpointKS; import org.dllearner.kb.sparql.SPARQLTasks; import org.dllearner.kb.sparql.SparqlEndpoint; import org.dllearner.kb.sparql.SparqlKnowledgeSource; import org.dllearner.kb.sparql.SparqlQuery; import org.dllearner.learningproblems.ClassLearningProblem; -import org.dllearner.learningproblems.PosNegLPStandard; import org.dllearner.reasoning.FastInstanceChecker; import org.dllearner.reasoning.SPARQLReasoner; import org.dllearner.utilities.CommonPrefixMap; import org.dllearner.utilities.EnrichmentVocabulary; +import org.dllearner.utilities.Helper; +import org.dllearner.utilities.datastructures.Datastructures; +import org.dllearner.utilities.datastructures.SortedSetTuple; +import org.dllearner.utilities.examples.AutomaticNegativeExampleFinderSPARQL; import org.semanticweb.owlapi.apibinding.OWLManager; import org.semanticweb.owlapi.model.IRI; import org.semanticweb.owlapi.model.OWLAxiom; import org.semanticweb.owlapi.model.OWLDataFactory; import org.semanticweb.owlapi.model.OWLIndividual; -import org.semanticweb.owlapi.model.OWLOntology; import org.semanticweb.owlapi.model.OWLOntologyCreationException; import org.semanticweb.owlapi.util.DefaultPrefixManager; -import org.dllearner.utilities.Helper; -import org.dllearner.utilities.datastructures.Datastructures; -import org.dllearner.utilities.datastructures.SortedSetTuple; -import org.dllearner.utilities.examples.AutomaticNegativeExampleFinderSPARQL; import uk.ac.manchester.cs.owl.owlapi.OWLDataFactoryImpl; import uk.ac.manchester.cs.owl.owlapi.mansyntaxrenderer.ManchesterOWLSyntaxObjectRenderer; @@ -216,7 +210,7 @@ applyCELOE(ks, false); applyCELOE(ks, true); } else { - applyLearningAlgorithm((Class<AxiomLearningAlgorithm>)algorithmClass, ks); +// applyLearningAlgorithm((Class<AxiomLearningAlgorithm>)algorithmClass, ks); } } } else { @@ -230,8 +224,9 @@ // get instances of class as positive examples SPARQLReasoner sr = new SPARQLReasoner(ks); - SortedSet<Individual> posExamples = sr.getIndividuals((NamedClass)resource); + SortedSet<Individual> posExamples = sr.getIndividuals((NamedClass)resource, 1000); SortedSet<String> posExStr = Helper.getStringSet(posExamples); + System.out.println(posExStr.size()); // get negative examples via various strategies AutomaticNegativeExampleFinderSPARQL finder = new AutomaticNegativeExampleFinderSPARQL(posExStr, st, null); @@ -253,7 +248,7 @@ ks.init(); - AbstractReasonerComponent rc = cm.reasoner(FastInstanceChecker.class, ks); + AbstractReasonerComponent rc = cm.reasoner(FastInstanceChecker.class, ks2); rc.init(); // TODO: super class learning @@ -275,14 +270,16 @@ // convert the result to axioms (to make it compatible with the other algorithms) TreeSet<? extends EvaluatedDescription> learnedDescriptions = la.getCurrentlyBestEvaluatedDescriptions(); + List<EvaluatedAxiom> evaluatedAxioms = new LinkedList<EvaluatedAxiom>(); for(EvaluatedDescription learnedDescription : learnedDescriptions) { Axiom axiom = new EquivalentClassesAxiom((NamedClass) resource, learnedDescription.getDescription()); + Score score = lp.computeScore(learnedDescription.getDescription()); + evaluatedAxioms.add(new EvaluatedAxiom(axiom, score)); } - // TODO: further axiom conversion - + toRDF(evaluatedAxioms, la, ks); cm.freeAllComponents(); - return null; + return evaluatedAxioms; } private List<EvaluatedAxiom> applyLearningAlgorithm(Class<? extends AxiomLearningAlgorithm> algorithmClass, SparqlEndpointKS ks) throws ComponentInitException, IllegalArgumentException, SecurityException, InstantiationException, IllegalAccessException, InvocationTargetException, NoSuchMethodException { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jen...@us...> - 2011-08-15 14:22:17
|
Revision: 3045 http://dl-learner.svn.sourceforge.net/dl-learner/?rev=3045&view=rev Author: jenslehmann Date: 2011-08-15 14:22:11 +0000 (Mon, 15 Aug 2011) Log Message: ----------- first succesful CELOE run in enrichment interface (but very slow negative exampled detection) Modified Paths: -------------- trunk/components-core/src/main/java/org/dllearner/algorithms/celoe/CELOE.java trunk/components-core/src/main/java/org/dllearner/kb/sparql/SparqlQuery.java trunk/components-core/src/main/java/org/dllearner/reasoning/SPARQLReasoner.java trunk/components-core/src/main/java/org/dllearner/utilities/examples/AutomaticNegativeExampleFinderSPARQL.java trunk/interfaces/src/main/java/org/dllearner/cli/Enrichment.java Modified: trunk/components-core/src/main/java/org/dllearner/algorithms/celoe/CELOE.java =================================================================== --- trunk/components-core/src/main/java/org/dllearner/algorithms/celoe/CELOE.java 2011-08-15 13:22:15 UTC (rev 3044) +++ trunk/components-core/src/main/java/org/dllearner/algorithms/celoe/CELOE.java 2011-08-15 14:22:11 UTC (rev 3045) @@ -31,6 +31,7 @@ import java.util.TreeSet; import org.apache.log4j.Logger; +import org.dllearner.core.ComponentAnn; import org.dllearner.core.ComponentInitException; import org.dllearner.core.EvaluatedDescription; import org.dllearner.core.AbstractCELA; @@ -76,6 +77,7 @@ * @author Jens Lehmann * */ +@ComponentAnn(name="CELOE") public class CELOE extends AbstractCELA { private static Logger logger = Logger.getLogger(CELOE.class); Modified: trunk/components-core/src/main/java/org/dllearner/kb/sparql/SparqlQuery.java =================================================================== --- trunk/components-core/src/main/java/org/dllearner/kb/sparql/SparqlQuery.java 2011-08-15 13:22:15 UTC (rev 3044) +++ trunk/components-core/src/main/java/org/dllearner/kb/sparql/SparqlQuery.java 2011-08-15 14:22:11 UTC (rev 3045) @@ -113,7 +113,7 @@ try { logger.debug("sending query: length: " + sparqlQueryString.length() + " | ENDPOINT: " + sparqlEndpoint.getURL().toString()); - + // we execute the query and store the result in a rewindable result set ResultSet tmp = queryExecution.execSelect(); rs = ResultSetFactory.makeRewindable(tmp); Modified: trunk/components-core/src/main/java/org/dllearner/reasoning/SPARQLReasoner.java =================================================================== --- trunk/components-core/src/main/java/org/dllearner/reasoning/SPARQLReasoner.java 2011-08-15 13:22:15 UTC (rev 3044) +++ trunk/components-core/src/main/java/org/dllearner/reasoning/SPARQLReasoner.java 2011-08-15 14:22:11 UTC (rev 3045) @@ -9,7 +9,6 @@ import java.util.SortedSet; import java.util.TreeSet; -import org.dllearner.algorithms.properties.ObjectPropertyDomainAxiomLearner; import org.dllearner.core.IndividualReasoner; import org.dllearner.core.SchemaReasoner; import org.dllearner.core.owl.ClassHierarchy; @@ -39,7 +38,7 @@ public class SPARQLReasoner implements SchemaReasoner, IndividualReasoner{ - private static final Logger logger = LoggerFactory.getLogger(ObjectPropertyDomainAxiomLearner.class); + private static final Logger logger = LoggerFactory.getLogger(SPARQLReasoner.class); private SparqlEndpointKS ks; Modified: trunk/components-core/src/main/java/org/dllearner/utilities/examples/AutomaticNegativeExampleFinderSPARQL.java =================================================================== --- trunk/components-core/src/main/java/org/dllearner/utilities/examples/AutomaticNegativeExampleFinderSPARQL.java 2011-08-15 13:22:15 UTC (rev 3044) +++ trunk/components-core/src/main/java/org/dllearner/utilities/examples/AutomaticNegativeExampleFinderSPARQL.java 2011-08-15 14:22:11 UTC (rev 3045) @@ -24,7 +24,6 @@ import java.util.TreeSet; import org.apache.log4j.Logger; -import org.dllearner.core.ComponentManager; import org.dllearner.kb.sparql.SPARQLTasks; import org.dllearner.utilities.datastructures.SetManipulation; import org.dllearner.utilities.owl.OWLVocabulary; @@ -32,7 +31,7 @@ public class AutomaticNegativeExampleFinderSPARQL { // LOGGER: ComponentManager - private static Logger logger = Logger.getLogger(ComponentManager.class); + private static Logger logger = Logger.getLogger(AutomaticNegativeExampleFinderSPARQL.class); private SPARQLTasks sparqltasks; Modified: trunk/interfaces/src/main/java/org/dllearner/cli/Enrichment.java =================================================================== --- trunk/interfaces/src/main/java/org/dllearner/cli/Enrichment.java 2011-08-15 13:22:15 UTC (rev 3044) +++ trunk/interfaces/src/main/java/org/dllearner/cli/Enrichment.java 2011-08-15 14:22:11 UTC (rev 3045) @@ -24,6 +24,7 @@ import java.io.IOException; import java.io.StringWriter; import java.lang.reflect.InvocationTargetException; +import java.net.MalformedURLException; import java.net.SocketTimeoutException; import java.net.URI; import java.net.URISyntaxException; @@ -172,7 +173,7 @@ } @SuppressWarnings("unchecked") - public void start() throws ComponentInitException, IllegalArgumentException, SecurityException, InstantiationException, IllegalAccessException, InvocationTargetException, NoSuchMethodException, LearningProblemUnsupportedException { + public void start() throws ComponentInitException, IllegalArgumentException, SecurityException, InstantiationException, IllegalAccessException, InvocationTargetException, NoSuchMethodException, LearningProblemUnsupportedException, MalformedURLException { // sanity check that endpoint/graph returns at least one triple String query = "SELECT * WHERE {?s ?p ?o} LIMIT 1"; @@ -219,17 +220,21 @@ } } - private List<EvaluatedAxiom> applyCELOE(SparqlEndpointKS ks, boolean equivalence) throws ComponentInitException, LearningProblemUnsupportedException { + private List<EvaluatedAxiom> applyCELOE(SparqlEndpointKS ks, boolean equivalence) throws ComponentInitException, LearningProblemUnsupportedException, MalformedURLException { SPARQLTasks st = new SPARQLTasks(se); // get instances of class as positive examples SPARQLReasoner sr = new SPARQLReasoner(ks); - SortedSet<Individual> posExamples = sr.getIndividuals((NamedClass)resource, 1000); + SortedSet<Individual> posExamples = sr.getIndividuals((NamedClass)resource, 50); SortedSet<String> posExStr = Helper.getStringSet(posExamples); - System.out.println(posExStr.size()); // get negative examples via various strategies AutomaticNegativeExampleFinderSPARQL finder = new AutomaticNegativeExampleFinderSPARQL(posExStr, st, null); + finder.makeNegativeExamplesFromNearbyClasses(posExStr, 50); + finder.makeNegativeExamplesFromParallelClasses(posExStr, 50); + finder.makeNegativeExamplesFromRelatedInstances(posExStr, "http://dbpedia.org/resource/"); + finder.makeNegativeExamplesFromSuperClasses(resource.getName(), 50); +// finder.makeNegativeExamplesFromRandomInstances(); SortedSet<String> negExStr = finder.getNegativeExamples(50, false); SortedSet<Individual> negExamples = Helper.getIndividualSet(negExStr); SortedSetTuple<Individual> examples = new SortedSetTuple<Individual>(posExamples, negExamples); @@ -239,15 +244,14 @@ SparqlKnowledgeSource ks2 = cm.knowledgeSource(SparqlKnowledgeSource.class); ks2.getConfigurator().setInstances(Datastructures.individualSetToStringSet(examples.getCompleteSet())); ks2.getConfigurator().setUrl(ks.getEndpoint().getURL()); + ks2.getConfigurator().setDefaultGraphURIs(new TreeSet<String>(ks.getEndpoint().getDefaultGraphURIs())); ks2.getConfigurator().setUseLits(false); ks2.getConfigurator().setUseCacheDatabase(true); ks2.getConfigurator().setRecursionDepth(1); ks2.getConfigurator().setCloseAfterRecursion(true); // ks2.getConfigurator().setSaveExtractedFragment(true); + ks2.init(); - - ks.init(); - AbstractReasonerComponent rc = cm.reasoner(FastInstanceChecker.class, ks2); rc.init(); @@ -255,6 +259,7 @@ ClassLearningProblem lp = cm.learningProblem(ClassLearningProblem.class, rc); // lp.setPositiveExamples(posExamples); // lp.setNegativeExamples(negExamples); + lp.getConfigurator().setClassToDescribe(resource.getURI().toURL()); lp.getConfigurator().setType("equivalence"); lp.getConfigurator().setAccuracyMethod("fmeasure"); lp.getConfigurator().setUseApproximations(false); @@ -425,9 +430,10 @@ SimpleLayout layout = new SimpleLayout(); ConsoleAppender consoleAppender = new ConsoleAppender(layout); + Logger.getRootLogger().setLevel(Level.WARN); + Logger.getLogger("org.dllearner").setLevel(Level.WARN); // seems to be needed for some reason (?) Logger.getRootLogger().removeAllAppenders(); Logger.getRootLogger().addAppender(consoleAppender); - Logger.getRootLogger().setLevel(Level.WARN); OptionParser parser = new OptionParser(); parser.acceptsAll(asList("h", "?", "help"), "Show help."); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jen...@us...> - 2011-08-16 09:52:03
|
Revision: 3050 http://dl-learner.svn.sourceforge.net/dl-learner/?rev=3050&view=rev Author: jenslehmann Date: 2011-08-16 09:51:57 +0000 (Tue, 16 Aug 2011) Log Message: ----------- started separate component manager class for annotation based components Modified Paths: -------------- trunk/components-core/src/main/java/org/dllearner/core/ComponentManager.java trunk/components-core/src/main/java/org/dllearner/core/config/ConfigOption.java trunk/interfaces/src/main/java/org/dllearner/cli/Enrichment.java trunk/scripts/src/main/java/org/dllearner/scripts/evaluation/EnrichmentEvaluation.java Added Paths: ----------- trunk/scripts/src/main/java/org/dllearner/scripts/DocumentationHTMLGenerator.java Modified: trunk/components-core/src/main/java/org/dllearner/core/ComponentManager.java =================================================================== --- trunk/components-core/src/main/java/org/dllearner/core/ComponentManager.java 2011-08-16 08:08:04 UTC (rev 3049) +++ trunk/components-core/src/main/java/org/dllearner/core/ComponentManager.java 2011-08-16 09:51:57 UTC (rev 3050) @@ -1,5 +1,5 @@ /** - * Copyright (C) 2007-2008, Jens Lehmann + * Copyright (C) 2007-2011, Jens Lehmann * * This file is part of DL-Learner. * @@ -43,6 +43,24 @@ import java.util.Map.Entry; import org.apache.log4j.Logger; +import org.dllearner.algorithms.DisjointClassesLearner; +import org.dllearner.algorithms.SimpleSubclassLearner; +import org.dllearner.algorithms.celoe.CELOE; +import org.dllearner.algorithms.properties.DataPropertyDomainAxiomLearner; +import org.dllearner.algorithms.properties.DataPropertyRangeAxiomLearner; +import org.dllearner.algorithms.properties.DisjointDataPropertyAxiomLearner; +import org.dllearner.algorithms.properties.DisjointObjectPropertyAxiomLearner; +import org.dllearner.algorithms.properties.EquivalentDataPropertyAxiomLearner; +import org.dllearner.algorithms.properties.EquivalentObjectPropertyAxiomLearner; +import org.dllearner.algorithms.properties.FunctionalDataPropertyAxiomLearner; +import org.dllearner.algorithms.properties.FunctionalObjectPropertyAxiomLearner; +import org.dllearner.algorithms.properties.InverseFunctionalObjectPropertyAxiomLearner; +import org.dllearner.algorithms.properties.ObjectPropertyDomainAxiomLearner; +import org.dllearner.algorithms.properties.ObjectPropertyRangeAxiomLearner; +import org.dllearner.algorithms.properties.SubDataPropertyOfAxiomLearner; +import org.dllearner.algorithms.properties.SubObjectPropertyOfAxiomLearner; +import org.dllearner.algorithms.properties.SymmetricObjectPropertyAxiomLearner; +import org.dllearner.algorithms.properties.TransitiveObjectPropertyAxiomLearner; import org.dllearner.core.options.ConfigEntry; import org.dllearner.core.options.ConfigOption; import org.dllearner.core.options.InvalidConfigOptionValueException; @@ -110,6 +128,7 @@ "org.dllearner.algorithms.isle.ISLE", "org.dllearner.algorithm.qtl.QTL" } )); + private static ComponentManager cm = null; // list of all configuration options of all components @@ -736,14 +755,4 @@ return list; } - /** - * Returns the name of a DL-Learner component. - * @param component - * @return Name of the component. - */ - public static String getName(Component component){ - ComponentAnn ann = component.getClass().getAnnotation(ComponentAnn.class); - return ann.name(); - } - } Modified: trunk/components-core/src/main/java/org/dllearner/core/config/ConfigOption.java =================================================================== --- trunk/components-core/src/main/java/org/dllearner/core/config/ConfigOption.java 2011-08-16 08:08:04 UTC (rev 3049) +++ trunk/components-core/src/main/java/org/dllearner/core/config/ConfigOption.java 2011-08-16 09:51:57 UTC (rev 3050) @@ -1,3 +1,22 @@ +/** + * Copyright (C) 2007-2011, Jens Lehmann + * + * This file is part of DL-Learner. + * + * DL-Learner is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * DL-Learner is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + * + */ package org.dllearner.core.config; import java.lang.annotation.Retention; @@ -4,14 +23,12 @@ import java.lang.annotation.RetentionPolicy; /** - * Created by IntelliJ IDEA. - * User: Chris - * Date: 7/26/11 - * Time: 8:55 PM * - * This is an example annotation class allowing one to configure a field with a name, description, and corresponding property editor. - * - * Note: Only put this on Setters that take the actual object you want to end up with as the example expects it to be on the setter + * Annotation for all DL-Learner configuration options. + * + * @author Chris Shellenbarger + * @author Jens Lehmann + * @author Lorenz Bühmann */ @Retention(RetentionPolicy.RUNTIME) public @interface ConfigOption { Modified: trunk/interfaces/src/main/java/org/dllearner/cli/Enrichment.java =================================================================== --- trunk/interfaces/src/main/java/org/dllearner/cli/Enrichment.java 2011-08-16 08:08:04 UTC (rev 3049) +++ trunk/interfaces/src/main/java/org/dllearner/cli/Enrichment.java 2011-08-16 09:51:57 UTC (rev 3050) @@ -64,6 +64,7 @@ import org.dllearner.algorithms.properties.SymmetricObjectPropertyAxiomLearner; import org.dllearner.algorithms.properties.TransitiveObjectPropertyAxiomLearner; import org.dllearner.core.AbstractReasonerComponent; +import org.dllearner.core.AnnComponentManager; import org.dllearner.core.AxiomLearningAlgorithm; import org.dllearner.core.ComponentAnn; import org.dllearner.core.ComponentInitException; @@ -304,7 +305,7 @@ ConfigHelper.configure(learner, "maxExecutionTimeInSeconds", maxExecutionTimeInSeconds); learner.init(); - String algName = ComponentManager.getName(learner); + String algName = AnnComponentManager.getName(learner); System.out.print("Applying " + algName + " on " + resource + " ... "); long startTime = System.currentTimeMillis(); try { Added: trunk/scripts/src/main/java/org/dllearner/scripts/DocumentationHTMLGenerator.java =================================================================== --- trunk/scripts/src/main/java/org/dllearner/scripts/DocumentationHTMLGenerator.java (rev 0) +++ trunk/scripts/src/main/java/org/dllearner/scripts/DocumentationHTMLGenerator.java 2011-08-16 09:51:57 UTC (rev 3050) @@ -0,0 +1,77 @@ +/** + * Copyright (C) 2007-2011, Jens Lehmann + * + * This file is part of DL-Learner. + * + * DL-Learner is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * DL-Learner is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + * + */ +package org.dllearner.scripts; + +import java.io.File; +import java.util.Map; +import java.util.TreeMap; +import java.util.Map.Entry; + +import org.dllearner.core.AnnComponentManager; +import org.dllearner.core.Component; + +/** + * Script for generating documentation for all components, in particular + * their configuration options, in HTML format. The script is based on + * the new (as of 2011) annotation based component design. + * + * @author Jens Lehmann + * + */ +public class DocumentationHTMLGenerator { + + private AnnComponentManager cm; + + public DocumentationHTMLGenerator() { + cm = AnnComponentManager.getInstance(); + } + + public void writeConfigDocumentation(File file) { + Map<Class<? extends Component>, String> componentNames = cm.getComponentsNamed(); + TreeMap<String, Class<? extends Component>> componentNamesInv = new TreeMap<String, Class<? extends Component>>(); + + // create inverse, ordered map for displaying labels + for(Entry<Class<? extends Component>, String> entry : componentNames.entrySet()) { + componentNamesInv.put(entry.getValue(), entry.getKey()); + } + + StringBuffer sb = new StringBuffer(); + sb.append(getHeader()); + + + sb.append(getFooter()); + } + + private String getHeader() { + return "<html><head><title>DL-Learner components and configuration options</title></head><body>"; + } + + private String getFooter() { + return "</body>"; + } + + public static void main(String[] args) { + File file = new File("doc/configOptions.html"); + DocumentationHTMLGenerator dg = new DocumentationHTMLGenerator(); + dg.writeConfigDocumentation(file); + System.out.println("Done"); + } + +} Modified: trunk/scripts/src/main/java/org/dllearner/scripts/evaluation/EnrichmentEvaluation.java =================================================================== --- trunk/scripts/src/main/java/org/dllearner/scripts/evaluation/EnrichmentEvaluation.java 2011-08-16 08:08:04 UTC (rev 3049) +++ trunk/scripts/src/main/java/org/dllearner/scripts/evaluation/EnrichmentEvaluation.java 2011-08-16 09:51:57 UTC (rev 3050) @@ -59,6 +59,7 @@ import org.dllearner.algorithms.properties.ObjectPropertyRangeAxiomLearner; import org.dllearner.algorithms.properties.SymmetricObjectPropertyAxiomLearner; import org.dllearner.algorithms.properties.TransitiveObjectPropertyAxiomLearner; +import org.dllearner.core.AnnComponentManager; import org.dllearner.core.AxiomLearningAlgorithm; import org.dllearner.core.ComponentInitException; import org.dllearner.core.ComponentManager; @@ -227,7 +228,7 @@ learner.init(); // learner.setPropertyToDescribe(property); // learner.setMaxExecutionTimeInSeconds(10); - String algName = ComponentManager.getName(learner); + String algName = AnnComponentManager.getName(learner); System.out.println("Applying " + algName + " on " + property + " ... "); long startTime = System.currentTimeMillis(); boolean timeout = false; @@ -279,7 +280,7 @@ learner.init(); // learner.setPropertyToDescribe(property); // learner.setMaxExecutionTimeInSeconds(10); - String algName = ComponentManager.getName(learner); + String algName = AnnComponentManager.getName(learner); System.out.println("Applying " + algName + " on " + property + " ... "); long startTime = System.currentTimeMillis(); boolean timeout = false; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jen...@us...> - 2011-08-16 15:57:17
|
Revision: 3053 http://dl-learner.svn.sourceforge.net/dl-learner/?rev=3053&view=rev Author: jenslehmann Date: 2011-08-16 15:57:11 +0000 (Tue, 16 Aug 2011) Log Message: ----------- - drafted methods for handling dependencies between components (based on reflection and existence of appropriate constructors) - started script generating HTML documentation for new annotation bases component system Modified Paths: -------------- trunk/components-core/src/main/java/org/dllearner/core/AnnComponentManager.java trunk/scripts/src/main/java/org/dllearner/scripts/DocumentationHTMLGenerator.java Modified: trunk/components-core/src/main/java/org/dllearner/core/AnnComponentManager.java =================================================================== --- trunk/components-core/src/main/java/org/dllearner/core/AnnComponentManager.java 2011-08-16 14:48:58 UTC (rev 3052) +++ trunk/components-core/src/main/java/org/dllearner/core/AnnComponentManager.java 2011-08-16 15:57:11 UTC (rev 3053) @@ -19,12 +19,16 @@ */ package org.dllearner.core; +import java.lang.reflect.Constructor; import java.util.ArrayList; import java.util.Arrays; import java.util.Collection; +import java.util.LinkedList; import java.util.List; import java.util.Map; +import org.apache.commons.lang.ClassUtils; + /** * Component manager for the new (as of 2011) annotation based configuration * system. @@ -100,7 +104,6 @@ */ public Collection<Class<? extends Component>> getComponents() { return components; -// return new LinkedList<Class<? extends Component>>(components); } /** @@ -114,7 +117,89 @@ return componentNames; } + public boolean isCompatible() { + return false; + } + + // gets all components which this component can be plugged into + public Collection<Class<? extends Component>> getPluggableComponents(Class<? extends Component> component) { + Collection<Class<? extends Component>> pluggableComponents = new LinkedList<Class<? extends Component>>(); + for(Class<? extends Component> comp : components) { + if(isPluggable(comp, component)) { + pluggableComponents.add(comp); + } + } + return pluggableComponents; + } + + // should return true if there exists a constructor in "compound" which can take + // "component" as argument (in any argument positions) + public boolean isPluggable(Class<? extends Component> compound, Class<? extends Component> argument) { + try { + Constructor<?>[] constructors = compound.getDeclaredConstructors(); + for(Constructor<?> constructor : constructors) { + Class<?>[] paraTypes = constructor.getParameterTypes(); + for(Class<?> paraType : paraTypes) { + if(ClassUtils.isAssignable(argument, paraType)) { + return true; + } + } + } + } catch (SecurityException e) { + e.printStackTrace(); + } + return false; + } + + public boolean isCompatible(Class<? extends Component> compound, Class<? extends Component>... arguments) { + if(areValidComponentConstructorArguments(arguments)) { + throw new Error("Please order arguments by their class names."); + } + return hasMatchingConstructor(compound, arguments); + } + + private boolean hasMatchingConstructor(Class<? extends Component> compound, Class<? extends Component>... arguments) { + try { + Constructor<?>[] constructors = compound.getDeclaredConstructors(); + for(Constructor<?> constructor : constructors) { + if(ClassUtils.isAssignable(arguments, constructor.getParameterTypes())) { + return true; + } + } + } catch (SecurityException e) { + e.printStackTrace(); + } + return false; + } + /** + * Components in DL-Learner can be plugged together by invoking an appropriate + * constructor. For efficiency reasons, they should be ordered by class + * names. This method allows to test this convention. + * + * Please note that components may have additional further constructors, but + * if a constructor has exclusively components as parameters, then it is + * required that they are ordered by class name. + * + * TODO: Possibly, we can replace our naive constructor detection code with + * a better implementation, which can detect whether an appropriate + * constructor exists even without fixing the order of arguments. (E.g. checking + * assignability for each parameter and argument; putting it into a matrix + * and then checking whether there is a row/column with only 1s.) + * + * @param arguments Argument classes. + * @return True of the order of arguments is correct and false otherwise. + */ + public boolean areValidComponentConstructorArguments(Class<? extends Component>... arguments) { + for(int i=0; i<arguments.length; i++) { + if(arguments[i].getName().compareTo(arguments[i+1].getName())<0) { + return false; + } + } + return true; + } + + /** * Returns the name of a DL-Learner component. * @param component * @return Name of the component. Modified: trunk/scripts/src/main/java/org/dllearner/scripts/DocumentationHTMLGenerator.java =================================================================== --- trunk/scripts/src/main/java/org/dllearner/scripts/DocumentationHTMLGenerator.java 2011-08-16 14:48:58 UTC (rev 3052) +++ trunk/scripts/src/main/java/org/dllearner/scripts/DocumentationHTMLGenerator.java 2011-08-16 15:57:11 UTC (rev 3053) @@ -55,7 +55,21 @@ StringBuffer sb = new StringBuffer(); sb.append(getHeader()); + // heading + sb.append("<h1>DL-Learner Components</h1>\n"); + // generate component overview + sb.append("<ul>\n"); + for(Entry<String, Class<? extends Component>> compEntry : componentNamesInv.entrySet()) { + sb.append("<li><a href=\"#" + compEntry.getValue() + "\">"+compEntry.getKey()+"</a></li>\n"); + } + sb.append("</ul>\n"); + + // generate actual documentation per component + for(Entry<String, Class<? extends Component>> compEntry : componentNamesInv.entrySet()) { + sb.append("<a name=\"#" + compEntry.getValue() + "\" /><h2>"+compEntry.getKey()+"</h2>\n"); + } + sb.append(getFooter()); } @@ -64,7 +78,7 @@ } private String getFooter() { - return "</body>"; + return "</body></html>"; } public static void main(String[] args) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jen...@us...> - 2011-08-17 07:08:02
|
Revision: 3054 http://dl-learner.svn.sourceforge.net/dl-learner/?rev=3054&view=rev Author: jenslehmann Date: 2011-08-17 07:07:55 +0000 (Wed, 17 Aug 2011) Log Message: ----------- test of Spring framework on new component design Modified Paths: -------------- trunk/components-core/src/main/java/org/dllearner/core/configurators/ComponentFactory.java trunk/components-core/src/main/java/org/dllearner/core/configurators/SparqlEndpointKSConfigurator.java trunk/components-core/src/main/java/org/dllearner/kb/SparqlEndpointKS.java trunk/interfaces/pom.xml trunk/pom.xml Added Paths: ----------- trunk/interfaces/src/test/java/org/dllearner/test/SpringTest.java trunk/test/spring/ trunk/test/spring/example.xml Property Changed: ---------------- trunk/interfaces/ Modified: trunk/components-core/src/main/java/org/dllearner/core/configurators/ComponentFactory.java =================================================================== --- trunk/components-core/src/main/java/org/dllearner/core/configurators/ComponentFactory.java 2011-08-16 15:57:11 UTC (rev 3053) +++ trunk/components-core/src/main/java/org/dllearner/core/configurators/ComponentFactory.java 2011-08-17 07:07:55 UTC (rev 3054) @@ -87,9 +87,9 @@ /** * @return a component ready for initialization SparqlEndpointKS **/ -public static SparqlEndpointKS getSparqlEndpointKS() { -return SparqlEndpointKSConfigurator.getSparqlEndpointKS(); -} +//public static SparqlEndpointKS getSparqlEndpointKS() { +//return SparqlEndpointKSConfigurator.getSparqlEndpointKS(); +//} /** * @param url URL of SPARQL Endpoint Modified: trunk/components-core/src/main/java/org/dllearner/core/configurators/SparqlEndpointKSConfigurator.java =================================================================== --- trunk/components-core/src/main/java/org/dllearner/core/configurators/SparqlEndpointKSConfigurator.java 2011-08-16 15:57:11 UTC (rev 3053) +++ trunk/components-core/src/main/java/org/dllearner/core/configurators/SparqlEndpointKSConfigurator.java 2011-08-17 07:07:55 UTC (rev 3054) @@ -42,10 +42,10 @@ /** * @return SparqlEndpointKS **/ -public static SparqlEndpointKS getSparqlEndpointKS() { -SparqlEndpointKS component = ComponentManager.getInstance().knowledgeSource(SparqlEndpointKS.class); -return component; -} +//public static SparqlEndpointKS getSparqlEndpointKS() { +//SparqlEndpointKS component = ComponentManager.getInstance().knowledgeSource(SparqlEndpointKS.class); +//return component; +//} Modified: trunk/components-core/src/main/java/org/dllearner/kb/SparqlEndpointKS.java =================================================================== --- trunk/components-core/src/main/java/org/dllearner/kb/SparqlEndpointKS.java 2011-08-16 15:57:11 UTC (rev 3053) +++ trunk/components-core/src/main/java/org/dllearner/kb/SparqlEndpointKS.java 2011-08-17 07:07:55 UTC (rev 3054) @@ -19,15 +19,12 @@ */ package org.dllearner.kb; -import java.io.File; -import java.net.URI; +import java.net.URL; +import java.util.LinkedList; +import java.util.List; import org.dllearner.core.ComponentInitException; -import org.dllearner.core.AbstractKnowledgeSource; -import org.dllearner.core.OntologyFormat; -import org.dllearner.core.OntologyFormatUnsupportedException; -import org.dllearner.core.configurators.SparqlEndpointKSConfigurator; -import org.dllearner.core.owl.KB; +import org.dllearner.core.KnowledgeSource; import org.dllearner.kb.sparql.SparqlEndpoint; /** @@ -38,42 +35,56 @@ * @author Jens Lehmann * */ -public class SparqlEndpointKS extends AbstractKnowledgeSource { +public class SparqlEndpointKS implements KnowledgeSource { private SparqlEndpoint endpoint; + + // TODO: turn those into config options + private URL url; + private List<String> defaultGraphURIs = new LinkedList<String>(); + private List<String> namedGraphURIs = new LinkedList<String>(); - private SparqlEndpointKSConfigurator configurator ; + public SparqlEndpointKS() { + + } - @Override - public SparqlEndpointKSConfigurator getConfigurator(){ - return configurator; - } - public SparqlEndpointKS(SparqlEndpoint endpoint) { this.endpoint = endpoint; } @Override - public KB toKB() { - return null; + public void init() throws ComponentInitException { + if(endpoint == null) { + endpoint = new SparqlEndpoint(url, defaultGraphURIs, namedGraphURIs); + } } + + public SparqlEndpoint getEndpoint() { + return endpoint; + } - @Override - public String toDIG(URI kbURI) { - return null; + public URL getUrl() { + return url; } - @Override - public void export(File file, OntologyFormat format) - throws OntologyFormatUnsupportedException { + public void setUrl(URL url) { + this.url = url; } - @Override - public void init() throws ComponentInitException { + public List<String> getDefaultGraphURIs() { + return defaultGraphURIs; } - - public SparqlEndpoint getEndpoint() { - return endpoint; + + public void setDefaultGraphURIs(List<String> defaultGraphURIs) { + this.defaultGraphURIs = defaultGraphURIs; } + public List<String> getNamedGraphURIs() { + return namedGraphURIs; + } + + public void setNamedGraphURIs(List<String> namedGraphURIs) { + this.namedGraphURIs = namedGraphURIs; + } + } Property changes on: trunk/interfaces ___________________________________________________________________ Modified: svn:ignore - interfaces.iml target log .classpath .project .settings + interfaces.iml target log cache .classpath .project .settings Modified: trunk/interfaces/pom.xml =================================================================== --- trunk/interfaces/pom.xml 2011-08-16 15:57:11 UTC (rev 3053) +++ trunk/interfaces/pom.xml 2011-08-17 07:07:55 UTC (rev 3054) @@ -192,6 +192,10 @@ <artifactId>json-simple</artifactId> </dependency> + <dependency> + <groupId>org.springframework</groupId> + <artifactId>spring-context</artifactId> + </dependency> </dependencies> Added: trunk/interfaces/src/test/java/org/dllearner/test/SpringTest.java =================================================================== --- trunk/interfaces/src/test/java/org/dllearner/test/SpringTest.java (rev 0) +++ trunk/interfaces/src/test/java/org/dllearner/test/SpringTest.java 2011-08-17 07:07:55 UTC (rev 3054) @@ -0,0 +1,51 @@ +/** + * Copyright (C) 2007-2011, Jens Lehmann + * + * This file is part of DL-Learner. + * + * DL-Learner is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * DL-Learner is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + * + */ +package org.dllearner.test; + +import java.util.List; + +import org.dllearner.core.AxiomLearningAlgorithm; +import org.dllearner.core.EvaluatedAxiom; +import org.springframework.beans.factory.BeanFactory; +import org.springframework.beans.factory.xml.XmlBeanFactory; +import org.springframework.core.io.FileSystemResource; +import org.springframework.core.io.Resource; + +/** + * + * Test of spring for new component system. + * + * @author Jens Lehmann + * + */ +public class SpringTest { + + public static void main(String[] args) { + Resource resource = new FileSystemResource("../test/spring/example.xml"); + BeanFactory factory = new XmlBeanFactory(resource); + AxiomLearningAlgorithm alg = (AxiomLearningAlgorithm) factory.getBean("learner"); + alg.start(); + List<EvaluatedAxiom> axioms = alg.getCurrentlyBestEvaluatedAxioms(10); + for(EvaluatedAxiom axiom : axioms) { + System.out.println(axiom.toString()); + } + } + +} Modified: trunk/pom.xml =================================================================== --- trunk/pom.xml 2011-08-16 15:57:11 UTC (rev 3053) +++ trunk/pom.xml 2011-08-17 07:07:55 UTC (rev 3054) @@ -391,6 +391,12 @@ <scope>provided</scope> </dependency> + <!-- Spring --> + <dependency> + <groupId>org.springframework</groupId> + <artifactId>spring-context</artifactId> + <version>3.0.5.RELEASE</version> + </dependency> </dependencies> </dependencyManagement> Added: trunk/test/spring/example.xml =================================================================== --- trunk/test/spring/example.xml (rev 0) +++ trunk/test/spring/example.xml 2011-08-17 07:07:55 UTC (rev 3054) @@ -0,0 +1,23 @@ +<?xml version="1.0" encoding="UTF-8"?> +<beans xmlns="http://www.springframework.org/schema/beans" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd"> + + <bean class="org.dllearner.kb.SparqlEndpointKS" id="ks" + init-method="init"> + <property name="url" value="http://live.dbpedia.org/sparql" /> + <property name="defaultGraphURIs"> + <list> + <value>http://dbpedia.org</value> + </list> + </property> + </bean> + + <bean + class="org.dllearner.algorithms.properties.ObjectPropertyRangeAxiomLearner" + id="learner" init-method="init"> + <constructor-arg ref="ks" /> + <property name="propertyToDescribe" value="http://dbpedia.org/ontology/leader" /> + </bean> + +</beans> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <lor...@us...> - 2011-08-17 09:25:51
|
Revision: 3057 http://dl-learner.svn.sourceforge.net/dl-learner/?rev=3057&view=rev Author: lorenz_b Date: 2011-08-17 09:25:45 +0000 (Wed, 17 Aug 2011) Log Message: ----------- Changed hasAxiom property to belongsTo annotation. Modified Paths: -------------- trunk/components-core/src/main/java/org/dllearner/core/EvaluatedAxiom.java trunk/components-core/src/main/java/org/dllearner/utilities/EnrichmentVocabulary.java trunk/interfaces/src/main/java/org/dllearner/cli/Enrichment.java Modified: trunk/components-core/src/main/java/org/dllearner/core/EvaluatedAxiom.java =================================================================== --- trunk/components-core/src/main/java/org/dllearner/core/EvaluatedAxiom.java 2011-08-17 08:41:36 UTC (rev 3056) +++ trunk/components-core/src/main/java/org/dllearner/core/EvaluatedAxiom.java 2011-08-17 09:25:45 UTC (rev 3057) @@ -3,6 +3,7 @@ import java.io.PrintWriter; import java.io.StringWriter; import java.util.ArrayList; +import java.util.Collections; import java.util.HashMap; import java.util.List; import java.util.Map; @@ -11,7 +12,9 @@ import org.dllearner.core.owl.Axiom; import org.dllearner.utilities.EnrichmentVocabulary; import org.dllearner.utilities.owl.OWLAPIConverter; +import org.semanticweb.owlapi.apibinding.OWLManager; import org.semanticweb.owlapi.model.IRI; +import org.semanticweb.owlapi.model.OWLAnnotation; import org.semanticweb.owlapi.model.OWLAxiom; import org.semanticweb.owlapi.model.OWLDataFactory; import org.semanticweb.owlapi.model.OWLIndividual; @@ -60,8 +63,9 @@ ax.accept(r); OWLAxiom ax1 = f.getOWLClassAssertionAxiom(EnrichmentVocabulary.Suggestion, ind); - OWLAxiom ax2 = f.getOWLDataPropertyAssertionAxiom(EnrichmentVocabulary.hasAxiom, ind, sw.toString()); -// f.getOWLAnnotationAssertionAxiom(f.getOWLAnnotationProperty(IRI.create("annoProp")), ind.getIRI(), ax); +// OWLAxiom ax2 = f.getOWLDataPropertyAssertionAxiom(EnrichmentVocabulary.hasAxiom, ind, sw.toString()); + OWLAnnotation anno = f.getOWLAnnotation(EnrichmentVocabulary.belongsTo, ind.getIRI()); + OWLAxiom ax2 = ax.getAnnotatedAxiom(Collections.singleton(anno)); OWLAxiom ax3 = f.getOWLDataPropertyAssertionAxiom(EnrichmentVocabulary.confidence, ind, score.getAccuracy()); List<OWLAxiom> axioms = new ArrayList<OWLAxiom>(); Modified: trunk/components-core/src/main/java/org/dllearner/utilities/EnrichmentVocabulary.java =================================================================== --- trunk/components-core/src/main/java/org/dllearner/utilities/EnrichmentVocabulary.java 2011-08-17 08:41:36 UTC (rev 3056) +++ trunk/components-core/src/main/java/org/dllearner/utilities/EnrichmentVocabulary.java 2011-08-17 09:25:45 UTC (rev 3057) @@ -1,6 +1,7 @@ package org.dllearner.utilities; import org.semanticweb.owlapi.model.IRI; +import org.semanticweb.owlapi.model.OWLAnnotationProperty; import org.semanticweb.owlapi.model.OWLClass; import org.semanticweb.owlapi.model.OWLDataFactory; import org.semanticweb.owlapi.model.OWLDataProperty; @@ -12,8 +13,10 @@ private static final OWLDataFactory factory = new OWLDataFactoryImpl(); + //the default namespace public static final String NS = "http://www.dl-learner.org/enrichment.owl#"; + //the classes public static final OWLClass ChangeSet = factory.getOWLClass(IRI.create(NS + "ChangeSet")); @@ -59,4 +62,8 @@ public static final OWLDataProperty hasAxiom = factory.getOWLDataProperty(IRI.create(NS + "hasAxiom")); + + //the annotation properties + public static final OWLAnnotationProperty belongsTo = factory.getOWLAnnotationProperty(IRI.create(NS + "belongsTo")); + } Modified: trunk/interfaces/src/main/java/org/dllearner/cli/Enrichment.java =================================================================== --- trunk/interfaces/src/main/java/org/dllearner/cli/Enrichment.java 2011-08-17 08:41:36 UTC (rev 3056) +++ trunk/interfaces/src/main/java/org/dllearner/cli/Enrichment.java 2011-08-17 09:25:45 UTC (rev 3057) @@ -433,7 +433,7 @@ printManchesterOWLSyntax(axioms, defaultNamespace); -// printTurtleSyntax(axioms); + printTurtleSyntax(axioms); // printNTriplesSyntax(axioms); } @@ -448,7 +448,6 @@ try { System.out.println("ENRICHMENT["); - OWLOntologyDocumentTarget documentTarget = new SystemOutDocumentTarget(); ManchesterOWLSyntaxOntologyFormat manSyntaxFormat = new ManchesterOWLSyntaxOntologyFormat(); manSyntaxFormat.setDefaultPrefix(defaultNamespace); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <lor...@us...> - 2011-08-17 10:58:31
|
Revision: 3058 http://dl-learner.svn.sourceforge.net/dl-learner/?rev=3058&view=rev Author: lorenz_b Date: 2011-08-17 10:58:25 +0000 (Wed, 17 Aug 2011) Log Message: ----------- Added more enrichment vocabulary. Modified Paths: -------------- trunk/components-core/src/main/java/org/dllearner/utilities/EnrichmentVocabulary.java trunk/interfaces/src/main/java/org/dllearner/cli/Enrichment.java Modified: trunk/components-core/src/main/java/org/dllearner/utilities/EnrichmentVocabulary.java =================================================================== --- trunk/components-core/src/main/java/org/dllearner/utilities/EnrichmentVocabulary.java 2011-08-17 09:25:45 UTC (rev 3057) +++ trunk/components-core/src/main/java/org/dllearner/utilities/EnrichmentVocabulary.java 2011-08-17 10:58:25 UTC (rev 3058) @@ -30,7 +30,11 @@ public static final OWLClass AlgorithmRun = factory.getOWLClass(IRI.create(NS + "AlgorithmRun")); + public static final OWLClass SPARQLEndpoint = factory.getOWLClass(IRI.create(NS + "SPARQL_Endpoint")); + public static final OWLClass OWLFile = factory.getOWLClass(IRI.create(NS + "OWL_File")); + + //the object properties public static final OWLObjectProperty creator = factory.getOWLObjectProperty(IRI.create(NS + "creator")); @@ -46,7 +50,9 @@ public static final OWLObjectProperty usedAlgorithm = factory.getOWLObjectProperty(IRI.create(NS + "usedAlgorithm")); + public static final OWLObjectProperty defaultGraph = factory.getOWLObjectProperty(IRI.create(NS + "defaultGraph")); + //the data properties public static final OWLDataProperty confidence = factory.getOWLDataProperty(IRI.create(NS + "confidence")); Modified: trunk/interfaces/src/main/java/org/dllearner/cli/Enrichment.java =================================================================== --- trunk/interfaces/src/main/java/org/dllearner/cli/Enrichment.java 2011-08-17 09:25:45 UTC (rev 3057) +++ trunk/interfaces/src/main/java/org/dllearner/cli/Enrichment.java 2011-08-17 10:58:25 UTC (rev 3058) @@ -110,6 +110,7 @@ import org.semanticweb.owlapi.model.OWLAxiom; import org.semanticweb.owlapi.model.OWLDataFactory; import org.semanticweb.owlapi.model.OWLIndividual; +import org.semanticweb.owlapi.model.OWLNamedIndividual; import org.semanticweb.owlapi.model.OWLOntology; import org.semanticweb.owlapi.model.OWLOntologyCreationException; import org.semanticweb.owlapi.model.OWLOntologyManager; @@ -401,22 +402,29 @@ f.getOWLLiteral(algorithmName)); ax = f.getOWLAnnotationAssertionAxiom(algorithmInd.asOWLNamedIndividual().getIRI(), labelAnno); axioms.add(ax); + //add version to algorithm + //TODO //add algorithm instance to algorithm run instance ax = f.getOWLObjectPropertyAssertionAxiom(EnrichmentVocabulary.usedAlgorithm, algorithmRunInd, algorithmInd); axioms.add(ax); //add Parameters to algorithm run instance //TODO - //add used input to algorithm run instance try { + OWLNamedIndividual knowldegeBaseInd = f.getOWLNamedIndividual(IRI.create(ks.getEndpoint().getURL())); + ax = f.getOWLClassAssertionAxiom(EnrichmentVocabulary.SPARQLEndpoint, knowldegeBaseInd); + axioms.add(ax); + ax = f.getOWLObjectPropertyAssertionAxiom(EnrichmentVocabulary.defaultGraph, knowldegeBaseInd, f.getOWLNamedIndividual(IRI.create(ks.getEndpoint().getDefaultGraphURIs().iterator().next()))); + axioms.add(ax); ax = f.getOWLObjectPropertyAssertionAxiom(EnrichmentVocabulary.hasInput, - algorithmRunInd, f.getOWLNamedIndividual(IRI.create(ks.getEndpoint().getURL()))); + algorithmRunInd, knowldegeBaseInd); + axioms.add(ax); } catch (URISyntaxException e1) { e1.printStackTrace(); } - axioms.add(ax); + //add algorithm run instance to suggestion set instance via ObjectProperty creator ax = f.getOWLObjectPropertyAssertionAxiom(EnrichmentVocabulary.creator, ind, algorithmRunInd); @@ -450,6 +458,7 @@ ManchesterOWLSyntaxOntologyFormat manSyntaxFormat = new ManchesterOWLSyntaxOntologyFormat(); manSyntaxFormat.setDefaultPrefix(defaultNamespace); + manSyntaxFormat.setPrefix("enrichment", "http://www.dl-learner.org/enrichment.owl#"); OWLOntologyManager man = OWLManager.createOWLOntologyManager(); OWLOntology ontology = man.createOntology(new HashSet<OWLAxiom>(axioms), IRI.create(defaultNamespace + "enrichment")); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |