From: <jen...@us...> - 2007-08-28 10:55:25
|
Revision: 79 http://dl-learner.svn.sourceforge.net/dl-learner/?rev=79&view=rev Author: jenslehmann Date: 2007-08-28 03:55:23 -0700 (Tue, 28 Aug 2007) Log Message: ----------- build in function to call parser as standalone tool Modified Paths: -------------- trunk/src/dl-learner/org/dllearner/parser/DLLearner.java trunk/src/dl-learner/org/dllearner/parser/dllearner.jj trunk/src/dl-learner/org/dllearner/parser/dllearner.jjt Modified: trunk/src/dl-learner/org/dllearner/parser/DLLearner.java =================================================================== --- trunk/src/dl-learner/org/dllearner/parser/DLLearner.java 2007-08-28 10:44:01 UTC (rev 78) +++ trunk/src/dl-learner/org/dllearner/parser/DLLearner.java 2007-08-28 10:55:23 UTC (rev 79) @@ -73,6 +73,14 @@ } } + public static Map<AtomicConcept,SortedSet<Individual>> getPositiveExamples() { + return positiveExamples; + } + + public static Map<AtomicConcept,SortedSet<Individual>> getNegativeExamples() { + return negativeExamples; + } + /* private static void addFunctionCall(String functionName, String argument) { if(functionCalls.containsKey(functionName)) { @@ -127,6 +135,15 @@ return c; } + public static void parseFile(String filename) { + try { + new DLLearner(new FileInputStream(filename)); + DLLearner.Start(); + } catch(Exception e) { + e.printStackTrace(); + } + } + public static void main(String args[]) { if(args.length==0) { @@ -1544,66 +1561,6 @@ finally { jj_save(11, xla); } } - static final private boolean jj_3R_50() { - if (jj_scan_token(LE)) return true; - return false; - } - - static final private boolean jj_3R_47() { - if (jj_scan_token(EXISTS)) return true; - return false; - } - - static final private boolean jj_3R_49() { - if (jj_scan_token(GE)) return true; - return false; - } - - static final private boolean jj_3R_45() { - if (jj_scan_token(BOTTOM)) return true; - return false; - } - - static final private boolean jj_3R_39() { - if (jj_scan_token(NOT)) return true; - return false; - } - - static final private boolean jj_3R_51() { - if (jj_3R_4()) return true; - return false; - } - - static final private boolean jj_3R_48() { - if (jj_scan_token(ALL)) return true; - return false; - } - - static final private boolean jj_3R_46() { - Token xsp; - xsp = jj_scanpos; - if (jj_3R_51()) { - jj_scanpos = xsp; - if (jj_3R_52()) return true; - } - return false; - } - - static final private boolean jj_3R_44() { - if (jj_scan_token(TOP)) return true; - return false; - } - - static final private boolean jj_3R_20() { - if (jj_scan_token(AND)) return true; - return false; - } - - static final private boolean jj_3R_21() { - if (jj_scan_token(OR)) return true; - return false; - } - static final private boolean jj_3R_19() { if (jj_3R_4()) return true; return false; @@ -1995,6 +1952,66 @@ return false; } + static final private boolean jj_3R_50() { + if (jj_scan_token(LE)) return true; + return false; + } + + static final private boolean jj_3R_47() { + if (jj_scan_token(EXISTS)) return true; + return false; + } + + static final private boolean jj_3R_49() { + if (jj_scan_token(GE)) return true; + return false; + } + + static final private boolean jj_3R_45() { + if (jj_scan_token(BOTTOM)) return true; + return false; + } + + static final private boolean jj_3R_39() { + if (jj_scan_token(NOT)) return true; + return false; + } + + static final private boolean jj_3R_51() { + if (jj_3R_4()) return true; + return false; + } + + static final private boolean jj_3R_48() { + if (jj_scan_token(ALL)) return true; + return false; + } + + static final private boolean jj_3R_46() { + Token xsp; + xsp = jj_scanpos; + if (jj_3R_51()) { + jj_scanpos = xsp; + if (jj_3R_52()) return true; + } + return false; + } + + static final private boolean jj_3R_44() { + if (jj_scan_token(TOP)) return true; + return false; + } + + static final private boolean jj_3R_20() { + if (jj_scan_token(AND)) return true; + return false; + } + + static final private boolean jj_3R_21() { + if (jj_scan_token(OR)) return true; + return false; + } + static private boolean jj_initialized_once = false; static public DLLearnerTokenManager token_source; static SimpleCharStream jj_input_stream; Modified: trunk/src/dl-learner/org/dllearner/parser/dllearner.jj =================================================================== --- trunk/src/dl-learner/org/dllearner/parser/dllearner.jj 2007-08-28 10:44:01 UTC (rev 78) +++ trunk/src/dl-learner/org/dllearner/parser/dllearner.jj 2007-08-28 10:55:23 UTC (rev 79) @@ -91,6 +91,14 @@ } } + public static Map<AtomicConcept,SortedSet<Individual>> getPositiveExamples() { + return positiveExamples; + } + + public static Map<AtomicConcept,SortedSet<Individual>> getNegativeExamples() { + return negativeExamples; + } + /* private static void addFunctionCall(String functionName, String argument) { if(functionCalls.containsKey(functionName)) { @@ -145,6 +153,15 @@ return c; } + public static void parseFile(String filename) { + try { + new DLLearner(new FileInputStream(filename)); + DLLearner.Start(); + } catch(Exception e) { + e.printStackTrace(); + } + } + public static void main(String args[]) { if(args.length==0) { Modified: trunk/src/dl-learner/org/dllearner/parser/dllearner.jjt =================================================================== --- trunk/src/dl-learner/org/dllearner/parser/dllearner.jjt 2007-08-28 10:44:01 UTC (rev 78) +++ trunk/src/dl-learner/org/dllearner/parser/dllearner.jjt 2007-08-28 10:55:23 UTC (rev 79) @@ -87,6 +87,14 @@ } } + public static Map<AtomicConcept,SortedSet<Individual>> getPositiveExamples() { + return positiveExamples; + } + + public static Map<AtomicConcept,SortedSet<Individual>> getNegativeExamples() { + return negativeExamples; + } + /* private static void addFunctionCall(String functionName, String argument) { if(functionCalls.containsKey(functionName)) { @@ -141,6 +149,15 @@ return c; } + public static void parseFile(String filename) { + try { + new DLLearner(new FileInputStream(filename)); + DLLearner.Start(); + } catch(Exception e) { + e.printStackTrace(); + } + } + public static void main(String args[]) { if(args.length==0) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |