Danish noun (E34)

From Wikidata
Jump to navigation Jump to search
language codelabeldescriptionaliasesedit
enDanish nounschema for Danish nounsedit
csdánské podstatné jménoschéma pro dánská podstatná jménaedit
dadansk navneordedit
eodana substantivoedit
frsubstantif danoisedit
itsostantivo (danese)schema per descrivere un sostantivo in lingua daneseedit
jaデンマーク語の名詞デンマーク語の名詞を記述するためのスキーマedit
nbdansk substantivedit
nlDeens zelfstandig naamwoordedit
plduński rzeczownikedit
ptsubstantivo (danês)edit
svdanskt substantivedit
IMPORT <https://www.wikidata.org/wiki/Special:EntitySchemaText/E68>
PREFIX E68: <https://www.wikidata.org/wiki/Special:EntitySchemaText/E68#>

PREFIX dct: <http://purl.org/dc/terms/>
PREFIX ontolex: <http://www.w3.org/ns/lemon/ontolex#>
PREFIX p: <http://www.wikidata.org/prop/>
PREFIX pq: <http://www.wikidata.org/prop/qualifier/>
PREFIX ps: <http://www.wikidata.org/prop/statement/>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX wdno: <http://www.wikidata.org/prop/novalue/>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>

# SELECT ?lexeme { ?lexeme dct:language wd:Q9035 ; wikibase:lexicalCategory wd:Q1084 ; }

start = @<danish-noun>

<danish-noun> {

  dct:language [ wd:Q9035 ]
    // rdf:label "language"
    // rdf:comment "language of lexeme must be Danish" ;

  wikibase:lexicalCategory [ wd:Q1084 ]
    // rdf:label "lexical category"
    // rdf:comment "Lexical category for a noun must be noun" ; 

  wdt:P5187 [ @da ]
    // rdfs:label "Danish noun word stem" 
    // rdfs:comment "Danish noun must have a Danish word stem" ;

  wdt:P5185 [ wd:Q1305037 wd:Q1775461 ]
    // rdf:label "grammatical gender"
    // rdf:comment "grammatical gender of noun must be either be common gender or neuter" ;

  p:P6140 EXTRA a {
    a [ wdno:P6140 ] | ps:P6140 /^[0-9]{8}$/
      // rdf:label "DanNet identifier"
      // rdf:comment "DanNet identifier should either be novalue or a 8 digit string" ;
  }
    // rdf:label "DanNet identifier statement" ; 

  p:P10831 EXTRA a {
    a [ wdno:P10831 ] | ps:P10831 /^COR\.[0-9]{5}$/
      // rdf:label "COR lemma identifier"
      // rdf:comment "COR lemma identifier should either be novalue or of appropriate format" ;
  }
    // rdf:label "COR lemma identifier statement" ; 

  ontolex:lexicalForm @<danish-form> + ;

}
AND (
  ( 
    EXTRA wdt:P5238 { 
      # Neuter compounds must have one or more neuter nouns
      wdt:P5185 [ wd:Q1775461 ] ;
    }
    AND (
      (
        NOT { wdt:P5238 IRI {2} }
        OR EXTRA p:P5238 { 
          p:P5238 {
            ps:P5238 { wdt:P5185 [ wd:Q1775461 ] } ;
            pq:P1545 [ "2" ] ;
          }
        }
      )
      AND (
        NOT { wdt:P5238 IRI {3} }
        OR EXTRA p:P5238 { 
          p:P5238 {
            ps:P5238 { wdt:P5185 [ wd:Q1775461 ] } ;
            pq:P1545 [ "3" ] ;
          }
        }
      )
      AND (
        NOT { wdt:P5238 IRI {4} }
        OR EXTRA p:P5238 { 
          p:P5238 {
            ps:P5238 { wdt:P5185 [ wd:Q1775461 ] } ;
            pq:P1545 [ "4" ] ;
          }
        }
      )
    )
  )
  OR (
    EXTRA wdt:P5238 { 
      # common gender compounds must have one or more common gender nouns
      wdt:P5185 [ wd:Q1305037 ] ; 
    }
    AND (
      (
        NOT { wdt:P5238 IRI {2} }
        OR EXTRA p:P5238 { 
          p:P5238 {
            ps:P5238 { wdt:P5185 [ wd:Q1305037 ] } ;
            pq:P1545 [ "2" ] ;
          }
        }
      )
      AND (
        NOT { wdt:P5238 IRI {3} }
        OR EXTRA p:P5238 { 
          p:P5238 {
            ps:P5238 { wdt:P5185 [ wd:Q1305037 ] } ;
            pq:P1545 [ "3" ] ;
          }
        }
      )
      AND (
        NOT { wdt:P5238 IRI {4} }
        OR EXTRA p:P5238 { 
          p:P5238 {
            ps:P5238 { wdt:P5185 [ wd:Q1305037 ] } ;
            pq:P1545 [ "4" ] ;
          }
        }
      )
    )
  )
  OR (
    EXTRA wdt:P31 {
      wdt:P31 [ wd:Q245423 ] {0} 
        // rdfs:comment "Not a compound" ; 
    }
  )
  OR (
    EXTRA wdt:P5238 {
      wdt:P5238 [ wd:L48585 ] 
        // rdfs:comment "Exception for -fuld" ;
    }
  ) 
)


<danish-form> {
  wikibase:grammaticalFeature [
    wd:Q110786  # singular
    wd:Q146786  # plural
    wd:Q53997857  # indefinite
    wd:Q53997851  # definite
    wd:Q146233    # genitive
    wd:Q98946930  # non-genitive
  ] {3} ; 

  p:P10830 EXTRA a {
    a [ wdno:P10830 ] | ps:P10830 /^COR\.[0-9]{5}\.[0-9]{3}\.[0-9]{2}$/
      // rdf:label "COR form identifier"
      // rdf:comment "COR form identifier should either be novalue or of appropriate format" ;
  }
    // rdf:label "COR form identifier statement" ; 

}
AND @<hyphenation>
AND (
    NOT @<singular-definite-not-genitive>
  OR
    @<represensation-ends-with-en-et>
  )
AND (
    NOT @<plural-definite-not-genitive>
  OR
    @<represensation-ends-with-erne>)


<hyphenation> {
  # Hyphenation
  p:P5279 @E68:danish-hyphenation-statement + ; 
}


<represensation-ends-with-en-et> {
  # representation ends with "-en" or "-et"
  ontolex:representation /^.+e(n|t)$/ ;
}


<represensation-ends-with-erne> {
  ontolex:representation /^.+er?ne$/
    // rdf:label "plural definite ending"
    // rdf:comment "representation ends with '-e(r)ne'" ;
}


<singular-definite-not-genitive> EXTRA wikibase:grammaticalFeature {
  wikibase:grammaticalFeature [ wd:Q110786 ] ;
  wikibase:grammaticalFeature [ wd:Q53997851 ] ;
  wikibase:grammaticalFeature [ wd:Q146233 ] {0} ; 
}

<plural-definite-not-genitive> EXTRA wikibase:grammaticalFeature {
  wikibase:grammaticalFeature [ wd:Q146786 ] ;
  wikibase:grammaticalFeature [ wd:Q53997851 ] ;
  wikibase:grammaticalFeature [ wd:Q146233 ] {0} ; 
}