Difference between revisions of "Quality control framework/XML Schema"

From Apertium
Jump to navigation Jump to search
 
(2 intermediate revisions by one other user not shown)
Line 11: Line 11:
</attribute>
</attribute>
<element name="regressions">
<element name="regressions">
<oneOrMore>
<zeroOrMore>
<element name="regression">
<element name="regression">
<attribute name="timestamp">
<attribute name="timestamp">
Line 20: Line 20:
</element>
</element>
<element name="revision">
<element name="revision">
<data type="positiveInteger"/>
</element>
<element name="total">
<data type="positiveInteger"/>
<data type="positiveInteger"/>
</element>
</element>
Line 28: Line 31:
<data type="positiveInteger"/>
<data type="positiveInteger"/>
</element>
</element>
<element name="total">
</element>
</zeroOrMore>
<data type="positiveInteger"/>
</element>
<element name="coverages">
<zeroOrMore>
<element name="coverage">
<attribute name="timestamp">
<data type="dateTime"/>
</attribute>
<element name="corpus">
<data type="string"/>
<attribute name="checksum">
<data type="string"/>
</attribute>
</element>
<element name="dictionary">
<data type="string"/>
<attribute name="checksum">
<data type="string"/>
</attribute>
</element>
<element name="percent">
<data type="float"/>
</element>
<element name="words">
<element name="total">
<data type="positiveInteger"/>
</element>
<element name="known">
<data type="positiveInteger"/>
</element>
<element name="unknown">
<data type="positiveInteger"/>
</element>
</element>
<element name="top">
<zeroOrMore>
<element name="word">
<data type="string"/>
<attribute name="count">
<data type="positiveInteger"/>
</attribute>
</element>
</zeroOrMore>
</element>
</element>
</element>
</element>
</oneOrMore>
</zeroOrMore>
</element>
</element>
</element>
</element>

</pre>
</pre>


Line 41: Line 87:
default namespace = "http://apertium.org/xml/statistics"
default namespace = "http://apertium.org/xml/statistics"
element statistics {
element statistics {
attribute type { xsd:string },
attribute type { xsd:string },
attribute version { xsd:float },
attribute version { xsd:float },
element regressions {
element regressions {
element regression {
element regression {
attribute timestamp { xsd:dateTime },
attribute timestamp { xsd:dateTime },
element title { xsd:string },
element title { xsd:string },
element revision { xsd:positiveInteger },
element revision { xsd:positiveInteger },
element passes { xsd:positiveInteger },
element total { xsd:positiveInteger },
element fails { xsd:positiveInteger },
element passes { xsd:positiveInteger },
element total { xsd:positiveInteger }
element fails { xsd:positiveInteger }
}*
}+
}
},
element coverages {
element coverage {
attribute timestamp { xsd:dateTime },
element corpus {
xsd:string,
attribute checksum { xsd:string }
},
element dictionary {
xsd:string,
attribute checksum { xsd:string }
},
element percent { xsd:float },
element words {
element total { xsd:positiveInteger },
element known { xsd:positiveInteger },
element unknown { xsd:positiveInteger }
},
element top {
element word {
xsd:string,
attribute count { xsd:positiveInteger }
}*
}
}*
}
}
}

</pre>
</pre>


== Example file ==
= Example Statistics XML file =
<pre>
<pre>
<?xml version='1.0' encoding='utf-8'?>
<?xml version='1.0' encoding='utf-8'?>
<statistics type="apertium" version="1.0">
<statistics type="apertium" version="1.0">
<regressions>
<regressions>
<regression timestamp="2011-05-24T23:48:58.393974">
<regression timestamp="2011-05-26T16:53:06.271028">
<title>Breton and French/Regression tests</title>
<title>Breton and French/Regression tests</title>
<revision>23172</revision>
<revision>23172</revision>
<passes>380</passes>
<passes>381</passes>
<fails>76</fails>
<fails>75</fails>
<total>456</total>
<total>456</total>
</regression>
</regression>
</regressions>
</regressions>
<coverages>
<coverage timestamp="2011-05-26T16:57:04.363685">
<corpus checksum="89e3a41c79d3e6dffb891686a6d09f12a590b788">corpus.txt</corpus>
<dictionary checksum="7afe0fd8903f446242922095f0d872512b987514">br-fr.automorf.bin</dictionary>
<percent>96.80</percent>
<words>
<total>125</total>
<known>121</known>
<unknown>4</unknown>
</words>
<top>
<word count="1">english</word>
<word count="1">sentence</word>
<word count="1">break</word>
<word count="1">random</word>
</top>
</coverage>
</coverages>
</statistics>
</statistics>
</pre>
</pre>

