diff --git a/machineReasoning_extendUnityWithHomotypicPart/external-rules/owl-TransitiveProperty.n3 b/machineReasoning_extendUnityWithHomotypicPart/external-rules/owl-TransitiveProperty.n3 deleted file mode 100644 index f483bb2..0000000 --- a/machineReasoning_extendUnityWithHomotypicPart/external-rules/owl-TransitiveProperty.n3 +++ /dev/null @@ -1,3 +0,0 @@ -@prefix owl: . - -{?P a owl:TransitiveProperty. ?S ?P ?X. ?X ?P ?O.} => {?S ?P ?O}. diff --git a/machineReasoning_extendUnityWithHomotypicPart/external-rules/owl-propertyChainAxiom.n3 b/machineReasoning_extendUnityWithHomotypicPart/external-rules/owl-propertyChainAxiom.n3 deleted file mode 100644 index 004bbba..0000000 --- a/machineReasoning_extendUnityWithHomotypicPart/external-rules/owl-propertyChainAxiom.n3 +++ /dev/null @@ -1,4 +0,0 @@ -@prefix owl: . -@prefix e: . - -{?P owl:propertyChainAxiom ?L. ?L e:propertyChainExtension (?S ?O)} => {?S ?P ?O}. diff --git a/machineReasoning_extendUnityWithHomotypicPart/external-rules/rdfs-subClassOf.n3 b/machineReasoning_extendUnityWithHomotypicPart/external-rules/rdfs-subClassOf.n3 deleted file mode 100644 index 75eeddc..0000000 --- a/machineReasoning_extendUnityWithHomotypicPart/external-rules/rdfs-subClassOf.n3 +++ /dev/null @@ -1,6 +0,0 @@ -@prefix rdfs: . - -{?C rdfs:subClassOf ?D. ?X a ?C} => {?X a ?D}. -{?C rdfs:subClassOf ?D. ?D rdfs:subClassOf ?E} => {?C rdfs:subClassOf ?E}. -{?C rdfs:subClassOf ?D. ?P rdfs:domain ?C} => {?P rdfs:domain ?D}. -{?C rdfs:subClassOf ?D. ?P rdfs:range ?C} => {?P rdfs:range ?D}. diff --git a/machineReasoning_extendUnityWithHomotypicPart/external-rules/rdfs-subPropertyOf.n3 b/machineReasoning_extendUnityWithHomotypicPart/external-rules/rdfs-subPropertyOf.n3 deleted file mode 100644 index 966e264..0000000 --- a/machineReasoning_extendUnityWithHomotypicPart/external-rules/rdfs-subPropertyOf.n3 +++ /dev/null @@ -1,6 +0,0 @@ -@prefix rdfs: . - -{?P rdfs:subPropertyOf ?Q. ?S ?P ?O} => {?S ?Q ?O}. -{?P rdfs:subPropertyOf ?Q. ?Q rdfs:subPropertyOf ?R} => {?P rdfs:subPropertyOf ?R}. -{?P rdfs:subPropertyOf ?Q. ?Q rdfs:domain ?C} => {?P rdfs:domain ?C}. -{?P rdfs:subPropertyOf ?Q. ?Q rdfs:range ?C} => {?P rdfs:range ?C}. diff --git a/machineReasoning_extendUnityWithHomotypicPart/query.n3 b/machineReasoning_extendUnityWithHomotypicPart/filter_query.n3 similarity index 100% copy from machineReasoning_extendUnityWithHomotypicPart/query.n3 copy to machineReasoning_extendUnityWithHomotypicPart/filter_query.n3 diff --git a/machineReasoning_extendUnityWithHomotypicPart/generic-rules/create_standoff-rules.n3 b/machineReasoning_extendUnityWithHomotypicPart/generic-rules/create_standoff-rules.n3 index fd2504f..1137f27 100644 --- a/machineReasoning_extendUnityWithHomotypicPart/generic-rules/create_standoff-rules.n3 +++ b/machineReasoning_extendUnityWithHomotypicPart/generic-rules/create_standoff-rules.n3 @@ -1,59 +1,60 @@ @prefix e: . @prefix homotypic: . +@prefix kb: . @prefix list: . @prefix math: . @prefix stoff: . @prefix string: . # CASE 1: ?unity has no homotypic parts and is not such a part => create standoff for entire ?unity (startIndex: 0, endIndex: length of unity). { ?unity a homotypic:HomotypicEntity; ?p ?o; homotypic:hasText ?string. - ?SCOPE e:findall (?unity {?unity homotypic:hasHomotypicParts ?parts} ?partList). # ?unity has no homotypic parts. - ?partList e:length ?numParts. - ?numParts math:equalTo 0 . - ?SCOPE e:findall (?unity {?greater_unity homotypic:hasHomotypicParts ?list. - ?unity list:in ?list} ()). # ?unity is not a homotypic part. - ?o stoff:styleHasCSS ?css. # ?unity has an object that has ?css. + ?SCOPE e:fail {?unity homotypic:hasHomotypicParts ?parts}. # ?unity has no homotypic parts. + ?SCOPE e:fail {?greater_unity homotypic:hasHomotypicParts ?list. + ?unity list:in ?list}. # ?unity is not a homotypic part. + ?o stoff:styleHasCSS ?css. # ?unity has an object that has ?css. ## get ?endIndex for ?string (?string ?string) e:stringSplit ?listOfChars. # create a list of all chars of ?string ?listOfChars e:length ?endIndex. # calculate length of this list as ?endIndex } => { ?markup a stoff:StandoffMarkup; stoff:hasCSS ?css; stoff:standoffMarkupHasStartIndex 0; stoff:standoffMarkupHasEndIndex ?endIndex. ?unity homotypic:hasMarkup ?markup. + #_:d kb:retract (?o stoff:styleHasCSS ?css). # remove css from style }. # CASE 2: ?unity has homotypic parts => create standoff by calculating startIndex and endIndex from ?part. { ?unity a homotypic:HomotypicEntity; homotypic:hasHomotypicParts ?listOfParts . ?part list:in ?listOfParts; ?p ?o. ?o stoff:styleHasCSS ?css. (?before (?part) ?after) list:append ?listOfParts. # get list of entities before and list of entities after ?part in ?listOfParts. ## get ?startIndex ?SCOPE e:findall (?text { ?before_part list:in ?before; homotypic:hasText ?text .} ?before_text ). # create list of text before ?part - ?before_text string:concatenation ?before_text_concated. # concate texts + ?before_text string:concatenation ?before_text_concated. # concatenate texts (?before_text_concated ?before_text_concated) e:stringSplit ?listOfCharsA. # split into list of chars - ?listOfCharsA e:length ?startsRaw. # calculate length of this list ->number of chars of before ?part + ?listOfCharsA e:length ?startsRaw. # calculate length of this list ->number of chars before ?part ("_startsRaw-1" ?startsRaw) e:calculate ?startIndex. # number of chars -1 -> ?startIndex of ?part ## get ?endIndex (?before (?part)) list:append ?before_with_part_list. # create list that contains both ?before and ?part. ?SCOPE e:findall (?text { ?item list:in ?before_with_part_list; homotypic:hasText ?text .} ?part_included_text ). # create list of text. - ?part_included_text string:concatenation ?part_included_concated. # concat texts. + ?part_included_text string:concatenation ?part_included_concated. # concatenate texts. (?part_included_concated ?part_included_concated) e:stringSplit ?listOfCharsB. # split into list of chars ?listOfCharsB e:length ?endValue. # calculate length of this list ('_endValue-1' ?endValue) e:calculate ?endIndex. } => { ?markup a stoff:StandoffMarkup; stoff:hasCSS ?css; stoff:standoffMarkupHasStartIndex ?startIndex; stoff:standoffMarkupHasEndIndex ?endIndex. ?unity homotypic:hasMarkup ?markup. + #_:d kb:retract (?o stoff:styleHasCSS ?css). # remove css from style }. diff --git a/machineReasoning_extendUnityWithHomotypicPart/generic-rules/extend-rules.n3 b/machineReasoning_extendUnityWithHomotypicPart/generic-rules/extend-rules.n3 index 8da1707..7989922 100755 --- a/machineReasoning_extendUnityWithHomotypicPart/generic-rules/extend-rules.n3 +++ b/machineReasoning_extendUnityWithHomotypicPart/generic-rules/extend-rules.n3 @@ -1,30 +1,28 @@ @prefix owl: . @prefix rdf: . @prefix rdfs: . @prefix xsd: . @prefix log: . @prefix list: . @prefix math: . @prefix e: . @prefix dct: . @prefix homotypic: . ## Extend a ?unity that has homotypic parts # (i.e. a rdf:List that consists of members that are of the same owl:Class as ?unity) # with those properties of its parts # for which ?unity has a owl:minCardinality of 1, if ?unity lacks such a property. ## -# (*1) CHECK owl:minCardinality 1 is false -# from https://raw.githubusercontent.com/nie-ine/N3-rule-based_machine-reasoning/master/machineReasoning_cardinality/machineReasoning_cardinality_input/cardinality-rules.n3 { ?unity a [owl:onProperty ?property; owl:minCardinality "1"^^xsd:nonNegativeInteger]; a ?class; homotypic:hasHomotypicParts ?list . - ?SCOPE e:findall (?o {?unity ?property ?o} ()). # (*1) empty list + ?SCOPE e:fail {?unity ?property ?o}. # ?unity fails to be the subject in '?s ?property ?o'. ?part list:in ?list; a ?class; ?property ?object . } => { ?unity ?property ?object . }. diff --git a/machineReasoning_extendUnityWithHomotypicPart/ontologies/tln-ontology_autogenerated.ttl b/machineReasoning_extendUnityWithHomotypicPart/ontologies/tln-ontology_autogenerated.ttl index be8aaa4..8750da5 100644 --- a/machineReasoning_extendUnityWithHomotypicPart/ontologies/tln-ontology_autogenerated.ttl +++ b/machineReasoning_extendUnityWithHomotypicPart/ontologies/tln-ontology_autogenerated.ttl @@ -1,943 +1,952 @@ @prefix dct: . @prefix homotypic: . @prefix owl: . @prefix rdf: . @prefix rdfs: . @prefix stoff: . @prefix text: . @prefix tln: . @prefix xsd: . tln:IsUncertain a owl:DatatypeProperty ; rdfs:label "whether something is uncertain"@en ; rdfs:domain tln:Reference ; rdfs:isDefinedBy ; rdfs:range xsd:boolean . tln:UncertainDecipherment a owl:Class ; rdfs:label "uncertain decipherment"@en ; rdfs:comment "This class represents a uncertain decipherment by the editors."@en ; rdfs:isDefinedBy ; rdfs:subClassOf tln:EditorComment . tln:atypicalWritingHasText a owl:ObjectProperty ; rdfs:label "has atypicalWritingHasText"@en ; rdfs:domain tln:AtypicalWriting ; rdfs:isDefinedBy ; rdfs:range tln:Text . tln:hasAuthor a owl:DatatypeProperty ; rdfs:label "has Author"@en ; rdfs:domain tln:EarlierDescription ; rdfs:isDefinedBy ; rdfs:range xsd:string . tln:hasCitation a owl:DatatypeProperty ; rdfs:label "has Citation"@en ; rdfs:domain tln:EarlierDescription ; rdfs:isDefinedBy ; rdfs:range xsd:string . tln:hasComment a owl:DatatypeProperty ; rdfs:label "has Comment"@en ; rdfs:domain tln:EditorComment ; rdfs:isDefinedBy ; rdfs:range xsd:string . tln:hasCorrectionText a owl:DatatypeProperty ; rdfs:label "has CorrectionText"@en ; rdfs:domain tln:EditorCorrection ; rdfs:isDefinedBy ; rdfs:range xsd:string . tln:hasDAttribute a owl:DatatypeProperty ; rdfs:label "svg path has d attribute"@en ; rdfs:comment "The d attribute defines a path to be drawn."@en ; rdfs:domain tln:Path ; rdfs:isDefinedBy ; rdfs:range xsd:string . tln:hasDescription a owl:ObjectProperty ; rdfs:label "has Description"@en ; rdfs:domain tln:ArchivalManuscriptUnity ; rdfs:isDefinedBy ; rdfs:range tln:Description . tln:hasEarlierDescriptions a owl:ObjectProperty ; rdfs:label "has EarlierDescriptions"@en ; rdfs:domain tln:ArchivalManuscriptUnity ; rdfs:isDefinedBy ; rdfs:range tln:EarlierDescription . tln:hasEarlierText a owl:DatatypeProperty ; rdfs:label "has EarlierText"@en ; rdfs:domain tln:Box ; rdfs:isDefinedBy ; rdfs:range xsd:string . tln:hasEditedText a owl:DatatypeProperty ; rdfs:label "word has an edited text"@en ; rdfs:comment "Word has a text that is edited automatically by removing deleted parts or hyphens."@en ; rdfs:domain tln:Word ; rdfs:isDefinedBy ; rdfs:range xsd:string . tln:hasFaksimileImage a owl:ObjectProperty ; rdfs:label "has FaksimileImage"@en ; rdfs:domain tln:Page ; rdfs:isDefinedBy ; rdfs:range tln:FaksimileImage . tln:hasFaksimilePosition a owl:ObjectProperty ; rdfs:label "has FaksimilePosition"@en ; rdfs:domain tln:SimpleWord ; rdfs:isDefinedBy ; rdfs:range tln:FaksimilePosition . tln:hasLines a owl:ObjectProperty ; rdfs:label "has Lines"@en ; rdfs:domain tln:Page ; rdfs:isDefinedBy ; rdfs:range rdf:List . +tln:hasMarkForeignHands a owl:ObjectProperty ; + rdfs:label "has MarkForeignHands"@en ; + rdfs:domain tln:Page ; + rdfs:isDefinedBy ; + rdfs:range rdf:List . + tln:hasOrientation a owl:DatatypeProperty ; rdfs:label "has Orientation"@en ; rdfs:domain tln:Page ; rdfs:isDefinedBy ; rdfs:range xsd:string . +tln:hasPageNumber a owl:DatatypeProperty ; + rdfs:label "has PageNumber"@en ; + rdfs:domain tln:Reference ; + rdfs:isDefinedBy ; + rdfs:range xsd:string . + tln:hasPages a owl:ObjectProperty ; rdfs:label "has Pages"@en ; rdfs:domain tln:ArchivalManuscriptUnity ; rdfs:isDefinedBy ; rdfs:range rdf:List . tln:hasStyle a owl:ObjectProperty ; rdfs:label "has Style"@en ; rdfs:domain tln:WordDeletionPath ; rdfs:isDefinedBy ; rdfs:range tln:Style . tln:hasStyles a owl:ObjectProperty ; rdfs:label "has Styles"@en ; rdfs:domain tln:ArchivalManuscriptUnity ; rdfs:isDefinedBy ; rdfs:range rdf:List . tln:hasSvgImage a owl:ObjectProperty ; rdfs:label "has SvgImage"@en ; rdfs:domain tln:Page ; rdfs:isDefinedBy ; rdfs:range tln:SVGImage . tln:hasTextField a owl:ObjectProperty ; rdfs:label "has TextField"@en ; rdfs:domain tln:FaksimileImage ; rdfs:isDefinedBy ; rdfs:range tln:TextField . tln:hasTransform a owl:DatatypeProperty ; rdfs:label "has Transform"@en ; rdfs:domain tln:PositionalObject ; rdfs:isDefinedBy ; rdfs:range xsd:string . tln:hasWordDeletionPaths a owl:ObjectProperty ; rdfs:label "has WordDeletionPaths"@en ; rdfs:domain tln:Page ; rdfs:isDefinedBy ; rdfs:range rdf:List . tln:hasWordInsertionMarks a owl:ObjectProperty ; rdfs:label "has WordInsertionMarks"@en ; rdfs:domain tln:Page ; rdfs:isDefinedBy ; rdfs:range rdf:List . tln:hasWords a owl:ObjectProperty ; rdfs:label "has Words"@en ; rdfs:domain tln:Page ; rdfs:isDefinedBy ; rdfs:range rdf:List . tln:inheritOverwritesWord a owl:ObjectProperty ; rdfs:label "word overwrites word (inherited from tln:wordHasCorrection)"@en ; rdfs:comment "The author has used this word in order to overwrite that word."@en ; rdfs:isDefinedBy ; rdfs:subPropertyOf tln:overwritesWord ; owl:propertyChainAxiom ( tln:wordHasCorrection tln:overwritesWord ) . tln:isClarificationOfWord a owl:ObjectProperty ; rdfs:label "word is a clarification of word"@en ; rdfs:comment "The author has used this part of the word in order to clarify the appearance of that word."@en ; rdfs:domain tln:Word ; rdfs:isDefinedBy ; rdfs:range tln:Word ; rdfs:subPropertyOf tln:isCorrectionOfWord . tln:isDeletionOfWord a owl:ObjectProperty ; rdfs:label "word is a deletion of word"@en ; rdfs:comment "The author has used this part of a word in order to delete the corresponding part of an earlier version of this word."@en ; rdfs:domain tln:Word ; rdfs:isDefinedBy ; rdfs:range tln:Word ; rdfs:subPropertyOf tln:isCorrectionOfWord . tln:isExtensionOfWord a owl:ObjectProperty ; rdfs:label "word is a extension of word"@en ; rdfs:comment "The author has used this part of a word in order to extend an earlier version of this word."@en ; rdfs:domain tln:Word ; rdfs:isDefinedBy ; rdfs:range tln:Word ; rdfs:subPropertyOf tln:isCorrectionOfWord . tln:isTransformationOfWord a owl:ObjectProperty ; rdfs:label "word is a transformation of word"@en ; rdfs:comment "The author has used this part of a word in order to transform the corresponding part of an earlier version of this word."@en ; rdfs:domain tln:Word ; rdfs:isDefinedBy ; rdfs:range tln:Word ; rdfs:subPropertyOf tln:isCorrectionOfWord . tln:isUncertain a owl:DatatypeProperty ; rdfs:label "whether something is uncertain"@en ; rdfs:domain tln:EditorComment ; rdfs:isDefinedBy ; rdfs:range xsd:boolean . tln:lineHasEditorComment a owl:ObjectProperty ; rdfs:label "has lineHasEditorComment"@en ; rdfs:domain tln:Line ; rdfs:isDefinedBy ; rdfs:range tln:EditorComment . tln:standoffTagHasCSS a owl:DatatypeProperty ; rdfs:label "standoff tag has css"@en ; rdfs:comment "Connects a standoff tag with CSS style."@en ; rdfs:domain tln:StandoffTag ; rdfs:isDefinedBy ; rdfs:range xsd:string ; rdfs:subPropertyOf stoff:hasCSS . tln:styleHasCSS a owl:DatatypeProperty ; rdfs:label "style has css"@en ; rdfs:comment "Connects a style with CSS style."@en ; rdfs:domain tln:Style ; rdfs:isDefinedBy ; rdfs:range xsd:string ; rdfs:subPropertyOf stoff:styleHasCSS . tln:textHasMarkup a owl:ObjectProperty ; rdfs:label "standoff markup of text"@en ; rdfs:comment "Connects a text with a list of standoff tags."@en ; rdfs:domain tln:Text ; rdfs:isDefinedBy ; rdfs:range tln:StandoffTag . tln:wordHasEarlierVersion a owl:ObjectProperty ; rdfs:label "word has an earlier version"@en ; rdfs:comment "There is a earlier version of this word."@en ; rdfs:domain tln:Word ; rdfs:isDefinedBy ; rdfs:range tln:Word . tln:wordHasEditorComment a owl:ObjectProperty ; rdfs:label "word has a comment by the editors"@en ; rdfs:comment "Word has been commented by the editors."@en ; rdfs:domain tln:Word ; rdfs:isDefinedBy ; rdfs:range tln:EditorComment . tln:wordHasWordParts a owl:ObjectProperty ; rdfs:label "word has word parts"@en ; rdfs:comment "Word consists of a list of words."@en ; rdfs:domain tln:Word ; rdfs:isDefinedBy ; rdfs:range rdf:List ; rdfs:subPropertyOf homotypic:hasHomotypicParts . tln:wordIsDeletedByPath a owl:ObjectProperty ; rdfs:label "word has been deleted with a deletion path"@en ; rdfs:comment "Word has been deleted by the author using a deletion path."@en ; rdfs:domain tln:Word ; rdfs:isDefinedBy ; rdfs:range tln:WordDeletionPath . tln:AtypicalWriting a owl:Class ; rdfs:label "atypical writing"@en ; rdfs:comment "This class represents a a atpycial writing by the author."@en ; rdfs:isDefinedBy ; rdfs:subClassOf tln:EditorComment . tln:Box a owl:Class ; rdfs:label "box"@en ; rdfs:comment "This represents box svg paths."@en ; rdfs:isDefinedBy ; rdfs:subClassOf tln:Path . tln:Clarification a owl:Class ; rdfs:label "clarification"@en ; rdfs:comment "This class represents a word clarification."@en ; rdfs:isDefinedBy ; rdfs:subClassOf [ a owl:Restriction ; owl:cardinality "1"^^xsd:nonNegativeInteger ; owl:onProperty tln:clarificationHasText ], tln:EditorComment . tln:EditorCorrection a owl:Class ; rdfs:label "editor correction"@en ; rdfs:comment "This class represents a word correction by the editors."@en ; rdfs:isDefinedBy ; rdfs:subClassOf tln:EditorComment . tln:TextConnectionMark a owl:Class ; rdfs:label "text connection mark"@en ; rdfs:comment "This class represents a text connection mark."@en ; rdfs:isDefinedBy ; rdfs:subClassOf [ a owl:Restriction ; owl:cardinality "1"^^xsd:nonNegativeInteger ; owl:onProperty tln:textConnectionMarkHasTextSource ], tln:SpecialWord . tln:clarificationHasText a owl:ObjectProperty ; rdfs:label "has clarificationHasText"@en ; rdfs:domain tln:Clarification ; rdfs:isDefinedBy ; rdfs:range tln:Text . tln:colorHasName a owl:DatatypeProperty ; rdfs:label "color has name"@en ; rdfs:comment "Connects a color with its name."@en ; rdfs:domain tln:Color ; rdfs:isDefinedBy ; rdfs:range xsd:string . tln:firstLineOfReference a owl:DatatypeProperty ; rdfs:label "first line of reference"@en ; rdfs:domain tln:Reference ; rdfs:isDefinedBy ; rdfs:range xsd:integer . tln:hasBottom a owl:DatatypeProperty ; rdfs:label "has Bottom"@en ; rdfs:domain tln:PositionalObject ; rdfs:isDefinedBy ; rdfs:range xsd:float . tln:hasFileName a owl:DatatypeProperty ; rdfs:label "has FileName"@en ; rdfs:domain tln:Image ; rdfs:isDefinedBy ; rdfs:range xsd:string . tln:hasHexadecimalValue a owl:DatatypeProperty ; rdfs:label "color has a hexadecimal value"@en ; rdfs:comment "Connects a color with its hexadecimal representation. A hexadecimal color is specified with: #RRGGBB."@en ; rdfs:domain tln:Color ; rdfs:isDefinedBy ; rdfs:range xsd:string . tln:hasLeft a owl:DatatypeProperty ; rdfs:label "has Left"@en ; rdfs:domain tln:PositionalObject ; rdfs:isDefinedBy ; rdfs:range xsd:float . tln:hasManuscriptType a owl:DatatypeProperty ; rdfs:label "has ManuscriptType"@en ; rdfs:domain tln:ArchivalManuscriptUnity ; rdfs:isDefinedBy ; rdfs:range xsd:string . tln:hasMarkType a owl:DatatypeProperty ; rdfs:label "has MarkType"@en ; rdfs:domain tln:WordInsertionMark ; rdfs:isDefinedBy ; rdfs:range xsd:string . tln:hasNextWord a owl:ObjectProperty ; rdfs:label "has next word"@en ; rdfs:domain tln:WordInsertionMark ; rdfs:isDefinedBy ; rdfs:range tln:Word . tln:hasNumber a owl:DatatypeProperty ; rdfs:label "has Number"@en ; rdfs:domain tln:Page ; rdfs:isDefinedBy ; rdfs:range xsd:string . -tln:hasPageNumber a owl:DatatypeProperty ; - rdfs:label "has PageNumber"@en ; - rdfs:domain tln:Reference ; - rdfs:isDefinedBy ; - rdfs:range xsd:string . - tln:hasPreviousWord a owl:ObjectProperty ; rdfs:label "has previous word"@en ; rdfs:domain tln:WordInsertionMark ; rdfs:isDefinedBy ; rdfs:range tln:Word . tln:hasSymbolId a owl:DatatypeProperty ; rdfs:label "has SymbolId"@en ; rdfs:domain tln:WordInsertionMark ; rdfs:isDefinedBy ; rdfs:range xsd:string . tln:hasText a owl:DatatypeProperty ; rdfs:label "has Text"@en ; rdfs:domain tln:SimpleWord ; rdfs:isDefinedBy ; rdfs:range xsd:string ; rdfs:subPropertyOf homotypic:hasText . +tln:hasTitle a owl:DatatypeProperty ; + rdfs:label "has Title"@en ; + rdfs:domain tln:ArchivalManuscriptUnity, + tln:Reference ; + rdfs:isDefinedBy ; + rdfs:range xsd:string . + tln:hasTop a owl:DatatypeProperty ; rdfs:label "has Top"@en ; rdfs:domain tln:PositionalObject ; rdfs:isDefinedBy ; rdfs:range xsd:float . tln:hasTranskriptionPosition a owl:ObjectProperty ; rdfs:label "has TranskriptionPosition"@en ; rdfs:domain tln:SimpleWord ; rdfs:isDefinedBy ; rdfs:range tln:TranskriptionPosition . tln:hasUrl a owl:DatatypeProperty ; rdfs:label "has Url"@en ; rdfs:domain tln:FaksimileImage ; rdfs:isDefinedBy ; rdfs:range xsd:anyURI . tln:isLineAContinuationTo a owl:DatatypeProperty ; rdfs:label "whether line continues on reference"@en ; rdfs:domain tln:LineContinuation ; rdfs:isDefinedBy ; rdfs:range xsd:boolean . tln:isMainLine a owl:DatatypeProperty ; rdfs:label "whether or not line is a main line"@en ; rdfs:comment "Indicates whether or not line is a main line. Lines that are not main lines, contain later inserted words."@en ; rdfs:domain tln:Line ; rdfs:isDefinedBy ; rdfs:range xsd:boolean . tln:isOnFaksimileImage a owl:ObjectProperty ; rdfs:label "faksimile position is on faksimile image"@en ; rdfs:comment "Relates the faksimile position of a word to the faksimile image"@en ; rdfs:domain tln:FaksimilePosition ; rdfs:isDefinedBy ; rdfs:range tln:FaksimileImage . tln:isOnSvgImage a owl:ObjectProperty ; rdfs:label "transkription position is on svg image"@en ; rdfs:domain tln:TranskriptionPosition ; rdfs:isDefinedBy ; rdfs:range tln:SVGImage . tln:isOnTextField a owl:ObjectProperty ; rdfs:label "faksimile position is on text field"@en ; rdfs:comment "Relates the faksimile position of a word to its text field on a faksimile image"@en ; rdfs:domain tln:FaksimilePosition ; rdfs:isDefinedBy ; rdfs:range tln:TextField . tln:lastLineOfReference a owl:DatatypeProperty ; rdfs:label "last line of reference"@en ; rdfs:domain tln:Reference ; rdfs:isDefinedBy ; rdfs:range xsd:integer . tln:lineContinuationHasReference a owl:ObjectProperty ; rdfs:label "line continues from/to reference"@en ; rdfs:domain tln:LineContinuation ; rdfs:isDefinedBy ; rdfs:range tln:Reference . tln:lineHasBottomValueOnTranskription a owl:DatatypeProperty ; rdfs:label "has lineHasBottomValueOnTranskription"@en ; rdfs:domain tln:Line ; rdfs:isDefinedBy ; rdfs:range xsd:float . tln:lineHasInnerBottomValueOnFaksimile a owl:DatatypeProperty ; rdfs:label "line has a top position on the faksimile image"@en ; rdfs:comment "This is the top position of the area, in which the words belong to this line."@en ; rdfs:domain tln:Line ; rdfs:isDefinedBy ; rdfs:range xsd:float . tln:lineHasInnerTopValueOnFaksimile a owl:DatatypeProperty ; rdfs:label "line has a bottom position on the faksimile image"@en ; rdfs:comment "This is the bottom position of the area, in which the words belong to this line."@en ; rdfs:domain tln:Line ; rdfs:isDefinedBy ; rdfs:range xsd:float . tln:lineHasNumber a owl:DatatypeProperty ; rdfs:label "line has number"@en ; rdfs:comment "Relating a line to the number it has."@en ; rdfs:domain tln:Line ; rdfs:isDefinedBy ; rdfs:range xsd:integer . tln:lineHasOuterBottomValueOnFaksimile a owl:DatatypeProperty ; rdfs:label "line has a top position next to the faksimile image"@en ; rdfs:comment "This is the top position of line outside of the faksimile image."@en ; rdfs:domain tln:Line ; rdfs:isDefinedBy ; rdfs:range xsd:float . tln:lineHasOuterTopValueOnFaksimile a owl:DatatypeProperty ; rdfs:label "line has a bottom position next to the faksimile image"@en ; rdfs:comment "This is the bottom position of line outside of the faksimile image."@en ; rdfs:domain tln:Line ; rdfs:isDefinedBy ; rdfs:range xsd:float . tln:lineHasTopValueOnTranskription a owl:DatatypeProperty ; rdfs:label "has lineHasTopValueOnTranskription"@en ; rdfs:domain tln:Line ; rdfs:isDefinedBy ; rdfs:range xsd:float . tln:pageIsOnTextField a owl:ObjectProperty ; rdfs:label "page is on text field"@en ; rdfs:comment "Relates a page to the text field on a faksimile image."@en ; rdfs:domain tln:Page ; rdfs:isDefinedBy ; rdfs:range tln:TextField . tln:penOfForeignHands a owl:DatatypeProperty ; rdfs:label "pen used to write text by some foreign hand"@en ; rdfs:domain tln:MarkForeignHands ; rdfs:isDefinedBy ; rdfs:range xsd:string . tln:standoffTagHasEndIndex a owl:DatatypeProperty ; rdfs:label "standoff tag has a end index"@en ; rdfs:comment "Connects a standoff tag with its end index."@en ; rdfs:domain tln:StandoffTag ; rdfs:isDefinedBy ; rdfs:range xsd:integer ; rdfs:subPropertyOf stoff:standoffMarkupHasEndIndex . tln:standoffTagHasStartIndex a owl:DatatypeProperty ; rdfs:label "standoff tag has a start index"@en ; rdfs:comment "Connects a standoff tag with its start index."@en ; rdfs:domain tln:StandoffTag ; rdfs:isDefinedBy ; rdfs:range xsd:integer ; rdfs:subPropertyOf stoff:standoffMarkupHasStartIndex . tln:styleHasColor a owl:ObjectProperty ; rdfs:label "style has color"@en ; rdfs:comment "Connects a style with a color."@en ; rdfs:domain tln:Style ; rdfs:isDefinedBy ; rdfs:range tln:Color . tln:styleHasFont a owl:DatatypeProperty ; rdfs:label "style has font"@en ; rdfs:comment "Connects a style with the kind of font Nietzsche used in writing."@en ; rdfs:domain tln:Style ; rdfs:isDefinedBy ; rdfs:range xsd:string . tln:styleHasWritingInstrument a owl:DatatypeProperty ; rdfs:label "style has writing instrument"@en ; rdfs:comment "Connects a style with the description of a writing instrument."@en ; rdfs:domain tln:Style ; rdfs:isDefinedBy ; rdfs:range xsd:string . tln:textConnectionMarkHasTextSource a owl:ObjectProperty ; rdfs:label "text connection mark has a text source"@en ; rdfs:domain tln:TextConnectionMark ; rdfs:isDefinedBy ; rdfs:range tln:Reference . tln:textHasContent a owl:DatatypeProperty ; rdfs:label "content of text"@en ; rdfs:comment "Connects a text with its content."@en ; rdfs:domain tln:Text ; rdfs:isDefinedBy ; rdfs:range xsd:string . tln:textOfForeignHands a owl:DatatypeProperty ; rdfs:label "text traces of some foreign hand"@en ; rdfs:domain tln:MarkForeignHands ; rdfs:isDefinedBy ; rdfs:range xsd:string . tln:wordBelongsToLine a owl:ObjectProperty ; rdfs:label "word belongs to a line"@en ; rdfs:comment "Relating a word to a line."@en ; rdfs:domain tln:SimpleWord ; rdfs:isDefinedBy ; rdfs:range tln:Line . tln:wordHasCorrection a owl:ObjectProperty ; rdfs:label "word has corrections"@en ; rdfs:comment "Word has a correction made by the author."@en ; rdfs:domain tln:Word ; rdfs:isDefinedBy ; rdfs:range tln:Word . tln:wordHasStyle a owl:ObjectProperty ; rdfs:label "word has style"@en ; rdfs:comment "Word has an appearance that is characterized by this style."@en ; rdfs:domain tln:Word ; rdfs:isDefinedBy ; rdfs:range tln:Style . tln:wordInsertionMarkBelongsToLine a owl:ObjectProperty ; rdfs:label "word insertion mark belongs to a specific line"@en ; rdfs:domain tln:WordInsertionMark ; rdfs:isDefinedBy ; rdfs:range tln:Line . +tln:wordReference a owl:DatatypeProperty ; + rdfs:label "refers to word on same line"@en ; + rdfs:domain tln:Reference ; + rdfs:isDefinedBy ; + rdfs:range xsd:string . + tln:Description a owl:Class ; rdfs:label "description"@en ; rdfs:comment "This class represents a description."@en ; rdfs:isDefinedBy ; rdfs:subClassOf tln:Text . tln:LineContinuation a owl:Class ; rdfs:label "line continuation"@en ; rdfs:comment "This class represents a line continuation."@en ; rdfs:isDefinedBy ; rdfs:subClassOf [ a owl:Restriction ; owl:cardinality "1"^^xsd:nonNegativeInteger ; owl:onProperty tln:isLineAContinuationTo ], [ a owl:Restriction ; owl:cardinality "1"^^xsd:nonNegativeInteger ; owl:onProperty tln:lineContinuationHasReference ], tln:EditorComment . tln:MarkForeignHands a owl:Class ; rdfs:label "mark foreign hands"@en ; rdfs:comment "This class represents the mark for text by some foreign hand."@en ; rdfs:isDefinedBy ; rdfs:subClassOf [ a owl:Restriction ; owl:cardinality "1"^^xsd:nonNegativeInteger ; owl:onProperty tln:textOfForeignHands ], [ a owl:Restriction ; owl:maxCardinality "1"^^xsd:nonNegativeInteger ; owl:onProperty tln:penOfForeignHands ], tln:SpecialWord . tln:SVGImage a owl:Class ; rdfs:label "svg image"@en ; rdfs:comment "This class represents a svg image."@en ; rdfs:isDefinedBy ; rdfs:subClassOf tln:Image . tln:SpecialWord a owl:Class ; rdfs:label "special word"@en ; rdfs:comment "This class represents a special word."@en ; rdfs:isDefinedBy ; rdfs:subClassOf tln:SimpleWord . tln:TranskriptionPosition a owl:Class ; rdfs:label "position of a word on the topological transkription"@en ; rdfs:comment "This class represents the position of a word on the transkription as it is displayed by a svg image."@en ; rdfs:isDefinedBy ; rdfs:subClassOf [ a owl:Restriction ; owl:cardinality "1"^^xsd:nonNegativeInteger ; owl:onProperty tln:isOnSvgImage ], tln:WordPosition . tln:WordDeletionPath a owl:Class ; rdfs:label "word deletion path"@en ; rdfs:comment "This class represents word deletion paths."@en ; rdfs:isDefinedBy ; rdfs:subClassOf tln:Path . tln:WordPosition a owl:Class ; rdfs:label "word position"@en ; rdfs:comment "This class represents a word position."@en ; rdfs:isDefinedBy ; rdfs:subClassOf tln:PositionalObject . tln:hasHeight a owl:DatatypeProperty ; rdfs:label "has Height"@en ; rdfs:domain tln:Image, tln:PositionalObject ; rdfs:isDefinedBy ; rdfs:range xsd:float . -tln:hasTitle a owl:DatatypeProperty ; - rdfs:label "has Title"@en ; - rdfs:domain tln:ArchivalManuscriptUnity, - tln:Reference ; - rdfs:isDefinedBy ; - rdfs:range xsd:string . - tln:hasWidth a owl:DatatypeProperty ; rdfs:label "has Width"@en ; rdfs:domain tln:Image, tln:PositionalObject ; rdfs:isDefinedBy ; rdfs:range xsd:float . tln:overwritesWord a owl:ObjectProperty ; rdfs:label "word overwrites word"@en ; rdfs:comment "The author has used this word in order to overwrite that word."@en ; rdfs:domain tln:Word ; rdfs:isDefinedBy ; rdfs:range tln:Word . tln:Color a owl:Class ; rdfs:label "color"@en ; rdfs:comment "This class represents a color."@en ; rdfs:isDefinedBy ; rdfs:subClassOf [ a owl:Restriction ; owl:cardinality "1"^^xsd:nonNegativeInteger ; owl:onProperty tln:hasHexadecimalValue ], [ a owl:Restriction ; owl:cardinality "1"^^xsd:nonNegativeInteger ; owl:onProperty tln:colorHasName ] . tln:EarlierDescription a owl:Class ; rdfs:label "earlier description"@en ; rdfs:comment "This class represents a description by another author."@en ; rdfs:isDefinedBy ; rdfs:subClassOf tln:Description . tln:FaksimilePosition a owl:Class ; rdfs:label "faksimile position"@en ; rdfs:comment "This class represents the position of a Word on a TextField on a FaksimileImage."@en ; rdfs:isDefinedBy ; rdfs:subClassOf [ a owl:Restriction ; owl:cardinality "1"^^xsd:nonNegativeInteger ; - owl:onProperty tln:isOnFaksimileImage ], + owl:onProperty tln:isOnTextField ], [ a owl:Restriction ; owl:cardinality "1"^^xsd:nonNegativeInteger ; - owl:onProperty tln:isOnTextField ], + owl:onProperty tln:isOnFaksimileImage ], tln:WordPosition . tln:Path a owl:Class ; rdfs:label "path"@en ; rdfs:comment "This super class represents all types of svg paths."@en ; rdfs:isDefinedBy . tln:TextField a owl:Class ; rdfs:label "text field"@en ; rdfs:comment "This class represents the text field of a faksimile image."@en ; rdfs:isDefinedBy ; rdfs:subClassOf tln:PositionalObject . tln:FaksimileImage a owl:Class ; rdfs:label "faksimile image"@en ; rdfs:comment "This class represents a faksimile image."@en ; rdfs:isDefinedBy ; rdfs:subClassOf [ a owl:Restriction ; owl:cardinality "1"^^xsd:nonNegativeInteger ; owl:onProperty tln:hasUrl ], tln:Image . tln:StandoffTag a owl:Class ; rdfs:label "standoff tag"@en ; rdfs:comment "This class represents the standoff markup of a text."@en ; rdfs:isDefinedBy ; rdfs:subClassOf [ a owl:Restriction ; owl:cardinality "1"^^xsd:nonNegativeInteger ; owl:onProperty tln:standoffTagHasStartIndex ], [ a owl:Restriction ; owl:cardinality "1"^^xsd:nonNegativeInteger ; owl:onProperty tln:standoffTagHasEndIndex ], stoff:StandoffMarkup . tln:isCorrectionOfWord a owl:ObjectProperty ; rdfs:label "word is a correction of word"@en ; rdfs:comment "The author has used this word in order to correct that word."@en ; rdfs:domain tln:Word ; rdfs:isDefinedBy ; rdfs:range tln:Word . tln:Image a owl:Class ; rdfs:label "image"@en ; rdfs:comment "This super class represents all types of images."@en ; rdfs:isDefinedBy ; rdfs:subClassOf [ a owl:Restriction ; owl:cardinality "1"^^xsd:nonNegativeInteger ; - owl:onProperty tln:hasWidth ], + owl:onProperty tln:hasFileName ], [ a owl:Restriction ; owl:cardinality "1"^^xsd:nonNegativeInteger ; - owl:onProperty tln:hasFileName ], + owl:onProperty tln:hasHeight ], [ a owl:Restriction ; owl:cardinality "1"^^xsd:nonNegativeInteger ; - owl:onProperty tln:hasHeight ] . + owl:onProperty tln:hasWidth ] . tln:Text a owl:Class ; rdfs:label "text"@en ; rdfs:comment "This class represents a text that may have standoff markup."@en ; rdfs:isDefinedBy ; rdfs:subClassOf [ a owl:Restriction ; owl:cardinality "1"^^xsd:nonNegativeInteger ; owl:onProperty tln:textHasContent ] . tln:WordInsertionMark a owl:Class ; rdfs:label "word insertion mark"@en ; rdfs:comment "This class represents a word insertion mark."@en ; rdfs:isDefinedBy ; rdfs:subClassOf [ a owl:Restriction ; - owl:cardinality "1"^^xsd:nonNegativeInteger ; - owl:onProperty tln:hasMarkType ], - [ a owl:Restriction ; owl:maxCardinality "1"^^xsd:nonNegativeInteger ; - owl:onProperty tln:hasSymbolId ], + owl:onProperty tln:hasPreviousWord ], [ a owl:Restriction ; owl:maxCardinality "1"^^xsd:nonNegativeInteger ; owl:onProperty tln:hasNextWord ], [ a owl:Restriction ; owl:maxCardinality "1"^^xsd:nonNegativeInteger ; - owl:onProperty tln:hasPreviousWord ], + owl:onProperty tln:hasSymbolId ], + [ a owl:Restriction ; + owl:cardinality "1"^^xsd:nonNegativeInteger ; + owl:onProperty tln:hasMarkType ], [ a owl:Restriction ; owl:cardinality "1"^^xsd:nonNegativeInteger ; owl:onProperty tln:wordInsertionMarkBelongsToLine ], tln:PositionalObject . tln:ArchivalManuscriptUnity a owl:Class ; rdfs:label "archival unity of manuscript pages"@en ; rdfs:comment "This class represents an archival unity of manuscript pages (workbooks, notebooks and portfolios of handwritten pages)."@en ; rdfs:isDefinedBy ; rdfs:subClassOf [ a owl:Restriction ; owl:cardinality "1"^^xsd:nonNegativeInteger ; owl:onProperty tln:hasManuscriptType ], [ a owl:Restriction ; owl:cardinality "1"^^xsd:nonNegativeInteger ; owl:onProperty tln:hasTitle ] . tln:SimpleWord a owl:Class ; rdfs:label "simple word"@en ; rdfs:comment "This class represents a simple word."@en ; rdfs:isDefinedBy ; rdfs:subClassOf [ a owl:Restriction ; owl:minCardinality "1"^^xsd:nonNegativeInteger ; owl:onProperty tln:hasTranskriptionPosition ], [ a owl:Restriction ; owl:cardinality "1"^^xsd:nonNegativeInteger ; owl:onProperty tln:hasText ], [ a owl:Restriction ; owl:minCardinality "1"^^xsd:nonNegativeInteger ; owl:onProperty tln:wordBelongsToLine ], homotypic:HomotypicEntity . tln:Style a owl:Class ; rdfs:label "style"@en ; rdfs:comment "This class represents the style of a word."@en ; rdfs:isDefinedBy ; rdfs:subClassOf [ a owl:Restriction ; owl:cardinality "1"^^xsd:nonNegativeInteger ; - owl:onProperty tln:styleHasWritingInstrument ], + owl:onProperty tln:styleHasFont ], [ a owl:Restriction ; owl:cardinality "1"^^xsd:nonNegativeInteger ; - owl:onProperty tln:styleHasColor ], + owl:onProperty tln:styleHasWritingInstrument ], [ a owl:Restriction ; owl:cardinality "1"^^xsd:nonNegativeInteger ; - owl:onProperty tln:styleHasFont ], + owl:onProperty tln:styleHasColor ], stoff:Style . tln:Reference a owl:Class ; rdfs:label "reference"@en ; rdfs:comment "This class represents a text reference."@en ; rdfs:isDefinedBy ; rdfs:subClassOf [ a owl:Restriction ; - owl:cardinality "1"^^xsd:nonNegativeInteger ; - owl:onProperty tln:hasPageNumber ], - [ a owl:Restriction ; owl:maxCardinality "1"^^xsd:nonNegativeInteger ; owl:onProperty tln:firstLineOfReference ], [ a owl:Restriction ; - owl:cardinality "1"^^xsd:nonNegativeInteger ; - owl:onProperty tln:hasTitle ], + owl:maxCardinality "1"^^xsd:nonNegativeInteger ; + owl:onProperty tln:wordReference ], [ a owl:Restriction ; owl:maxCardinality "1"^^xsd:nonNegativeInteger ; owl:onProperty tln:lastLineOfReference ] . tln:EditorComment a owl:Class ; rdfs:label "editor comment"@en ; rdfs:comment "This class represents a comment by the editors."@en ; rdfs:isDefinedBy . -tln:Page a owl:Class ; - rdfs:label "page"@en ; - rdfs:comment "This class represents a page."@en ; - rdfs:isDefinedBy ; - rdfs:subClassOf [ a owl:Restriction ; - owl:cardinality "1"^^xsd:nonNegativeInteger ; - owl:onProperty tln:pageIsOnTextField ], - [ a owl:Restriction ; - owl:cardinality "1"^^xsd:nonNegativeInteger ; - owl:onProperty tln:hasNumber ] . - tln:PositionalObject a owl:Class ; rdfs:label "positional object"@en ; rdfs:comment "This (super) class represents an object with positional information."@en ; rdfs:isDefinedBy ; rdfs:subClassOf [ a owl:Restriction ; owl:cardinality "1"^^xsd:nonNegativeInteger ; - owl:onProperty tln:hasBottom ], + owl:onProperty tln:hasHeight ], [ a owl:Restriction ; owl:cardinality "1"^^xsd:nonNegativeInteger ; owl:onProperty tln:hasTop ], + [ a owl:Restriction ; + owl:cardinality "1"^^xsd:nonNegativeInteger ; + owl:onProperty tln:hasBottom ], [ a owl:Restriction ; owl:cardinality "1"^^xsd:nonNegativeInteger ; owl:onProperty tln:hasWidth ], [ a owl:Restriction ; owl:cardinality "1"^^xsd:nonNegativeInteger ; - owl:onProperty tln:hasLeft ], + owl:onProperty tln:hasLeft ] . + +tln:Page a owl:Class ; + rdfs:label "page"@en ; + rdfs:comment "This class represents a page."@en ; + rdfs:isDefinedBy ; + rdfs:subClassOf [ a owl:Restriction ; + owl:cardinality "1"^^xsd:nonNegativeInteger ; + owl:onProperty tln:pageIsOnTextField ], [ a owl:Restriction ; owl:cardinality "1"^^xsd:nonNegativeInteger ; - owl:onProperty tln:hasHeight ] . + owl:onProperty tln:hasNumber ] . tln:Line a owl:Class ; rdfs:label "a line on a page"@en ; rdfs:comment "This class represents a line on a page."@en ; rdfs:isDefinedBy ; rdfs:subClassOf [ a owl:Restriction ; owl:cardinality "1"^^xsd:nonNegativeInteger ; owl:onProperty tln:lineHasInnerTopValueOnFaksimile ], [ a owl:Restriction ; owl:cardinality "1"^^xsd:nonNegativeInteger ; - owl:onProperty tln:lineHasBottomValueOnTranskription ], + owl:onProperty tln:lineHasOuterTopValueOnFaksimile ], [ a owl:Restriction ; owl:cardinality "1"^^xsd:nonNegativeInteger ; owl:onProperty tln:isMainLine ], [ a owl:Restriction ; owl:cardinality "1"^^xsd:nonNegativeInteger ; - owl:onProperty tln:lineHasInnerBottomValueOnFaksimile ], + owl:onProperty tln:lineHasNumber ], [ a owl:Restriction ; owl:cardinality "1"^^xsd:nonNegativeInteger ; - owl:onProperty tln:lineHasTopValueOnTranskription ], + owl:onProperty tln:lineHasBottomValueOnTranskription ], [ a owl:Restriction ; owl:cardinality "1"^^xsd:nonNegativeInteger ; - owl:onProperty tln:lineHasOuterBottomValueOnFaksimile ], + owl:onProperty tln:lineHasTopValueOnTranskription ], [ a owl:Restriction ; owl:cardinality "1"^^xsd:nonNegativeInteger ; - owl:onProperty tln:lineHasOuterTopValueOnFaksimile ], + owl:onProperty tln:lineHasInnerBottomValueOnFaksimile ], [ a owl:Restriction ; owl:cardinality "1"^^xsd:nonNegativeInteger ; - owl:onProperty tln:lineHasNumber ] . + owl:onProperty tln:lineHasOuterBottomValueOnFaksimile ] . tln:Word a owl:Class ; rdfs:label "word"@en ; rdfs:comment "This class represents a word."@en ; rdfs:isDefinedBy ; rdfs:subClassOf [ a owl:Restriction ; owl:minCardinality "1"^^xsd:nonNegativeInteger ; owl:onProperty tln:wordHasStyle ], text:HandwrittenText, tln:SimpleWord . a owl:Ontology ; dct:contributor "Christian Steiner, software developer, digital edition of der späte Nietzsche, University of Basel, Switzerland"@en ; dct:creator "Dominique Steinbach, tool coordinator/software developer, NIE-INE/digital edition of der späte Nietzsche, Basel University, Switzerland"@en ; dct:description "Formal description of specific concepts in the scientific study of Friedrich Nietzsches late work."@en ; dct:license ; dct:publisher "Basel University, Switzerland"@en ; dct:title "An ontology about the collected late works of Friedrich Nietzsche"@en . diff --git a/machineReasoning_extendUnityWithHomotypicPart/project-rules/40-tln-update_word_line_reference.n3 b/machineReasoning_extendUnityWithHomotypicPart/project-rules/40-tln-update_word_line_reference.n3 new file mode 100644 index 0000000..1579b5a --- /dev/null +++ b/machineReasoning_extendUnityWithHomotypicPart/project-rules/40-tln-update_word_line_reference.n3 @@ -0,0 +1,38 @@ +@prefix e: . +@prefix list: . +@prefix kb: . +@prefix tln: . + +# update reference to word if a line has two line continuations that refer to words on this line. + +{ + ?page a tln:Page; + tln:hasWords ?words; + tln:hasLines ?lines. + ?line a tln:Line; + tln:lineHasEditorComment ?lineContinuationFrom; + tln:lineHasEditorComment ?lineContinuationTo. + ?lineContinuationFrom a tln:LineContinuation; + tln:isUncertain false ; + tln:isLineAContinuationTo false ; + tln:lineContinuationHasReference ?from_reference. + ?lineContinuationTo a tln:LineContinuation; + tln:isUncertain false ; + tln:isLineAContinuationTo true ; + tln:lineContinuationHasReference ?to_reference. + ?from_reference a tln:Reference; + tln:wordReference ?from_word_string. + ?to_reference a tln:Reference; + tln:wordReference ?to_word_string. + ?from_word list:in ?words; + tln:wordBelongsToLine ?line; + tln:hasText ?from_word_string. + ?to_word list:in ?words; + tln:wordBelongsToLine ?line; + tln:hasText ?to_word_string. +} => { + ?from_word tln:textContinuesWithWord ?to_word. + _:d kb:retract (?s ?p ?o). +}. + + diff --git a/machineReasoning_extendUnityWithHomotypicPart/project-rules/tln-add_language.n3 b/machineReasoning_extendUnityWithHomotypicPart/project-rules/55-tln-add_language.n3 similarity index 100% rename from machineReasoning_extendUnityWithHomotypicPart/project-rules/tln-add_language.n3 rename to machineReasoning_extendUnityWithHomotypicPart/project-rules/55-tln-add_language.n3 diff --git a/machineReasoning_extendUnityWithHomotypicPart/project-rules/tln-update_reference.n3 b/machineReasoning_extendUnityWithHomotypicPart/project-rules/tln-update_reference.n3 deleted file mode 100644 index 345e60d..0000000 --- a/machineReasoning_extendUnityWithHomotypicPart/project-rules/tln-update_reference.n3 +++ /dev/null @@ -1,46 +0,0 @@ -@prefix e: . -@prefix kb: . -@prefix tln: . - - -{ - ?s tln:hasTitle ?title. - ?SCOPE e:findall (?s {?s a tln:ArchivalManuscriptUnity} ()). - ?manuscript a tln:ArchivalManuscriptUnity; - tln:hasTitle ?title. -} => { - ?s tln:refersToArchivalManuscriptUnity ?manuscript. - _:d kb:retract (?s tln:hasTitle ?title). -}. - -{ - ?s tln:hasTitle ?title. - ?SCOPE e:findall (?s {?s a tln:ArchivalManuscriptUnity} ()). - ?SCOPE e:findall (?no_manuscript {?no_manuscript a tln:ArchivalManuscriptUnity; tln:hasTitle ?title.} ()). -} => { - ?manuscript a tln:ArchivalManuscriptUnity; - tln:hasTitle ?title. - ?s tln:refersToArchivalManuscriptUnity ?manuscript. - _:d kb:retract (?s tln:hasTitle ?title). -}. - -{ - ?s tln:hasPageNumber ?number. - ?page a tln:Page; - tln:hasNumber ?number. -} => { - ?s tln:refersToPage ?page. - _:d kb:retract (?s tln:hasPageNumber ?number). -}. - -{ - ?s tln:hasPageNumber ?number. - ?SCOPE e:findall (?no_page {?no_page a tln:Page; tln:hasNumber ?number.} ()). -} => { - ?page a tln:Page; - tln:hasNumber ?number. - ?s tln:refersToPage ?page. - _:d kb:retract (?s tln:hasPageNumber ?number). -}. - - diff --git a/machineReasoning_extendUnityWithHomotypicPart/project-rules_joined_data/40-tln-update_reference.n3 b/machineReasoning_extendUnityWithHomotypicPart/project-rules_joined_data/40-tln-update_reference.n3 new file mode 100644 index 0000000..03a949e --- /dev/null +++ b/machineReasoning_extendUnityWithHomotypicPart/project-rules_joined_data/40-tln-update_reference.n3 @@ -0,0 +1,47 @@ +@prefix e: . +@prefix list: . +@prefix kb: . +@prefix tln: . + +# update reference to next page if there is no line info + +{ + ?manuscript a tln:ArchivalManuscriptUnity; + tln:hasPages ?pages. + ?page list:in ?pages; + tln:hasLines ?lines. + ?line list:in ?lines; + tln:lineHasEditorComment ?lineContinuationFrom. + ?lineContinuationFrom a tln:LineContinuation; + tln:isUncertain false ; + tln:isLineAContinuationTo true ; + tln:lineContinuationHasReference ?reference. + ?reference a tln:Reference. + ?SCOPE e:fail {?reference tln:firstLineOfReference ?no_firstLine}. # there is no line info + ?SCOPE e:fail {?reference tln:wordReference ?no_reference} . # there is no word reference + (?previous_pages (?page ?next_page) ?other_pages) list:append ?pages. +} => { + ?reference tln:refersToPage ?next_page. + _:d kb:retract (?s ?p ?o). +}. + +# update reference to previous page if there is no line info +{ + ?manuscript a tln:ArchivalManuscriptUnity; + tln:hasPages ?pages. + ?page list:in ?pages; + tln:hasLines ?lines. + ?line list:in ?lines; + tln:lineHasEditorComment ?lineContinuationFrom. + ?lineContinuationFrom a tln:LineContinuation; + tln:isUncertain false ; + tln:isLineAContinuationTo false ; + tln:lineContinuationHasReference ?reference. + ?reference a tln:Reference. + ?SCOPE e:fail {?reference tln:firstLineOfReference ?no_firstLine}. # there is no line info + ?SCOPE e:fail {?reference tln:wordReference ?no_reference} . # there is no word reference + (?previous_pages (?previous_page ?page) ?other_pages) list:append ?pages. +} => { + ?reference tln:refersToPage ?previous_page. + _:d kb:retract (?s ?p ?o). +}. diff --git a/machineReasoning_extendUnityWithHomotypicPart/project-rules_joined_data/50-tln-connect_lines.n3 b/machineReasoning_extendUnityWithHomotypicPart/project-rules_joined_data/50-tln-connect_lines.n3 new file mode 100644 index 0000000..f94f80d --- /dev/null +++ b/machineReasoning_extendUnityWithHomotypicPart/project-rules_joined_data/50-tln-connect_lines.n3 @@ -0,0 +1,167 @@ +@prefix e: . +@prefix list: . +@prefix kb: . +@prefix math: . +@prefix tln: . + +# Connect two lines that mutually refer to each other as ?line tln:lineContinuesOn ?referred_line. + +# CASE 1: two lines from the same page. + +{ + ?manuscript a tln:ArchivalManuscriptUnity; + tln:hasPages ?pages. + ?page list:in ?pages; + tln:hasLines ?lines. + ?line list:in ?lines; + tln:lineHasEditorComment ?lineContinuationFrom. + ?lineContinuationFrom a tln:LineContinuation; + tln:isUncertain false ; + tln:isLineAContinuationTo true ; + tln:lineContinuationHasReference ?reference. + ?reference a tln:Reference; + tln:firstLineOfReference ?referred_line_number. + ?referred_line list:in ?lines; + tln:lineHasEditorComment ?other_lineContinuation; + tln:lineHasNumber ?referred_line_number. + ?other_lineContinuation a tln:LineContinuation; + tln:isLineAContinuationTo false ; + tln:lineContinuationHasReference ?mutual_reference. + # comment/uncomment if you want to keep/remove the original statements + ?subject list:in (?lineContinuationFrom ?reference ?other_lineContinuation ?mutual_reference) ; + ?p ?o. + ?something ?has ?subject. +} => { + ?line tln:lineContinuesOn ?referred_line. + _:d kb:retract (?subject ?p ?o). + _:d kb:retract (?something ?has ?subject). +}. + +# CASE 2a: two lines from two pages of the same manuscript. + +{ + ?manuscript a tln:ArchivalManuscriptUnity; + tln:hasPages ?pages. + ?page list:in ?pages; + tln:hasLines ?lines. + ?line list:in ?lines; + tln:lineHasEditorComment ?lineContinuation. + ?lineContinuation a tln:LineContinuation; + tln:isUncertain false ; + tln:isLineAContinuationTo true ; + tln:lineContinuationHasReference ?reference. + ?reference a tln:Reference; + tln:firstLineOfReference ?referred_line_number; + tln:hasPageNumber ?number. + ?SCOPE e:findall ( ?reference {?reference tln:hasTitle ?title } () ). # Reference does not refer to different manuscript. + ?referred_page list:in ?pages; + tln:hasNumber ?number; + tln:hasLines ?referred_page_lines. + ?referred_line list:in ?referred_page_lines; + tln:lineHasEditorComment ?other_lineContinuation; + tln:lineHasNumber ?referred_line_number. + ?other_lineContinuation a tln:LineContinuation; + tln:isLineAContinuationTo false ; + tln:lineContinuationHasReference ?mutual_reference. + # comment/uncomment if you want to keep/remove the original statements + ?subject list:in (?lineContinuation ?reference ?other_lineContinuation ?mutual_reference) ; + ?p ?o. + ?something ?has ?subject. +} => { + ?line tln:lineContinuesOn ?referred_line. + _:d kb:retract (?subject ?p ?o). + _:d kb:retract (?something ?has ?subject). +}. + +# CASE 2b: two lines from two consecutive pages (i.e. a double page) of the same manuscript without explicit line reference. + +{ + ?manuscript a tln:ArchivalManuscriptUnity; + tln:hasPages ?pages. + ?page list:in ?pages; + tln:hasLines ?lines. + ?line list:in ?lines; + tln:lineHasEditorComment ?lineContinuation. + ?lineContinuation a tln:LineContinuation; + tln:isUncertain false ; + tln:isLineAContinuationTo true ; + tln:lineContinuationHasReference ?reference. + ?reference a tln:Reference; + tln:refersToPage ?referred_page. + ?referred_page list:in ?pages; + tln:hasLines ?unreferred_page_lines. + ?unreferred_line list:in ?unreferred_page_lines; + tln:lineHasEditorComment ?other_lineContinuation. + ?other_lineContinuation a tln:LineContinuation; + tln:isLineAContinuationTo false ; + tln:lineContinuationHasReference ?other_reference. + ?other_reference a tln:Reference; + tln:refersToPage ?page. + # both (?reference and ?other_reference) need to be the n-th reference without line reference of their pages. + # create list of from-references from ?page as ?list_of_from_reference: + ?SCOPE e:findall ( ?s { ?a_line list:in ?lines; tln:lineHasEditorComment ?a_lineContinuation. + ?a_lineContinuation a tln:LineContinuation; tln:isUncertain false ; tln:isLineAContinuationTo true ; + tln:lineContinuationHasReference ?s . + ?SCOPE e:findall ( ?s {?s tln:firstLineOfReference ?no_firstLine } () ). # no line reference. + ?s tln:refersToPage ?referred_page } + ?list_of_from_reference ). + # create list of to-references from ?referred_page as ?list_of_to_reference: + ?SCOPE e:findall ( ?s { ?a_line list:in ?unreferred_page_lines; tln:lineHasEditorComment ?a_lineContinuation. + ?a_lineContinuation a tln:LineContinuation; tln:isUncertain false ; tln:isLineAContinuationTo false ; + tln:lineContinuationHasReference ?s . + ?SCOPE e:findall ( ?s {?s tln:firstLineOfReference ?no_firstLine } () ). # no line reference. + ?s tln:refersToPage ?page } + ?list_of_to_reference ). + (?before_from_list_of_ref (?reference) ?after_from_list_of_ref) list:append ?list_of_from_reference. # list of such references before ?reference as ?before_from_list_of_ref + (?before_to_list_of_ref (?other_reference) ?after_to_list_of_ref) list:append ?list_of_to_reference. # list of such references before ?other_reference as ?before_to_list_of_ref + ?before_from_list_of_ref e:length ?num_before_from. # number of such references before ?reference + ?before_to_list_of_ref e:length ?num_before_to. # number of such references before ?other_reference + ?num_before_to math:equalTo ?num_before_from. # == + # comment/uncomment if you want to keep/remove the original statements + ?subject list:in (?lineContinuation ?reference ?other_lineContinuation ?other_reference) ; + ?p ?o. + ?something ?has ?subject. +} => { + ?line tln:lineContinuesOn ?unreferred_line. + _:d kb:retract (?subject ?p ?o). + _:d kb:retract (?something ?has ?subject). +}. + +# CASE 3: two lines from different manuscripts. + +{ + ?manuscript a tln:ArchivalManuscriptUnity; + tln:hasPages ?pages. + ?page list:in ?pages; + tln:hasLines ?lines. + ?line list:in ?lines; + tln:lineHasEditorComment ?lineContinuation. + ?lineContinuation a tln:LineContinuation; + tln:isUncertain false ; + tln:isLineAContinuationTo true ; + tln:lineContinuationHasReference ?reference. + ?reference a tln:Reference; + tln:firstLineOfReference ?referred_line_number; + tln:hasTitle ?title; + tln:hasPageNumber ?number. + ?referred_manuscript a tln:ArchivalManuscriptUnity; + tln:hasTitle ?title; + tln:hasPages ?referred_pages. + ?referred_page list:in ?referred_pages; + tln:hasNumber ?number; + tln:hasLines ?referred_page_lines. + ?referred_line list:in ?referred_page_lines; + tln:lineHasEditorComment ?other_lineContinuation; + tln:lineHasNumber ?referred_line_number. + ?other_lineContinuation a tln:LineContinuation; + tln:isLineAContinuationTo false ; + tln:lineContinuationHasReference ?mutual_reference. + # comment/uncomment if you want to keep/remove the original statements + ?subject list:in (?lineContinuation ?reference ?other_lineContinuation ?mutual_reference) ; + ?p ?o. + ?something ?has ?subject. +} => { + ?line tln:lineContinuesOn ?referred_line. + _:d kb:retract (?subject ?p ?o). + _:d kb:retract (?something ?has ?subject). +}. diff --git a/machineReasoning_extendUnityWithHomotypicPart/query.n3 b/machineReasoning_extendUnityWithHomotypicPart/query.n3 index db6b5b3..7f44d23 100644 --- a/machineReasoning_extendUnityWithHomotypicPart/query.n3 +++ b/machineReasoning_extendUnityWithHomotypicPart/query.n3 @@ -1,18 +1 @@ -@prefix kb: . -@prefix e: . -@prefix rdf: . -@prefix rdfs: . -@prefix test: . -@prefix xml: . -@prefix xsd: . - -# Remove retracted triples. - -{ - ?s ?p ?o. - ?SCOPE e:findall (?s {?x kb:retract (?s ?p ?o)} ()). - ?SCOPE e:findall (?s {?s kb:retract ?o} ()). -} -=> { ?s ?p ?o }. - - +{ ?s ?p ?o. } => { ?s ?p ?o }. diff --git a/machineReasoning_extendUnityWithHomotypicPart/test-DATA.ttl b/machineReasoning_extendUnityWithHomotypicPart/test-DATA.ttl index c3e58a9..904d3ab 100644 --- a/machineReasoning_extendUnityWithHomotypicPart/test-DATA.ttl +++ b/machineReasoning_extendUnityWithHomotypicPart/test-DATA.ttl @@ -1,95 +1,296 @@ @prefix data: . @prefix rdf: . @prefix rdfs: . @prefix test: . @prefix xml: . @prefix xsd: . @prefix tln: . +data:_N_VII_2 a tln:ArchivalManuscriptUnity ; + tln:hasManuscriptType "Notizheft"^^xsd:string ; + tln:hasPages ( data:_N_VII_2_Page17 ) ; + tln:hasTitle "N VII 2"^^xsd:string . + +data:_N_VII_1 a tln:ArchivalManuscriptUnity ; + tln:hasDescription data:_N_VII_1_Description0 ; + tln:hasEarlierDescriptions data:_N_VII_1_EarlierDescription0, + data:_N_VII_1_EarlierDescription11 ; + tln:hasManuscriptType "Notizheft"^^xsd:string ; + tln:hasPages ( data:_N_VII_1_Page5 data:_N_VII_1_Page6 data:_N_VII_1_Page9 data:_N_VII_1_Page10 data:_N_VII_1_Page15 data:_N_VII_1_Page16 data:_N_VII_1_Page17 ) ; + tln:hasTitle "N VII 1"^^xsd:string . + +data:_N_VII_1_Page15 a tln:Page ; + tln:hasLines ( data:_N_VII_1_Page15_Line5 data:_N_VII_1_Page15_Line6 data:_N_VII_1_Page15_Line10 data:_N_VII_1_Page15_Line20 data:_N_VII_1_Page15_Line30 data:_N_VII_1_Page15_Line34 ) ; + tln:hasNumber "15"^^xsd:string . + +data:_N_VII_1_Page16 a tln:Page ; + tln:hasLines ( data:_N_VII_1_Page16_Line5 data:_N_VII_1_Page16_Line6 data:_N_VII_1_Page16_Line10 data:_N_VII_1_Page16_Line20 data:_N_VII_1_Page16_Line30 data:_N_VII_1_Page16_Line34 ) ; + tln:hasNumber "16"^^xsd:string . + +data:_N_VII_2_Page17 a tln:Page ; + tln:hasLines ( data:_N_VII_2_Page17_Line40 data:_N_VII_2_Page17_Line46 ) ; + tln:hasWords ( data:_N_VII_2_Page17_Word0 data:_N_VII_2_Page17_Word1 ); + tln:hasNumber "17"^^xsd:string . + +data:_N_VII_2_Page17_Word0 a tln:Word; + tln:wordBelongsToLine data:_N_VII_2_Page17_Line40; + tln:hasText "von". + +data:_N_VII_2_Page17_Word1 a tln:Word; + tln:wordBelongsToLine data:_N_VII_2_Page17_Line40; + tln:hasText "zu". + +data:_N_VII_1_Page17 a tln:Page ; + tln:hasLines ( data:_N_VII_1_Page17_Line46 ) ; + tln:hasNumber "17"^^xsd:string . + +data:_N_VII_2_Page17_Line46 a tln:Line ; + tln:isMainLine true ; + tln:lineHasEditorComment data:_N_VII_2_Page17_Line46_LineContinuation0 ; + tln:lineHasNumber 46 . + +data:_N_VII_2_Page17_Line40 a tln:Line ; + tln:isMainLine true ; + tln:lineHasEditorComment data:_N_VII_2_Page17_Line40_LineContinuation0 ; + tln:lineHasEditorComment data:_N_VII_2_Page17_Line40_LineContinuation1 ; + tln:lineHasNumber 40 . + +data:_N_VII_1_Page17_Line46 a tln:Line ; + tln:isMainLine true ; + tln:lineHasEditorComment data:_N_VII_1_Page17_Line46_LineContinuation0 ; + tln:lineHasNumber 46 . + +data:_N_VII_1_Page15_Line34 a tln:Line ; + tln:isMainLine true ; + tln:lineHasEditorComment data:_N_VII_1_Page15_Line34_LineContinuation0 ; + tln:lineHasNumber 34 . + +data:_N_VII_1_Page15_Line30 a tln:Line ; + tln:isMainLine true ; + tln:lineHasEditorComment data:_N_VII_1_Page15_Line30_LineContinuation0 ; + tln:lineHasNumber 30 . + +data:_N_VII_1_Page15_Line10 a tln:Line ; + tln:isMainLine true ; + tln:lineHasEditorComment data:_N_VII_1_Page15_Line10_LineContinuation0 ; + tln:lineHasNumber 10 . + +data:_N_VII_1_Page15_Line5 a tln:Line ; + tln:lineHasEditorComment data:_N_VII_1_Page15_Line5_LineContinuation0 ; + tln:lineHasNumber 5 . + +data:_N_VII_1_Page16_Line5 a tln:Line ; + tln:lineHasEditorComment data:_N_VII_1_Page16_Line5_LineContinuation0 ; + tln:lineHasNumber 5 . + +data:_N_VII_1_Page15_Line6 a tln:Line ; + tln:lineHasEditorComment data:_N_VII_1_Page15_Line6_LineContinuation0 ; + tln:lineHasNumber 6 . + +data:_N_VII_1_Page16_Line6 a tln:Line ; + tln:lineHasEditorComment data:_N_VII_1_Page16_Line6_LineContinuation0 ; + tln:lineHasNumber 6 . + +data:_N_VII_1_Page15_Line20 a tln:Line ; + tln:isMainLine true ; + tln:lineHasEditorComment data:_N_VII_1_Page15_Line20_LineContinuation0 ; + tln:lineHasNumber 20 . + +data:_N_VII_1_Page15_Line5_LineContinuation0 a tln:LineContinuation ; + tln:isLineAContinuationTo true ; + tln:isUncertain false ; + tln:lineContinuationHasReference data:_N_VII_1_Page15_Line5_LineContinuation0_Reference0 . + +data:_N_VII_1_Page16_Line5_LineContinuation0 a tln:LineContinuation ; + tln:isLineAContinuationTo false ; + tln:isUncertain false ; + tln:lineContinuationHasReference data:_N_VII_1_Page16_Line5_LineContinuation0_Reference0 . + +data:_N_VII_1_Page15_Line6_LineContinuation0 a tln:LineContinuation ; + tln:isLineAContinuationTo true ; + tln:isUncertain false ; + tln:lineContinuationHasReference data:_N_VII_1_Page15_Line6_LineContinuation0_Reference0 . + +data:_N_VII_1_Page16_Line6_LineContinuation0 a tln:LineContinuation ; + tln:isLineAContinuationTo false ; + tln:isUncertain false ; + tln:lineContinuationHasReference data:_N_VII_1_Page16_Line6_LineContinuation0_Reference0 . + +data:_N_VII_1_Page15_Line10_LineContinuation0 a tln:LineContinuation ; + tln:isLineAContinuationTo false ; + tln:isUncertain false ; + tln:lineContinuationHasReference data:_N_VII_1_Page15_Line10_LineContinuation0_Reference0 . + +data:_N_VII_1_Page15_Line20_LineContinuation0 a tln:LineContinuation ; + tln:isLineAContinuationTo true ; + tln:isUncertain false ; + tln:lineContinuationHasReference data:_N_VII_1_Page15_Line20_LineContinuation0_Reference0 . + +data:_N_VII_1_Page15_Line34_LineContinuation0 a tln:LineContinuation ; + tln:isLineAContinuationTo false ; + tln:isUncertain false ; + tln:lineContinuationHasReference data:_N_VII_1_Page15_Line34_LineContinuation0_Reference0 . + +data:_N_VII_1_Page15_Line30_LineContinuation0 a tln:LineContinuation ; + tln:isLineAContinuationTo false ; + tln:isUncertain false ; + tln:lineContinuationHasReference data:_N_VII_1_Page15_Line30_LineContinuation0_Reference0 . + +data:_N_VII_2_Page17_Line46_LineContinuation0 a tln:LineContinuation ; + tln:isLineAContinuationTo true ; + tln:isUncertain false ; + tln:lineContinuationHasReference data:_N_VII_2_Page17_Line46_LineContinuation0_Reference0 . + +data:_N_VII_2_Page17_Line40_LineContinuation0 a tln:LineContinuation ; + tln:isLineAContinuationTo false ; + tln:isUncertain false ; + tln:lineContinuationHasReference data:_N_VII_2_Page17_Line40_LineContinuation0_Reference0 . + +data:_N_VII_2_Page17_Line40_LineContinuation1 a tln:LineContinuation ; + tln:isLineAContinuationTo true ; + tln:isUncertain false ; + tln:lineContinuationHasReference data:_N_VII_2_Page17_Line40_LineContinuation1_Reference0 . + +data:_N_VII_1_Page17_Line46_LineContinuation0 a tln:LineContinuation ; + tln:isLineAContinuationTo true ; + tln:isUncertain false ; + tln:lineContinuationHasReference data:_N_VII_1_Page17_Line46_LineContinuation0_Reference0 . + +data:_N_VII_1_Page15_Line5_LineContinuation0_Reference0 a tln:Reference ; + tln:IsUncertain false. + +data:_N_VII_1_Page16_Line5_LineContinuation0_Reference0 a tln:Reference ; + tln:IsUncertain false. + +data:_N_VII_1_Page15_Line6_LineContinuation0_Reference0 a tln:Reference ; + tln:IsUncertain false. + +data:_N_VII_1_Page16_Line6_LineContinuation0_Reference0 a tln:Reference ; + tln:IsUncertain false. + +data:_N_VII_1_Page15_Line10_LineContinuation0_Reference0 a tln:Reference ; + tln:IsUncertain false ; + tln:firstLineOfReference 20 . + +data:_N_VII_1_Page15_Line20_LineContinuation0_Reference0 a tln:Reference ; + tln:IsUncertain true ; + tln:firstLineOfReference 10 . + +data:_N_VII_1_Page15_Line34_LineContinuation0_Reference0 a tln:Reference ; + tln:IsUncertain false ; + tln:firstLineOfReference 46 ; + tln:hasPageNumber "17"^^xsd:string . + +data:_N_VII_1_Page15_Line30_LineContinuation0_Reference0 a tln:Reference ; + tln:IsUncertain false ; + tln:firstLineOfReference 46 ; + tln:hasTitle "N VII 2"^^xsd:string ; + tln:hasPageNumber "17"^^xsd:string . + +data:_N_VII_1_Page17_Line46_LineContinuation0_Reference0 a tln:Reference ; + tln:IsUncertain false ; + tln:firstLineOfReference 34 ; + tln:hasPageNumber "15"^^xsd:string . + +data:_N_VII_2_Page17_Line46_LineContinuation0_Reference0 a tln:Reference ; + tln:IsUncertain false ; + tln:firstLineOfReference 30 ; + tln:hasTitle "N VII 1"^^xsd:string ; + tln:hasPageNumber "15"^^xsd:string . + +data:_N_VII_2_Page17_Line40_LineContinuation0_Reference0 a tln:Reference ; + tln:IsUncertain false ; + tln:wordReference "von"^^xsd:string . + +data:_N_VII_2_Page17_Line40_LineContinuation1_Reference0 a tln:Reference ; + tln:IsUncertain false ; + tln:wordReference "zu"^^xsd:string . + data:_Word100 a test:Word ; tln:wordHasStyle data:_Style10; tln:hasTitle "Mp XV"; tln:hasPageNumber "10"; test:hasText "ohne Manuskript". data:_Word99 a test:Word ; tln:wordHasStyle data:_Style10; tln:hasTitle "Mp XIV"; tln:hasPageNumber "9"; test:hasText "ohne Teile". data:_Mp_XVI_Page_10 a tln:Page; tln:hasNumber "10". data:_Mp_XVI a tln:ArchivalManuscriptUnity; tln:hasTitle "Mp XIV"; tln:hasType "Mappe". data:_Word0 a test:Word ; test:hasCorrection data:_Word5; test:hasText "Otto"; test:wordHasWordParts ( data:_Word1 data:_Word2 data:_Word3 data:_Word4 ) . data:_Word1 a test:Word ; test:hasText "O"; + test:hasLine data:_Line0; test:wordHasStyle data:_Style0. data:_Word2 a test:Word ; test:hasText "t"; test:wordHasStyle data:_Style0. data:_Word3 a test:Word ; test:hasText "t"; test:wordHasStyle data:_Style0. data:_Position0 a test:Position; test:hasLeft "0.0"^^xsd:float . data:_Position1 a test:Position; test:hasLeft "0.1"^^xsd:float . data:_Word4 a test:Word ; test:hasText "o"; test:wordHasStyle data:_Style0. data:_Word5 a test:Word ; test:hasText "en"; test:wordHasStyle data:_Style1; test:overwritesWord data:_Word6; test:hasLine data:_Line0 ; test:hasPosition data:_Position0 . data:_Word6 a test:Word ; test:hasText "et"; test:wordHasStyle data:_Style0; test:hasLine data:_Line0 ; test:hasPosition data:_Position0 . data:_Position2 a test:Position; test:hasLeft "1.0"^^xsd:float . data:_Line0 a test:Line . data:_Line1 a test:Line . data:_Style0 a test:Style ; test:hasCSS "color: #DC0814;"^^xsd:string; test:styleHasColor data:_Color0 . data:_Style1 a test:Style ; test:hasCSS "color: #000000;"^^xsd:string; test:styleHasColor data:_Color1 . data:_Style10 a tln:Style ; test:hasCSS "color: #000000;"^^xsd:string; tln:styleHasFont "deutsche Schreibschrift"; tln:styleHasColor data:_Color10 . data:_Color0 a test:Color; test:colorHasName "red"^^xsd:string ; test:hasHexadecimalValue "#DC0814"^^xsd:string . data:_Color1 a test:Color; test:colorHasName "black"^^xsd:string ; test:hasHexadecimalValue "#000000"^^xsd:string . diff --git a/machineReasoning_extendUnityWithHomotypicPart/test-rules.n3 b/machineReasoning_extendUnityWithHomotypicPart/test-rules.n3 deleted file mode 100644 index 345e60d..0000000 --- a/machineReasoning_extendUnityWithHomotypicPart/test-rules.n3 +++ /dev/null @@ -1,46 +0,0 @@ -@prefix e: . -@prefix kb: . -@prefix tln: . - - -{ - ?s tln:hasTitle ?title. - ?SCOPE e:findall (?s {?s a tln:ArchivalManuscriptUnity} ()). - ?manuscript a tln:ArchivalManuscriptUnity; - tln:hasTitle ?title. -} => { - ?s tln:refersToArchivalManuscriptUnity ?manuscript. - _:d kb:retract (?s tln:hasTitle ?title). -}. - -{ - ?s tln:hasTitle ?title. - ?SCOPE e:findall (?s {?s a tln:ArchivalManuscriptUnity} ()). - ?SCOPE e:findall (?no_manuscript {?no_manuscript a tln:ArchivalManuscriptUnity; tln:hasTitle ?title.} ()). -} => { - ?manuscript a tln:ArchivalManuscriptUnity; - tln:hasTitle ?title. - ?s tln:refersToArchivalManuscriptUnity ?manuscript. - _:d kb:retract (?s tln:hasTitle ?title). -}. - -{ - ?s tln:hasPageNumber ?number. - ?page a tln:Page; - tln:hasNumber ?number. -} => { - ?s tln:refersToPage ?page. - _:d kb:retract (?s tln:hasPageNumber ?number). -}. - -{ - ?s tln:hasPageNumber ?number. - ?SCOPE e:findall (?no_page {?no_page a tln:Page; tln:hasNumber ?number.} ()). -} => { - ?page a tln:Page; - tln:hasNumber ?number. - ?s tln:refersToPage ?page. - _:d kb:retract (?s tln:hasPageNumber ?number). -}. - - diff --git a/machineReasoning_extendUnityWithHomotypicPart/test_rules.sh b/machineReasoning_extendUnityWithHomotypicPart/test_rules.sh index fc302e1..53f9cea 100755 --- a/machineReasoning_extendUnityWithHomotypicPart/test_rules.sh +++ b/machineReasoning_extendUnityWithHomotypicPart/test_rules.sh @@ -1,13 +1,21 @@ #!/bin/bash EYE="/opt/eye/bin/eye.sh" test -e $EYE || EYE=$(find / -name 'eye.sh' 2>/dev/null | head -1) if [[ ! -e $EYE ]];then echo "Please install EYE by josd, see EYE_INSTALL_info" && exit 2 fi echo "# Execution date" $(date) -$EYE --nope --traditional ontologies/homotypic-part_ontology.ttl ontologies/standoff_ontology.ttl ontologies/tln-ontology_autogenerated.ttl test-ontology.ttl test-DATA.ttl https://raw.githubusercontent.com/josd/eye/master/reasoning/rpo/rdfs-subClassOf.n3 https://raw.githubusercontent.com/josd/eye/master/reasoning/rpo/rdfs-subPropertyOf.n3 https://raw.githubusercontent.com/josd/eye/master/reasoning/rpo/owl-TransitiveProperty.n3 https://raw.githubusercontent.com/josd/eye/master/reasoning/rpo/owl-propertyChainAxiom.n3 project-rules/tln-add_language.n3 generic-rules/create_standoff-rules.n3 generic-rules/extend-rules.n3 --query query.n3 +$EYE --nope --traditional ontologies/homotypic-part_ontology.ttl ontologies/standoff_ontology.ttl ontologies/tln-ontology_autogenerated.ttl test-ontology.ttl test-DATA.ttl https://raw.githubusercontent.com/josd/eye/master/reasoning/rpo/rdfs-subClassOf.n3 https://raw.githubusercontent.com/josd/eye/master/reasoning/rpo/rdfs-subPropertyOf.n3 https://raw.githubusercontent.com/josd/eye/master/reasoning/rpo/owl-TransitiveProperty.n3 https://raw.githubusercontent.com/josd/eye/master/reasoning/rpo/owl-propertyChainAxiom.n3 project-rules_joined_data/40-tln-update_reference.n3 project-rules_joined_data/50-tln-connect_lines.n3 project-rules/40-tln-update_word_line_reference.n3 project-rules/55-tln-add_language.n3 generic-rules/create_standoff-rules.n3 generic-rules/extend-rules.n3 --query filter_query.n3 echo -echo -e "\e[1;35mThis is a test example for all rules in the folders 'generic-rules' and 'project-rules'.\e[00m" -echo -e "\e[1;35mThe rule 'project-rules/tln-add_language.n3' adds German as language to each tln:Word if it has a style that defines a font 'deutsche Schreibschrift'.\e[00m" +echo -e "\e[1;35mThis is a test example for all rules in the folders.\e[00m" +echo -e "\e[1;35mThe rule 'project-rules_joined_data/40-tln-update_reference.n3' update reference to next/previous page if there is no line info'.\e[00m" +echo -e "\e[1;35mThe rule 'project-rules_joined_data/50-tln-connect_lines.n3' connects lines as tln:lineContinuesOn if they have mutual references'.\e[00m" +echo -e "\e[1;35m ->grep 'tln:lineContinuesOn'.\e[00m" +echo -e "\e[1;35mThe rule 'project-rules/40-tln-update_word_line_reference.n3' update reference to word if a line has two line continuations that refer to words on this line'\e[00m" +echo -e "\e[1;35m ->grep 'tln:textContinuesWithWord'.\e[00m" +echo -e "\e[1;35mThe rule 'project-rules/55-tln-add_language.n3' adds German as language to each tln:Word if it has a style that defines a font 'deutsche Schreibschrift'\e[00m" +echo -e "\e[1;35m ->grep 'language:expressedInNaturalLanguage'.\e[00m" echo -e "\e[1;35mThe rule 'generic-rules/create_standoff-rules.n3' creates standoff data for each homotypic:HomotypicEntity that has a Style with CSS.\e[00m" +echo -e "\e[1;35m ->sed -n '1,/ENDS/ p' |cwm | sed -n '/data:_Word.*/,/\./ p'\e[00m" echo -e "\e[1;35mThe rule 'generic-rules/extend-rules.n3' extends the data of each homotypic:HomotypicEntity that has parts with data that the whole lacks.\e[00m" +echo -e "\e[1;35m ->grep 'data:_Word0 test:hasLine data:_Line0'.\e[00m" diff --git a/queries/2020-07-10_unilateral_line_continuation.rq b/queries/2020-07-10_unilateral_line_continuation.rq new file mode 100644 index 0000000..edaca7a --- /dev/null +++ b/queries/2020-07-10_unilateral_line_continuation.rq @@ -0,0 +1,18 @@ +PREFIX tln: +PREFIX rdf: +PREFIX rdfs: +PREFIX stoff: +PREFIX data: +PREFIX owl: +PREFIX http: + +select distinct ?line ?line_number ?is_to ?reference_line ?word ?page { + ?line tln:lineHasEditorComment ?lineContinuation; + tln:lineHasNumber ?line_number. + ?lineContinuation a tln:LineContinuation; + tln:isLineAContinuationTo ?is_to; + tln:lineContinuationHasReference ?reference. + OPTIONAL {?reference tln:firstLineOfReference ?reference_line.} + OPTIONAL {?reference tln:wordReference ?word.} + OPTIONAL {?reference tln:hasPageNumber ?page.} +}