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

From Apertium
Jump to navigation Jump to search
Line 57: Line 57:
</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>

Revision as of 16:56, 26 May 2011

Statistics 0.1 Schema

RELAX NG Schema (.rng)

<?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">
    <oneOrMore>
      <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="passes">
          <data type="positiveInteger"/>
        </element>
        <element name="fails">
          <data type="positiveInteger"/>
        </element>
        <element name="total">
          <data type="positiveInteger"/>
        </element>
      </element>
    </oneOrMore>
  </element>
</element>

RELAX NG Compact Schema (.rnc)

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 passes { xsd:positiveInteger },
			element fails { xsd:positiveInteger },
			element total { xsd:positiveInteger }
		}+
	}
}

Example Statistics XML file =

<?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>