From: <jen...@us...> - 2008-02-18 15:54:05
|
Revision: 604 http://dl-learner.svn.sourceforge.net/dl-learner/?rev=604&view=rev Author: jenslehmann Date: 2008-02-18 07:54:00 -0800 (Mon, 18 Feb 2008) Log Message: ----------- - updated doc folder - small fix in build script Modified Paths: -------------- trunk/build.xml trunk/src/dl-learner/org/dllearner/Info.java Added Paths: ----------- trunk/doc/kbFileSyntax.txt Removed Paths: ------------- trunk/doc/configOptionsOld.txt trunk/doc/sparqlModule.txt Modified: trunk/build.xml =================================================================== --- trunk/build.xml 2008-02-18 15:35:03 UTC (rev 603) +++ trunk/build.xml 2008-02-18 15:54:00 UTC (rev 604) @@ -92,7 +92,7 @@ <!-- copy source code --> <mkdir dir="${release_tmp_dir}/src/"/> <copy toDir="${release_tmp_dir}/src/"> - <fileset dir="${source_dir}" includes="**/*.java,**/*.jjt,build.xml"/> + <fileset dir="${source_dir}" includes="**/*.java,**/*.html,**/*.gif,**/*.jjt,build.xml"/> </copy> <!-- create copy developer documentation --> Deleted: trunk/doc/configOptionsOld.txt =================================================================== --- trunk/doc/configOptionsOld.txt 2008-02-18 15:35:03 UTC (rev 603) +++ trunk/doc/configOptionsOld.txt 2008-02-18 15:54:00 UTC (rev 604) @@ -1,294 +0,0 @@ -Configuration Files -=================== - -This file gives an overview for running DL-Learner using configuration files -as provided in the examples directory. - -The background knowledge can either be given as OWL DL file (using the import -function in the configuration files) or by specifying it directly in the -configuration file (which we refer to as the internal knowledge base). - -Some examples of the syntax of the background knowledge in the internal -knowledge base: - -person = (male OR female). -mother = (female AND EXISTS hasChild.TOP). -motherManyDaughters = (female AND >= 4 hasChild.female). -(mother AND father) SUBCLASSOF person. - -Also see the example files. - -This is the EBNF description of the input language [slightly outdated]: - -Number = ["1"-"9"] (["0"-"9"])* -Id = ["a"-"z"] (["_","a"-"z","A"-"Z","0"-"9"])* -String: "\"" (~["\"","\\","\n","\r"])* "\"" -Instruction = ConfOption - | FunctionCall - | PosExample - | NegExample - | ABoxConcept - | ABoxRole - | Transitive - | Functional - | Symmetric - | Inverse - | Subrole - | TBoxEquiv - | TBoxSub -ConfOption = Id [ "." Id ] "=" ( Id | Number ) ";" -FunctionCall = Id "(" String ")" ";" -PosExample = "+" Id "(" Id ")" "." -NegExample = "-" Id "(" Id ")" "." -ABoxConcept = Concept "(" Id ")" "." -ABoxRole = Id "(" Id "," Id ")" "." -Transitive = "Transitive" "(" Id ")" "." -Functional = "Functional" "(" Id ")" "." -Symmetric = "Symmetric" "(" Id ")" "." -Inverse = "Inverse" "(" Id "," Id ")" "." -Subrole = "Subrole" "(" Id "," Id ")" "." -TBoxEquiv = Concept "=" Concept "." -TBoxSub = Concept ("SUBCLASSOF" | "SUB" ) Concept "." -Concept = "TOP" - | "BOTTOM" - | Id - | "(" Concept "AND" Concept ")" - | "(" Concept "OR" Concept ")" - | "EXISTS" Id "." Concept - | "ALL" Id "." Concept - | "NOT" Concept - | ">=" Number Id "." Concept - | "<=" Number Id "." Concept - -Configuration Options -===================== - -General -------- - -Option: algorithm -Possible Values: bruteForce, gp, random, refinement, hybridGP -Default: refinement -Effect: Specifies the algorithm to use for solving the learning problem. Note, - that hybridGP is not an algorithm itself, but starts the GP algorithm - with a sensible set of default values for the hybrid algorithm combining - GP with refinement operators. In particular the probability of all - operators except refinement is set to 0. - -Option: reasoner -Possible Values: dig, kaon2, fastRetrieval -Default: dig -Effect: Specifies the reasoner to be used. DIG communicates with a reasoner - using the DIG Interface. KAON2 means to use the KAON2 Java API directly. - FastRetrieval is an internal algorithm, which can only be used for - retrieval (not for subsumption). Currently the DIG reasoner cannot read - OWL files. - -Option: digReasonerURL -Possible Values: a valid URL -Default: http://localhost:8081 -Effect: Specifies the URL to be used to look for a DIG capable reasoner. - -Option: writeDIGProtocol -Possible Values: true, false -Default: false -Effect: Specifies whether to store all DIG communication. - -Option: digProtocolFile -Possible Values: strings -Default: digProtocol.txt -Effect: The file to store all DIG communication if writeDIGProtocol is true. - -Option: useRetrievalForClassification -Possible Values: true, false -Default: false -Effect: To measure which concepts are covered, one can either use one retrieval - or several instance checks (at most one for each example). This option - controls which of both options should be used. - -Option: percentPerLengthUnit -Possible Values: 0-1 -Default: 0.05 -Effect: How much percent (wrt classification accuracy) can a concept be worse to - justify an increase in length of 1. This variable is used for GP and in - refinement when the flexible heuristic is used. For GP, you should use a - value smaller than the default. - -> general options below are ignored < -> by the refinement operator algorithm < - -Option: accuracyPenalty -Possible Values: 1-1000 -Default: 1 -Effect: Sets the penalty for "small misclassifications". - -Option: errorPenalty -Possible Values: 1-1000 -Default: 3 -Effect: Sets the penalty for classification errors. - -Option: maxLength -Possible Values: 1-20 -Default: 7 -Effect: For the brute force learner this specifies the depth limit for the - search. The GP learner currently ignores it. - -Option: scoreMethod -Possible Values: full, positive -Default: positive -Effect: The positive score method ignores if a negative examples cannot be - classified. This is often usefull, because of the limited expressiveness - of SHIQ wrt. negated role assertions. The full method penalizes this. - -Option: showCorrectClassifications -Possible Values: true, false -Default: false -Effect: Controls if correct classifications are printed (does not effect the - algorithm). - -Option: penalizeNeutralExamples -Possible Values: true, false -Default: false -Effect: If true there is a penalty if a neutral (neither positive nor negative) - individual is classified as either positive or negative. This should - usually be set to false. - -Refinement Operator Algorithm Specific --------------------------------------- - -Option: refinement.horizontalExpansionFactor -Possible Values: 0-1 -Default: 0.6 -Effect: Specifies horizontal expansion factor. - -Option: refinement.writeSearchTree -Possible Values: true, false -Default: false -Effect: Specifies whether to write the search tree to a file. - -Option: refinement.searchTreeFile -Possible Values: strings -Default: "searchTree.txt" -Effect: Specifies a file to save the current search tree after each loop of - the refinement algorithm. - -Option: refinement.heuristic -Possible Values: flexible, lexicographic -Default: lexicographic -Effect: The refinement operator together with a heuristic yields a learning - algorithm. The lexicographic heuristic uses a lexicographic order of - covered negative examples and horizontal expansion of a node (i.e. - the covered examples are the first criterion, the horizontal expansion - the second criterion). The flexible heuristic computes a combined node - score of both criteria. Note, that the lexicographic needs a horizontal - expansion factor greater than 0 to ensure correctness of the learning - algorithm. - -Option: refinement.quiet -Possible Values: true, false -Default: false -Effect: If set to true, no messages will be shown during the run of the - algorithm (but there will still be startup and summary messages). - -Option: refinement.applyAllFilter -Possible Values: true, false -Default: true -Effect: Specifies wether all equivalences should be used. - -Option: refinement.applyExistsFilter -Possible Values: true, false -Default: true -Effect: Specifies wether exists equivalences should be used. - -Option: refinement.useTooWeakList -Possible Values: true, false -Default: true -Effect: Specifies wether a too weak list should be used to reduce reasoner - requests. - -Option: refinement.useOverlyGeneralList -Possible Values: true, false -Default: true -Effect: Specifies wether an overly general list should be used to reduce - reasoner requests. - -Option: refinement.useShortConceptConstruction -Possible Values: true, false -Default: true -Effect: Specifies wether the algorithm should try to reduce a concept to a - known more general concept to reduce the number of necessary - subsumption checks for the reasoner. - -Option: refinement.useDIGMultiInstanceChecks -Possible Values: never, twoChecks, oneCheck -Default: twoChecks -Effect: The DIG protocol allows to send several queries to a DIG reasoner at - once. [This is automatically done for subsumption tests.] However, - for instance checks this has the disadvantage that it may not be - necessary to send all instance to the DIG reasoner if one of the - positive examples is not covered (meaning that the concept is - classified as too weak). - If the option is set to never, then each instance check is send - separately. - If the option is set to twoChecks, then first all positive examples will - be send in one query. If all of them are covered, i.e. the concept is - not classified as too weak, then all the negative examples are send in - one query. - If the option is set to oneCheck, then all examples will be send in one - query. - -Genetic Programming Specific ----------------------------- - -Option: gp.algorithmType -Possible Values: steadyState, generational -Default: steadyState -Effect: Uses either a steady state (population partly replaced) or generational - (population completely replaced) algorithm. - -Option: gp.elitism -Possible Values: true, false -Default: true -Effect: If true an the GP algorithm uses elitism, i.e. the best individual is - guarenteed to survive. - -Option: gp.numberOfIndividuals -Possible Values: 1-1000000 -Default: 1000 -Effect: Sets the number of individuals in the population. A higher value - improves classification, but is computationally more expensive. - -Option: gp.numberOfSelectedIndividuals -Possible Values: 1-1000000 -Default: 960 -Effect: Sets the number of individuals, which are selected for replacement in a - steady state GP algorithm. - -Option: gp.crossoverPercent -Possible Values: 0-100 -Default: 95 -Effect: The probability that offspring is produced using crossover (in contrast - to simply being copied over to the next generation). - -Option: gp.mutationPercent -Possible Values: 0-100 -Default: 3 -Effect: The probability that offspring is mutated after reproduction. - -Option: gp.hillClimbingPercent -Possible Values: 0-100 -Default: 0 -Effect: The probability that offspring is produced using the hill climbing - operator. - -Option: gp.refinementPercent -Possible Values: 0-100 -Default: 0 -Effect: The probability that offspring is produced using the genetic refinement - operator. - -Option: gp.postConvergenceGenerations -Possible Values: 10-1000 -Default: 50 -Effect: If the algorithm does not find a better solution for this number of - generations it stops. Added: trunk/doc/kbFileSyntax.txt =================================================================== --- trunk/doc/kbFileSyntax.txt (rev 0) +++ trunk/doc/kbFileSyntax.txt 2008-02-18 15:54:00 UTC (rev 604) @@ -0,0 +1,52 @@ +Some learning examples use background knowledge in *.kb files. These +files use a DL-Learner internal convenience syntax and can be converted +to OWL. + +Here are some examples for axioms in this syntax: + +person = (male OR female). +mother = (female AND EXISTS hasChild.TOP). +motherManyDaughters = (female AND >= 4 hasChild.female). +(mother AND father) SUBCLASSOF person. + +This is the EBNF description of the input language [slightly outdated]: + +Number = ["1"-"9"] (["0"-"9"])* +Id = ["a"-"z"] (["_","a"-"z","A"-"Z","0"-"9"])* +String: "\"" (~["\"","\\","\n","\r"])* "\"" +Instruction = ConfOption + | FunctionCall + | PosExample + | NegExample + | ABoxConcept + | ABoxRole + | Transitive + | Functional + | Symmetric + | Inverse + | Subrole + | TBoxEquiv + | TBoxSub +ConfOption = Id [ "." Id ] "=" ( Id | Number ) ";" +FunctionCall = Id "(" String ")" ";" +PosExample = "+" Id "(" Id ")" "." +NegExample = "-" Id "(" Id ")" "." +ABoxConcept = Concept "(" Id ")" "." +ABoxRole = Id "(" Id "," Id ")" "." +Transitive = "Transitive" "(" Id ")" "." +Functional = "Functional" "(" Id ")" "." +Symmetric = "Symmetric" "(" Id ")" "." +Inverse = "Inverse" "(" Id "," Id ")" "." +Subrole = "Subrole" "(" Id "," Id ")" "." +TBoxEquiv = Concept "=" Concept "." +TBoxSub = Concept ("SUBCLASSOF" | "SUB" ) Concept "." +Concept = "TOP" + | "BOTTOM" + | Id + | "(" Concept "AND" Concept ")" + | "(" Concept "OR" Concept ")" + | "EXISTS" Id "." Concept + | "ALL" Id "." Concept + | "NOT" Concept + | ">=" Number Id "." Concept + | "<=" Number Id "." Concept Deleted: trunk/doc/sparqlModule.txt =================================================================== --- trunk/doc/sparqlModule.txt 2008-02-18 15:35:03 UTC (rev 603) +++ trunk/doc/sparqlModule.txt 2008-02-18 15:54:00 UTC (rev 604) @@ -1,310 +0,0 @@ -SPARQL-module - -The SPARQL module is integrated into the DL-Learner and cannot be run alone any more. -You can just ignore the second part of this file, although it might describe some things -in more detail. - - -Here are some things that have to be included in the .conf file -to get a working example: - -loadJarFile("lib/modules/sparqlModule.jar"); -runPreprocessingModule("org.dllearner.modules.SparqlModule"); - -Options: -======== - -sparqlModule.numberOfRecursion = 2; -(range: 1-3) -Influences how deep the Ontology will be cut out -Default: not sure 2 at the moment -1: means only the selected individuals are loaded -2: adds classes of the individuals and properties -3: adds classes of properties of individuals and superclasses of classes - - -sparqlModule.filterMode = 0; -(range 0-2) -These are presets for SPARQL filters (see below for configurations) -0 only yago classes -1 only categories -2 skos and categories - - -With the next options SPARQL filters can be configured in more detail. -USE EITHER THIS or the filtermode above. - -sparqlModule.sparqlPredicateFilterList={"http://www.w3.org/2004/02/skos/core", - "http://xmlns.com/foaf/0.1/", - "http://dbpedia.org/property/wikipage-", - "http://www.w3.org/2002/07/owl#sameAs", - "http://dbpedia.org/property/reference"}; - -sparqlModule.sparqlObjectFilterList={"http://dbpedia.org/resource/Category:Articles_", - "http://dbpedia.org/resource/Category:Wikipedia_", - "http://xmlns.com/foaf/0.1/", - "http://dbpedia.org/resource/Category", - "http://dbpedia.org/resource/Template", - "http://upload.wikimedia.org/wikipedia/commons"}; - - -With the next option you can state namespaces that shall be typed as classes: -sparqlModule.classList={"http://dbpedia.org/class/yago", - "http://dbpedia.org/resource/Category:", - "http://dbpedia.org/resource/Template:", - "http://www.w3.org/2004/02/skos/core", - "http://dbpedia.org/class/"}; - -Hint: You can maybe export the ontology with the help of kaon2 in rdf format using: -export("file.owl"); -But it is untested. - - - -Attention******************************************* -below is a description of how to run the sparql module as a standalone application -this was disabled though and does NOT work at the moment - -Algorithm: -========= - -Start with: -java dbpedia.SparqlModule ListOfIndividuals - -ListOfIndividuals= Individual | ListOfIndividuals | {} - -The String[] args of the main method is taken as input at the moment. -This will be changed later, it is only for testing. - -Example: -java dbpedia.SparqlModule http://dbpedia.org/resource/Angela_Merkel http://dbpedia.org/resource/Gerhard_Schr%C3%B6der http://dbpedia.org/resource/Helmut_Kohl http://dbpedia.org/resource/Helmut_Schmidt http://dbpedia.org/resource/Ludwig_Erhard http://dbpedia.org/resource/Willy_Brandt - -See bottom for more examples - -*Sparql-Queries*** - -Example Sparql-Query see Options below for more info about FILTERS: - -SELECT * WHERE { -<http://dbpedia.org/resource/Angela_Merkel> ?predicate ?object. -FILTER( -(!isLiteral(?object)) -&&( !regex(str(?predicate), 'http://www.w3.org/2004/02/skos/core#') ) -&&( !regex(str(?predicate), 'http://xmlns.com/foaf/0.1/') ) -&&( !regex(str(?predicate), 'http://dbpedia.org/property/wikipage-') ) -&&( !regex(str(?predicate), 'http://www.w3.org/2002/07/owl#sameAs') ) -&&( !regex(str(?predicate), 'http://dbpedia.org/property/reference') ) -&&( !regex((?object), 'http://xmlns.com/foaf/0.1/') )).} - - -*Typing*** -DBpedia is not typed at all. -I replaced/added the following to comply to OWL-DL: - -Resources are sorted in three categories (Class, Property, Instance) -(implemented as HashSets) according to their uris -Properties are typed as Properties -Classes see below Options -Instances is what is left - -*Output*** -The Ontology is written to a file System.currentMillisec().nt - - - -*Cache*** -the cache remembers: a timestamp, the original sparql-query, the result -key is the subject http://dbpedia.org/resource/Angela_Merkel which is first urlencoded -and so serves as the hash for the filename. -Cache validates if timestamp too old and Sparql-Query the same -before returning the SPARQL xml-result - - - - - -Options: -======== - -All Options cannot be altered right now, except in the source. -This will be later moved to the constructor. -Default is always used. -Some are marked with "NYI", these are Not Yet Implemented and are just ideas I had. - -Main-Algorithm: ---------------- - -*NumberOfRecursion (int)*** - -how deep will the Ontology be cut out - -Default: ??? not sure 2 at the moment - -*ClassRepeat NYI (int)*** - -Recursion can be increased, if the Object is a class. -This will result in deeper, richer hierarchies - - -Server: ------- - -there are no options planned right now hardcoded with: -dbpedia.openlinksw.com:8890 - - -Sparql-queries: ---------------- - -*SparqlFilterPredicate (String[])*** - -removes all rows with the specified String in the PREDICATE from the ResultSet -(integrated in SPARQL query with FILTER !regex) - -Default: -"http://www.w3.org/2004/02/skos/core#" // conflict: no properties between classes allowed -"http://xmlns.com/foaf/0.1/" //foaf is not well defined/unnecessary -"http://dbpedia.org/property/wikipage-" // foreign wikis -fr -es, etc. -"http://www.w3.org/2002/07/owl#sameAs" // contradicts with owl-dl maybe changed later so it will be replaced by owl:equivalentClass for Classes -"http://dbpedia.org/property/reference" //links to homepages - -*SparqlFilterObject (String[])*** -(integrated in SPARQL query with FILTER !regex) - -removes all rows with the specified String in the OBJECT from the ResultSet - -Default: -http://xmlns.com/foaf/0.1/ //foaf is not well defined/unnecessary - -*useLiterals (boolean)*** -(integrated in SPARQL query with FILTER !isLiteral) - -removes all rows with literals as objects from the ResultSet - -Default: false - - - -Type Information: ------------------ - -options that are used to type resources to retain OWL-DL - -*IsClass (String[])*** - -specifies URI's that can be considered classes (and therefore will be typed as classes) - -Default: -"http://dbpedia.org/resource/Category:" //dbpedia categories -"http://www.w3.org/2004/02/skos/core" // concept -"http://dbpedia.org/class/yago" // yago classes -"http://dbpedia.org/class/" // "yago" is missing in some of the Datasets from DBpedia, -I don't actually know if this is a mistake or on purpose - - -Cache: ------- - - -*freshdays (int)*** - -Determines how many days a cached query stays valid - -Default: 15 days - -*path (String)*** - -path of the cache-folder - -Default: cache - - - -Syntactic Sugar NYI ----------------- -Instead of choosing example individuals to put into main, -it could be nice to choose 2 Categories. -The module automatically downloads the individals for both classes itself, -removes the category from the definiton and then runs the DL-Learner. - - - - - -Examples: -========= - -German Leaders: - -Input: -http://dbpedia.org/resource/Adolf_Hitler http://dbpedia.org/resource/Prince_Chlodwig_zu_HohenloheSchillingsf%C3%BCrst http://dbpedia.org/resource/Prince_Maximilian_of_Baden http://dbpedia.org/resource/Franz_von_Papen http://dbpedia.org/resource/Joseph_Goebbels http://dbpedia.org/resource/Gerhard_Schr%C3%B6der http://dbpedia.org/resource/Angela_Merkel http://dbpedia.org/resource/Helmut_Kohl http://dbpedia.org/resource/Helmut_Schmidt http://dbpedia.org/resource/Ludwig_Erhard http://dbpedia.org/resource/Willy_Brandt - -conf: - -+test("http://dbpedia.org/resource/Adolf_Hitler"). -+test("http://dbpedia.org/resource/Prince_Chlodwig_zu_Hohenlohe-Schillingsf%C3%BCrst"). -+test("http://dbpedia.org/resource/Prince_Maximilian_of_Baden"). -+test("http://dbpedia.org/resource/Franz_von_Papen"). -+test("http://dbpedia.org/resource/Joseph_Goebbels"). -+test("http://dbpedia.org/resource/Gerhard_Schr%C3%B6der"). -+test("http://dbpedia.org/resource/Angela_Merkel"). -+test("http://dbpedia.org/resource/Helmut_Kohl"). -+test("http://dbpedia.org/resource/Helmut_Schmidt"). -+test("http://dbpedia.org/resource/Ludwig_Erhard"). -+test("http://dbpedia.org/resource/Willy_Brandt"). - - -Greek Philosophers: - -Input - - http://dbpedia.org/resource/Socrates http://dbpedia.org/resource/Plato http://dbpedia.org/resource/Pythagoras http://dbpedia.org/resource/Zeno_of_Elea http://dbpedia.org/resource/Democritus http://dbpedia.org/resource/Theophrastus http://dbpedia.org/resource/Anaxagoras http://dbpedia.org/resource/Alexander_the_Great http://dbpedia.org/resource/Hephaestion http://dbpedia.org/resource/Diotima http://dbpedia.org/resource/Nicomachus http://dbpedia.org/resource/Harpalus http://dbpedia.org/resource/Menaechmus - -Conf - -+test("http://dbpedia.org/resource/Socrates"). -+test("http://dbpedia.org/resource/Plato"). -+test("http://dbpedia.org/resource/Pythagoras"). - -+test("http://dbpedia.org/resource/Zeno_of_Elea"). -//was a pre-Socratic Greek philosopher -+test("http://dbpedia.org/resource/Democritus"). -//was a pre-Socratic Greek philosopher -//+test("http://dbpedia.org/resource/Theophrastus"). -//a native of Eressos in Lesbos, was the successor of Aristotle in the Peripatetic school. -+test("http://dbpedia.org/resource/Anaxagoras"). -//was a pre-Socratic Greek philosopher. - --test("http://dbpedia.org/resource/Alexander_the_Great"). --test("http://dbpedia.org/resource/Hephaestion"). -//makedonischer Adeliger, der engste Freund, General, Leibw\xE4chter und vielleicht auch Geliebter Alexanders des Gro\xDFen. --test("http://dbpedia.org/resource/Diotima"). -//ist eine literarische Figur Platons, eine Seherin aus Mantin\xE4a, --test("http://dbpedia.org/resource/Nicomachus"). -//Nicomachus sp\xE4tantiker r\xF6mischer Schriftsteller und Politiker --test("http://dbpedia.org/resource/Harpalus"). -//Harpalus was an aristocrat of Macedon and boyhood friend of Alexander the Great --test("http://dbpedia.org/resource/Menaechmus"). -//was a Greek mathematician and geometer born in Alopeconnesus - - - - - - - - - - - - - - - - - - - - - - Modified: trunk/src/dl-learner/org/dllearner/Info.java =================================================================== --- trunk/src/dl-learner/org/dllearner/Info.java 2008-02-18 15:35:03 UTC (rev 603) +++ trunk/src/dl-learner/org/dllearner/Info.java 2008-02-18 15:54:00 UTC (rev 604) @@ -3,6 +3,6 @@ package org.dllearner; public class Info { - public static final String build = "2008-02-06"; + public static final String build = "2008-02-18"; } \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |