summaryrefslogtreecommitdiffstats
path: root/JLanguageTool/src/resource/disambiguation.xsd
diff options
context:
space:
mode:
Diffstat (limited to 'JLanguageTool/src/resource/disambiguation.xsd')
-rw-r--r--JLanguageTool/src/resource/disambiguation.xsd147
1 files changed, 147 insertions, 0 deletions
diff --git a/JLanguageTool/src/resource/disambiguation.xsd b/JLanguageTool/src/resource/disambiguation.xsd
new file mode 100644
index 0000000..9ccad56
--- /dev/null
+++ b/JLanguageTool/src/resource/disambiguation.xsd
@@ -0,0 +1,147 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
+<!--
+ * LanguageTool, a natural language style checker
+ * Copyright (c) Marcin Miłkowski, 2010 (http://www.languagetool.org)
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301
+ * USA
+
+ Schema for disambiguation files. Includes pattern elements defined already for
+ rules.
+ The DTD was originally created by Agnès Souque, 2007 and ported into
+ Schema by Marcin Miłkowski, 2010.
+ -->
+
+ <xs:include schemaLocation="../rules/pattern.xsd"/>
+
+ <xs:element name="rules">
+ <xs:complexType>
+ <xs:choice minOccurs="1" maxOccurs="unbounded" >
+ <xs:element ref="unification" />
+ <xs:element ref="phrases"/>
+ <xs:element ref="rule"/>
+ <xs:element ref="rulegroup"/>
+ </xs:choice>
+ <xs:attribute name="lang" type="xs:language" use="required" />
+ </xs:complexType>
+ </xs:element>
+
+ <xs:element name="rulegroup">
+ <xs:complexType>
+ <xs:sequence minOccurs="1">
+ <xs:element ref="rule" maxOccurs="unbounded" />
+ </xs:sequence>
+ <xs:attribute name="default" use="optional">
+ <xs:simpleType>
+ <xs:restriction base="xs:NMTOKEN"/>
+ </xs:simpleType>
+ </xs:attribute>
+ <xs:attribute name="name" type="xs:string" use="optional" />
+ <xs:attribute name="id" type="xs:ID" use="required" />
+ </xs:complexType>
+ </xs:element>
+
+ <xs:element name="rule">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element ref="pattern" />
+ <xs:element ref="disambig" />
+ <xs:element ref="example" minOccurs="0" maxOccurs="unbounded" />
+ </xs:sequence>
+ <xs:attribute name="default" use="optional">
+ <xs:simpleType>
+ <xs:restriction base="xs:NMTOKEN">
+ <xs:enumeration value="off" />
+ <xs:enumeration value="on" />
+ </xs:restriction>
+ </xs:simpleType>
+ </xs:attribute>
+ <xs:attribute name="name" type="xs:string" use="optional" />
+ <xs:attribute name="id" type="xs:ID" use="optional" />
+ </xs:complexType>
+ </xs:element>
+
+ <xs:element name="pattern">
+ <xs:complexType>
+ <xs:choice minOccurs="1" maxOccurs="unbounded">
+ <xs:element ref="token" />
+ <xs:element ref="phraseref" />
+ <xs:element ref="and" />
+ <xs:element ref="unify" />
+ </xs:choice>
+ <xs:attribute name="mark" type="xs:nonNegativeInteger"
+ use="optional" />
+ <xs:attribute name="mark_from" type="xs:nonNegativeInteger"
+ use="optional" />
+ <xs:attribute name="mark_to" type="xs:nonPositiveInteger"
+ use="optional" />
+ <xs:attribute name="case_sensitive" type="binaryYesNo"
+ use="optional" />
+ </xs:complexType>
+ </xs:element>
+
+
+ <xs:element name="disambig">
+ <xs:complexType>
+ <xs:choice minOccurs="0" maxOccurs="unbounded">
+ <xs:element ref="match" />
+ <xs:element ref="wd" />
+ </xs:choice>
+ <xs:attribute name="postag" type="xs:string" use="optional" />
+ <xs:attribute name="action" use="optional" >
+ <xs:simpleType>
+ <xs:restriction base="xs:NMTOKEN">
+ <xs:enumeration value="add" />
+ <xs:enumeration value="filter" />
+ <xs:enumeration value="remove" />
+ <xs:enumeration value="replace" />
+ <xs:enumeration value="unify" />
+ </xs:restriction>
+ </xs:simpleType>
+ </xs:attribute>
+ <xs:attribute name="id" type="xs:ID" use="optional" />
+ </xs:complexType>
+ </xs:element>
+
+ <xs:element name="wd">
+ <xs:complexType mixed="true">
+ <xs:attribute name="lemma" type="xs:string" use="optional" />
+ <xs:attribute name="pos" type="xs:string" use="optional" />
+ </xs:complexType>
+ </xs:element>
+
+ <xs:element name="example" xml:space="preserve">
+ <xs:complexType mixed="true">
+ <xs:choice minOccurs="0" maxOccurs="unbounded">
+ <xs:element ref="marker" />
+ </xs:choice>
+ <xs:attribute name="inputform" type="xs:string"
+ use="optional" />
+ <xs:attribute name="outputform" type="xs:string"
+ use="optional" />
+ <xs:attribute name="type" use="required">
+ <xs:simpleType>
+ <xs:restriction base="xs:NMTOKEN">
+ <xs:enumeration value="untouched" />
+ <xs:enumeration value="ambiguous" />
+ </xs:restriction>
+ </xs:simpleType>
+ </xs:attribute>
+ <xs:attribute name="reason" type="xs:string" use="optional" />
+ </xs:complexType>
+ </xs:element>
+
+</xs:schema> \ No newline at end of file