Latest revision as of 17:07, 26 May 2011

Statistics 0.1 Schema[edit]

RELAX NG Schema (.rng)[edit]

<?xml version="1.0" encoding="UTF-8"?>
<element name="statistics" ns="http://apertium.org/xml/statistics" xmlns="http://relaxng.org/ns/structure/1.0" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">
  <attribute name="type">
    <data type="string"/>
  </attribute>
  <attribute name="version">
    <data type="float"/>
  </attribute>
  <element name="regressions">
    <zeroOrMore>
      <element name="regression">
        <attribute name="timestamp">
          <data type="dateTime"/>
        </attribute>
        <element name="title">
          <data type="string"/>
        </element>
        <element name="revision">
          <data type="positiveInteger"/>
        </element>
        <element name="total">
          <data type="positiveInteger"/>
        </element>
        <element name="passes">
          <data type="positiveInteger"/>
        </element>
        <element name="fails">
          <data type="positiveInteger"/>
        </element>
      </element>
    </zeroOrMore>
  </element>
  <element name="coverages">
    <zeroOrMore>
      <element name="coverage">
        <attribute name="timestamp">
          <data type="dateTime"/>
        </attribute>
        <element name="corpus">
          <data type="string"/>
          <attribute name="checksum">
            <data type="string"/>
          </attribute>
        </element>
        <element name="dictionary">
          <data type="string"/>
          <attribute name="checksum">
            <data type="string"/>
          </attribute>
        </element>
        <element name="percent">
          <data type="float"/>
        </element>
        <element name="words">
          <element name="total">
            <data type="positiveInteger"/>
          </element>
          <element name="known">
            <data type="positiveInteger"/>
          </element>
          <element name="unknown">
            <data type="positiveInteger"/>
          </element>
        </element>
        <element name="top">
          <zeroOrMore>
            <element name="word">
              <data type="string"/>
              <attribute name="count">
                <data type="positiveInteger"/>
              </attribute>
            </element>
          </zeroOrMore>
        </element>
      </element>
    </zeroOrMore>
  </element>
</element>

RELAX NG Compact Schema (.rnc)[edit]

default namespace = "http://apertium.org/xml/statistics"
element statistics {
  attribute type { xsd:string },
  attribute version { xsd:float },
  element regressions {
    element regression {
      attribute timestamp { xsd:dateTime },
      element title { xsd:string },
      element revision { xsd:positiveInteger },
      element total { xsd:positiveInteger },
      element passes { xsd:positiveInteger },
      element fails { xsd:positiveInteger }
    }*
  },
  element coverages {
    element coverage {
      attribute timestamp { xsd:dateTime },
      element corpus {
        xsd:string,
        attribute checksum { xsd:string }
      },
      element dictionary {
        xsd:string,
        attribute checksum { xsd:string }
      },
      element percent { xsd:float },
      element words {
        element total { xsd:positiveInteger },
        element known { xsd:positiveInteger },
        element unknown { xsd:positiveInteger }
      },
      element top {
        element word {
          xsd:string,
          attribute count { xsd:positiveInteger }
        }*
      }
    }*
  }
}

Example Statistics XML file[edit]

<?xml version='1.0' encoding='utf-8'?>
<statistics type="apertium" version="1.0">
  <regressions>
    <regression timestamp="2011-05-26T16:53:06.271028">
      <title>Breton and French/Regression tests</title>
      <revision>23172</revision>
      <passes>381</passes>
      <fails>75</fails>
      <total>456</total>
    </regression>
  </regressions>
  <coverages>
    <coverage timestamp="2011-05-26T16:57:04.363685">
      <corpus checksum="89e3a41c79d3e6dffb891686a6d09f12a590b788">corpus.txt</corpus>
      <dictionary checksum="7afe0fd8903f446242922095f0d872512b987514">br-fr.automorf.bin</dictionary>
      <percent>96.80</percent>
      <words>
        <total>125</total>
        <known>121</known>
        <unknown>4</unknown>
      </words>
      <top>
        <word count="1">english</word>
        <word count="1">sentence</word>
        <word count="1">break</word>
        <word count="1">random</word>
      </top>
    </coverage>
  </coverages>
</statistics>