Difference between revisions of "Quality control framework/XML Schema"
Jump to navigation
Jump to search
(Created page with 'The XML Schema doesn't exist yet for statistics, but here's the example so far. <pre> <?xml version="1.0"?> <statistics type="apertium" version="1.0"> <regressions> <regress…') |
|||
(8 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
= Statistics 0.1 Schema = |
|||
The XML Schema doesn't exist yet for statistics, but here's the example so far. |
|||
== RELAX NG Schema (.rng) == |
|||
<pre> |
|||
<?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> |
|||
</pre> |
|||
== RELAX NG Compact Schema (.rnc)== |
|||
<pre> |
<pre> |
||
default namespace = "http://apertium.org/xml/statistics" |
|||
<?xml version="1.0"?> |
|||
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 } |
|||
}* |
|||
} |
|||
}* |
|||
} |
|||
} |
|||
</pre> |
|||
= Example Statistics XML file = |
|||
<pre> |
|||
<?xml version='1.0' encoding='utf-8'?> |
|||
<statistics type="apertium" version="1.0"> |
<statistics type="apertium" version="1.0"> |
||
<regressions> |
|||
<regression timestamp="2011-05-26T16:53:06.271028"> |
|||
<title>Breton and French/Regression tests</title> |
|||
<name>Example Regression Test Name</name> |
|||
<revision>23172</revision> |
|||
<checksum>13550350a8681c84c861aac2e5b440161c2b33a3e4f302ac680ca5b686de48de</checksum> |
|||
<passes>381</passes> |
|||
<fails>75</fails> |
|||
<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
Contents
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>