<?xml version="1.0" encoding="UTF-8"?>
<schema xmlns:ns="http://www.iula.upf.edu/types" xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    attributeFormDefault="unqualified" elementFormDefault="qualified"
    targetNamespace="http://www.iula.upf.edu/types" xmlns="http://www.w3.org/2001/XMLSchema"
    version="1.2">


    <!-- Request Params Types -->

    <complexType name="ParamsType">
        <annotation>
            <documentation>All Request messages derive from ParamsType. Params may be Main params or
                Optional params. Main params are necessarily typed. Optional params may be left
                untyped and have default values. </documentation>
        </annotation>
        <sequence>
            <element minOccurs="0" name="MainParams" type="xsd:anyType"/>
            <element minOccurs="0" name="optParams" type="xsd:anyType"/>
        </sequence>
    </complexType>

    <complexType name="SentenceSplitterParamsType">
        <annotation>
            <documentation>Payload message for a sentence splitter service.</documentation>
        </annotation>
        <complexContent>
            <restriction base="ns:ParamsType">
                <sequence>
                    <element name="MainParams" type="ns:SentenceSplitterMainParamsType"/>
                    <element name="optParams" type="xsd:string" minOccurs="0"/>
                </sequence>
            </restriction>
        </complexContent>
    </complexType>

    <complexType name="TokenizerParamsType">
        <annotation>
            <documentation>Payload message for a tokenizer service.</documentation>
        </annotation>
        <complexContent>
            <restriction base="ns:ParamsType">
                <sequence>
                    <element name="MainParams" type="ns:TokenizerMainParamsType"/>
                    <element name="optParams" type="xsd:string" minOccurs="0"/>
                </sequence>
            </restriction>
        </complexContent>
    </complexType>

    <complexType name="LemmatizerParamsType">
        <annotation>
            <documentation>Payload message for a lemmatizer service.</documentation>
        </annotation>
        <complexContent>
            <restriction base="ns:ParamsType">
                <sequence>
                    <element name="MainParams" type="ns:LemmatizerMainParamsType"/>
                    <element name="optParams" type="xsd:string" minOccurs="0"/>
                </sequence>
            </restriction>
        </complexContent>
    </complexType>

    <complexType name="POSTaggerParamsType">
        <annotation>
            <documentation>Payload message for a PoS tagger service.</documentation>
        </annotation>
        <complexContent>
            <restriction base="ns:ParamsType">
                <sequence>
                    <element name="MainParams" type="ns:POSTaggerMainParamsType"/>
                    <element name="optParams" type="xsd:string" minOccurs="0"/>
                </sequence>
            </restriction>
        </complexContent>
    </complexType>

    <complexType name="ShallowParserParamsType">
        <annotation>
            <documentation>Payload message for a Shallow Parser (or Chunking)
                service.</documentation>
        </annotation>
        <complexContent>
            <restriction base="ns:ParamsType">
                <sequence>
                    <element name="MainParams" type="ns:ShallowParserMainParamsType"/>
                    <element name="optParams" type="xsd:string" minOccurs="0"/>
                </sequence>
            </restriction>
        </complexContent>
    </complexType>

    <complexType name="ParserParamsType">
        <annotation>
            <documentation>Payload message for a Parser service.</documentation>
        </annotation>
        <complexContent>
            <restriction base="ns:ParamsType">
                <sequence>
                    <element name="MainParams" type="ns:ParserMainParamsType"/>
                    <element name="optParams" type="xsd:string" minOccurs="0"/>
                </sequence>
            </restriction>
        </complexContent>
    </complexType>

    <complexType name="TextAlignerParamsType">
        <annotation>
            <documentation>Payload message for a Text Alignment service.</documentation>
        </annotation>
        <complexContent>
            <restriction base="ns:ParamsType">
                <sequence>
                    <element name="MainParams" type="ns:TextAlignerMainParamsType"/>
                    <element name="optParams" type="xsd:string" minOccurs="0"/>
                </sequence>
            </restriction>
        </complexContent>
    </complexType>

    <complexType name="CQPIndexerParamsType">
        <annotation>
            <documentation>Payload message for a CWB service when indexing a corpus.</documentation>
        </annotation>
        <complexContent>
            <restriction base="ns:ParamsType">
                <sequence>
                    <element name="MainParams" type="ns:CQPIndexerMainParamsType"/>
                    <element name="optParams" type="xsd:string" minOccurs="0"/>
                </sequence>
            </restriction>
        </complexContent>
    </complexType>

    <complexType name="CQPQuerierParamsType">
        <annotation>
            <documentation>Payload message for a CWB service when querying a corpus.</documentation>
        </annotation>
        <complexContent>
            <restriction base="ns:ParamsType">
                <sequence>
                    <element name="MainParams" type="ns:CQPQuerierMainParamsType"/>
                    <element name="optParams" type="xsd:string" minOccurs="0"/>
                </sequence>
            </restriction>
        </complexContent>
    </complexType>

    <complexType name="ConcordancerParamsType">
        <annotation>
            <documentation>Payload message for a concordancer (or KWIC) service.</documentation>
        </annotation>
        <complexContent>
            <restriction base="ns:ParamsType">
                <sequence>
                    <element name="MainParams" type="ns:ConcordancerMainParamsType"/>
                    <element name="optParams" type="ns:ConcordancerOptionalParamsType" minOccurs="0"
                    />
                </sequence>
            </restriction>
        </complexContent>
    </complexType>

    <complexType name="NgramsCooccurrencesParamsType">
        <annotation>
            <documentation>Payload message for a n-gram (or collocation finder)
                service.</documentation>
        </annotation>
        <complexContent>
            <restriction base="ns:ParamsType">
                <sequence>
                    <element name="MainParams" type="ns:NgramsCooccurrencesMainParamsType"/>
                    <element name="optParams" type="ns:NgramsCooccurrencesOptionalParamsType"
                        minOccurs="0"/>
                </sequence>
            </restriction>
        </complexContent>
    </complexType>

    <complexType name="CrawlerParamsType">
        <annotation>
            <documentation>Payload message for a crawler service.</documentation>
        </annotation>
        <complexContent>
            <restriction base="ns:ParamsType">
                <sequence>
                    <element name="MainParams" type="ns:CrawlerMainParamsType"/>
                    <element name="optParams" type="ns:CrawlerOptionalParamsType" minOccurs="0"/>
                </sequence>
            </restriction>
        </complexContent>
    </complexType>

    <complexType name="NERecognitionParamsType">
        <annotation>
            <documentation>Payload message for a Named Entity recognition service.</documentation>
        </annotation>
        <complexContent>
            <restriction base="ns:ParamsType">
                <sequence>
                    <element name="MainParams" type="ns:NERecognitionMainParamsType"/>
                    <element name="optParams" type="ns:NERecognitionOptionalParamsType"
                        minOccurs="0"/>
                </sequence>
            </restriction>
        </complexContent>
    </complexType>

    <complexType name="TermExtractionParamsType">
        <annotation>
            <documentation>Payload message for a term extraction service.</documentation>
        </annotation>
        <complexContent>
            <restriction base="ns:ParamsType">
                <sequence>
                    <element name="MainParams" type="ns:TermExtractionMainParamsType"/>
                    <element name="optParams" type="ns:TermExtractionOptionalParamsType"
                        minOccurs="0"/>
                </sequence>
            </restriction>
        </complexContent>
    </complexType>

    <complexType name="TopicIdentifierParamsType">
        <annotation>
            <documentation>Payload message for a term extraction service.</documentation>
        </annotation>
        <complexContent>
            <restriction base="ns:ParamsType">
                <sequence>
                    <element name="MainParams" type="ns:TopicIdentifierMainParamsType"/>
                    <element name="optParams" type="ns:TopicIdentifierOptionalParamsType"
                        minOccurs="0"/>
                </sequence>
            </restriction>
        </complexContent>
    </complexType>

    <complexType name="DitionaryLookupParamsType">
        <annotation>
            <documentation>Payload message for a dictionary lookup service.</documentation>
        </annotation>
        <complexContent>
            <restriction base="ns:ParamsType">
                <sequence>
                    <element name="MainParams" type="ns:DictionaryLookupMainParamsType"/>
                    <element name="optParams" type="xsd:string" minOccurs="0"/>
                </sequence>
            </restriction>
        </complexContent>
    </complexType>

    <!-- Main Params Types-->

    <complexType name="SentenceSplitterMainParamsType">
        <annotation>
            <documentation>Main Params in the payload message for a Sentence Splitter service.
                Includes language and text.</documentation>
        </annotation>
        <sequence>
            <element name="language" type="ns:lang"/>
            <element name="input" type="ns:TextType"/>
        </sequence>
    </complexType>

    <complexType name="TokenizerMainParamsType">
        <annotation>
            <documentation>Main Params in the payload message for a Tokenizer service. Includes
                language and text.</documentation>
        </annotation>
        <sequence>
            <element name="language" type="ns:lang"/>
            <element name="input" type="ns:TextType"/>
        </sequence>
    </complexType>

    <complexType name="LemmatizerMainParamsType">
        <annotation>
            <documentation>Main Params in the payload message for a Lemmatizer service. Includes
                language and text.</documentation>
        </annotation>
        <sequence>
            <element name="language" type="ns:lang"/>
            <element name="input" type="ns:TextType"/>
        </sequence>
    </complexType>

    <complexType name="POSTaggerMainParamsType">
        <annotation>
            <documentation>Main Params in the payload message for a PoS Tagger service. Includes
                language and text.</documentation>
        </annotation>
        <sequence>
            <element name="language" type="ns:lang"/>
            <element name="input" type="ns:TextType"/>
        </sequence>
    </complexType>

    <complexType name="ShallowParserMainParamsType">
        <annotation>
            <documentation>Main Params in the payload message for a Shallow Parser (or Chunking)
                service. Includes language and text to be parsed.</documentation>
        </annotation>
        <sequence>
            <element name="language" type="ns:lang"/>
            <element name="input" type="ns:TextType"/>
        </sequence>
    </complexType>

    <complexType name="ParserMainParamsType">
        <annotation>
            <documentation>Main Params in the payload message for a Parser (or Chunking) service.
                Includes language and text to be parsed.</documentation>
        </annotation>
        <sequence>
            <element name="language" type="ns:lang"/>
            <element name="input" type="ns:TextType"/>
        </sequence>
    </complexType>

    <complexType name="TextAlignerMainParamsType">
        <annotation>
            <documentation>Main Params in the payload message for a Text Aligner service. Includes
                language and corpus for both source and target.</documentation>
        </annotation>
        <sequence>
            <element name="source_language" type="ns:lang"/>
            <element name="source_corpus" type="ns:TextType"/>
            <element name="target_language" type="ns:lang"/>
            <element name="target_corpus" type="ns:TextType"/>
        </sequence>
    </complexType>

    <complexType name="CQPIndexerMainParamsType">
        <annotation>
            <documentation>Main Params in the payload message for a CWB service when indexing a
                corpus. Includes the CQP corpus to be index and the CQP structure of the
                corpsus.</documentation>
        </annotation>
        <sequence>
            <element name="CQPCorpus" type="ns:CQPCorpusType"/>
            <element name="CQPCorpusStructure" type="ns:CQPCorpusStructureType"/>
        </sequence>
    </complexType>

    <complexType name="CQPQuerierMainParamsType">
        <annotation>
            <documentation>Main Params in the payload message for a CWB service when indexing a
                corpus. Includes a reference to the indexed corpus to be queried and the CQP
                query.</documentation>
        </annotation>
        <sequence>
            <element name="CQPQuery" type="ns:CQPQueryType"/>
            <element name="CorpusReference" type="ns:ReferenceType">
                <annotation>
                    <documentation>The reference to the CQP corpus that is beeing
                        accessed</documentation>
                </annotation>
            </element>
        </sequence>
    </complexType>

    <complexType name="ConcordancerMainParamsType">
        <annotation>
            <documentation>Main Params in the payload message for a Concordancer service. Includes
                the search query and the window size.</documentation>
        </annotation>
        <sequence>
            <element name="SearchQuery" type="ns:SearchQueryType"/>
            <element name="WindowSize" type="ns:WindowSizeType" minOccurs="0" maxOccurs="1"/>
        </sequence>
    </complexType>

    <complexType name="NgramsCooccurrencesMainParamsType">
        <annotation>
            <documentation>Main Params in the payload message for a n-gram (or collocation finder)
                service. Includes the corpus to be analyzed and the Number of tokens in the
                n-grams.</documentation>
        </annotation>
        <sequence>
            <element name="input" type="ns:TextType"/>
            <element name="N" type="ns:NumberType">
                <annotation>
                    <documentation>The number of tokens in the n-gram</documentation>
                </annotation>
            </element>
        </sequence>
    </complexType>

    <complexType name="CrawlerMainParamsType">
        <annotation>
            <documentation>Main Params in the payload message for crawler service.</documentation>
        </annotation>
        <sequence>
            <element name="language" type="ns:lang" maxOccurs="unbounded"/>
            <element name="domain" type="ns:DomainType"/>
            <element name="urlList" type="ns:UrlListType"/>
            <element name="termList" type="ns:TermListType"/>
        </sequence>
    </complexType>

    <complexType name="NERecognitionMainParamsType">
        <annotation>
            <documentation>Main Params in the payload message for a Named Entity recognition
                service.</documentation>
        </annotation>
        <sequence>
            <element name="language" type="ns:lang"/>
            <element name="input" type="ns:TextType"/>
        </sequence>
    </complexType>

    <complexType name="TermExtractionMainParamsType">
        <annotation>
            <documentation>Main Params in the payload message for a term extraction
                service.</documentation>
        </annotation>
        <sequence>
            <element name="language" type="ns:lang"/>
            <element name="input" type="ns:TextType"/>
        </sequence>
    </complexType>

    <complexType name="TopicIdentifierMainParamsType">
        <annotation>
            <documentation>Main Params in the payload message for a topic identifier
                service.</documentation>
        </annotation>
        <sequence>
            <element name="language" type="ns:lang"/>
            <element name="input" type="ns:TextType"/>
        </sequence>
    </complexType>

    <complexType name="DictionaryLookupMainParamsType">
        <annotation>
            <documentation>Main Params in the payload message for a dictionary lookup
                service.</documentation>
        </annotation>
        <sequence>
            <element name="language" type="ns:lang"/>
            <element name="wordForm" type="ns:wordFormType"/>
        </sequence>
    </complexType>


    <!-- Optional Request Params Types-->

    <complexType name="NgramsCooccurrencesOptionalParamsType">
        <annotation>
            <documentation>Optional parameters in the payload message for a n-gram (or collocation
                finder) service. </documentation>
        </annotation>
        <all>
            <element name="WindowSize" type="ns:WindowSizeType" minOccurs="0" maxOccurs="1">
                <annotation>
                    <documentation>Size of the window</documentation>
                </annotation>
            </element>
            <element name="FrequencyThreshold" type="ns:ThresholdType" minOccurs="0" maxOccurs="1">
                <annotation>
                    <documentation>it ignores all Ngrams with frequency lower than the
                        supplied</documentation>
                </annotation>
            </element>
            <element name="RankThreshold" type="ns:ThresholdType" minOccurs="0" maxOccurs="1">
                <annotation>
                    <documentation>it ignores all Ngrams with rank lower than the given
                        value</documentation>
                </annotation>
            </element>
            <element name="ScoreThreshold" type="ns:ThresholdType" minOccurs="0" maxOccurs="1">
                <annotation>
                    <documentation>it ignores all Ngrams with score lower than the given value
                        threshold</documentation>
                </annotation>
            </element>
            <element name="AssociationMeassure" type="ns:AssociationMeassureType" minOccurs="0"
                maxOccurs="1">
                <annotation>
                    <documentation>Measure of association used</documentation>
                </annotation>
            </element>
        </all>
    </complexType>


    <complexType name="ConcordancerOptionalParamsType">
        <annotation>
            <documentation>Optional parameters in the payload message for a Concordancer (or KWIC)
                service. </documentation>
        </annotation>
        <all>
            <element name="OrderBy" type="ns:OrderByType" minOccurs="0" maxOccurs="1">
                <annotation>
                    <documentation>Specifies the order criteria</documentation>
                </annotation>
            </element>
        </all>
    </complexType>

    <complexType name="CrawlerOptionalParamsType">
        <annotation>
            <documentation>Optional parameters in the payload message for a crawler service. It
                includes: maxSize and maxTime as criteria to stop the crawling process and timeOut
                and retries for flow control purposes</documentation>
        </annotation>
        <all>
            <element name="maxSize" type="ns:maxSizeType" minOccurs="0" maxOccurs="1"/>
            <element name="maxTime" type="ns:maxTimeType" minOccurs="0" maxOccurs="1"/>
            <element name="timeOut" type="ns:timeOutType" minOccurs="0" maxOccurs="1"/>
            <element name="retries" type="ns:retriesType" minOccurs="0" maxOccurs="1"/>
        </all>
    </complexType>

    <complexType name="NERecognitionOptionalParamsType">
        <annotation>
            <documentation>Optional parameters in the payload message for a Named Entity recognition
                service.</documentation>
        </annotation>
        <all>
            <element name="inputFormat" type="ns:InputFormatType" minOccurs="0" maxOccurs="1"/>
            <element name="outputFormat" type="ns:OutputFormatType" minOccurs="0" maxOccurs="1"/>
            <element name="NETypes" type="ns:NEListType" minOccurs="0" maxOccurs="1"/>
        </all>
    </complexType>


    <complexType name="TermExtractionOptionalParamsType">
        <annotation>
            <documentation>Optional parameters in the payload message for a term extraction
                service.</documentation>
        </annotation>
        <all>
            <element name="inputFormat" type="ns:InputFormatType" minOccurs="0" maxOccurs="1"/>
            <element name="outputFormat" type="ns:OutputFormatType" minOccurs="0" maxOccurs="1"/>
            <element name="FrequencyThreshold" type="ns:ThresholdType" minOccurs="0" maxOccurs="1">
                <annotation>
                    <documentation>it ignores all NE with frequency lower than the
                        supplied</documentation>
                </annotation>
            </element>
            <element name="stopList" type="ns:TextType" minOccurs="0" maxOccurs="1"/>
        </all>
    </complexType>

    <complexType name="TopicIdentifierOptionalParamsType">
        <annotation>
            <documentation>Optional parameters in the payload message for a topic identifier
                service.</documentation>
        </annotation>
        <all>
            <element name="inputFormat" type="ns:InputFormatType" minOccurs="0" maxOccurs="1"/>
            <element name="outputFormat" type="ns:OutputFormatType" minOccurs="0" maxOccurs="1"/>
        </all>
    </complexType>

    <!-- Response Params Types-->

    <complexType name="ResponseType">
        <complexContent>
            <restriction base="xsd:anyType"/>
        </complexContent>
    </complexType>

    <complexType name="SentenceSplitterResponseType">
        <complexContent>
            <extension base="ns:ResponseType">
                <sequence>
                    <element name="SentenceSplittedText" type="ns:TextType"/>
                </sequence>
            </extension>
        </complexContent>
    </complexType>

    <complexType name="TokenizerResponseType">
        <complexContent>
            <extension base="ns:ResponseType">
                <sequence>
                    <element name="TokenizedText" type="ns:TextType"/>
                </sequence>
            </extension>
        </complexContent>
    </complexType>

    <complexType name="LemmatizerResponseType">
        <complexContent>
            <extension base="ns:ResponseType">
                <sequence>
                    <element name="LemmatizedText" type="ns:TextType"/>
                </sequence>
            </extension>
        </complexContent>
    </complexType>

    <complexType name="POSTaggerResponseType">
        <complexContent>
            <extension base="ns:ResponseType">
                <sequence>
                    <element name="POSAnnotatedText" type="ns:TextType"/>
                </sequence>
            </extension>
        </complexContent>
    </complexType>

    <complexType name="ShallowParserResponseType">
        <complexContent>
            <extension base="ns:ResponseType">
                <sequence>
                    <element name="ShallowParsedText" type="ns:TextType"/>
                </sequence>
            </extension>
        </complexContent>
    </complexType>

    <complexType name="ParserResponseType">
        <complexContent>
            <extension base="ns:ResponseType">
                <sequence>
                    <element name="ShallowParsedText" type="ns:TextType"/>
                </sequence>
            </extension>
        </complexContent>
    </complexType>

    <complexType name="TextAlignerResponseType">
        <complexContent>
            <extension base="ns:ResponseType">
                <sequence>
                    <element name="AlignedText" type="ns:TextType"/>
                </sequence>
            </extension>
        </complexContent>
    </complexType>

    <complexType name="CQPIndexerResponseType">
        <complexContent>
            <extension base="ns:ResponseType">
                <sequence>
                    <element name="reference" type="ns:ReferenceType"/>
                </sequence>
            </extension>
        </complexContent>
    </complexType>

    <complexType name="CQPQuerierResponseType">
        <complexContent>
            <extension base="ns:ResponseType">
                <sequence>
                    <element name="concordances" type="ns:TextType"/>
                </sequence>
            </extension>
        </complexContent>
    </complexType>

    <complexType name="ConcordancerResponseType">
        <complexContent>
            <extension base="ns:ResponseType">
                <sequence>
                    <element name="concordances" type="ns:TextType"/>
                </sequence>
            </extension>
        </complexContent>
    </complexType>

    <complexType name="NgramsCooccurrencesResponseType">
        <complexContent>
            <extension base="ns:ResponseType">
                <sequence>
                    <element name="NgramsCoocurrences" type="ns:TextType"/>
                </sequence>
            </extension>
        </complexContent>
    </complexType>

    <complexType name="CrawlerResponseType">
        <complexContent>
            <extension base="ns:ResponseType">
                <sequence>
                    <element name="WebCorpus" type="ns:TextType"/>
                </sequence>
            </extension>
        </complexContent>
    </complexType>

    <complexType name="NERecognitionResponseType">
        <complexContent>
            <extension base="ns:ResponseType">
                <sequence>
                    <element name="NEAnnotatedText" type="ns:TextType"/>
                </sequence>
            </extension>
        </complexContent>
    </complexType>

    <complexType name="TermExtractionResponseType">
        <complexContent>
            <extension base="ns:ResponseType">
                <sequence>
                    <element name="TermAnnotatedText" type="ns:TextType"/>
                </sequence>
            </extension>
        </complexContent>
    </complexType>


    <complexType name="TopicIdentifierResponseType">
        <complexContent>
            <extension base="ns:ResponseType">
                <sequence>
                    <element name="TopicAnnotatedText" type="ns:TextType"/>
                </sequence>
            </extension>
        </complexContent>
    </complexType>

    <complexType name="DictionaryLookupResponseType">
        <complexContent>
            <extension base="ns:ResponseType">
                <sequence>
                    <element name="LexicalEntriesList" type="ns:LexicalEntriesListType"/>
                </sequence>
            </extension>
        </complexContent>
    </complexType>


    <!-- 'Terminal' Types
    Note: 'Terminal' types are ment to provide a unified labelling for all sort of parameters used in NLP services.
    Some of the following parameters are used in Main Parameters descriptions above. Others are 'ready to be used' 
    in eventual Optional Parameters descriptions. Hopefully all 'terminal parameters' should 
    point to the corresponding ISOcat Data Category  -->

    <simpleType name="lang">
        <annotation>
            <documentation>Language iso-639</documentation>
        </annotation>
        <restriction base="xsd:string">
            <pattern value="[A-Za-z][A-Za-z][A-Za-z]?"/>
        </restriction>
    </simpleType>

    <complexType name="TextType">
        <annotation>
            <documentation>Anything written. Text can be passed as a string or as a URI. Typically,
                TextType is used for input parameters such as 'text to be analyzed' and output
                parameters such as 'analyzed text'.</documentation>
        </annotation>
        <choice>
            <element name="string" type="xsd:string"/>
            <element name="file" type="xsd:anyURI"/>
        </choice>
    </complexType>

    <complexType name="CQPCorpusType">
        <annotation>
            <documentation>A CQP corpus (following the standard verticalized CWB input
                format)</documentation>
        </annotation>
        <complexContent>
            <restriction base="ns:TextType">
                <choice>
                    <element name="string" type="xsd:string"/>
                    <element name="file" type="xsd:anyURI"/>
                </choice>
            </restriction>
        </complexContent>
    </complexType>

    <simpleType name="CQPCorpusStructureType">
        <annotation>
            <documentation>The structure used to to encode the verticalized text to CWB binary
                format with the cwb-encode tool. (ex. "-P pos -P lemma -S s")</documentation>
        </annotation>
        <restriction base="xsd:string"/>
    </simpleType>

    <simpleType name="CQPQueryType">
        <annotation>
            <documentation>A CQP query.</documentation>
        </annotation>
        <restriction base="xsd:string"/>
    </simpleType>

    <simpleType name="ReferenceType">
        <annotation>
            <documentation>The reference that a WS returns which can be used in future
                events.</documentation>
        </annotation>
        <restriction base="xsd:string"/>
    </simpleType>

    <simpleType name="SearchQueryType">
        <annotation>
            <documentation>A search query.</documentation>
        </annotation>
        <restriction base="xsd:string"/>
    </simpleType>

    <simpleType name="NumberType">
        <restriction base="xsd:int"/>
    </simpleType>

    <simpleType name="WindowSizeType">
        <annotation>
            <documentation>Size of window, typically for concordancers and collocation
                analyses</documentation>
        </annotation>
        <restriction base="xsd:int"/>
    </simpleType>

    <simpleType name="FormatType">
        <annotation>
            <documentation> http://www.isocat.org/datcat/DC-2562 . The format of a given I/O
                parameter (ex: xml, html, verticalised, ...)</documentation>
        </annotation>
        <restriction base="xsd:string"/>
    </simpleType>

    <simpleType name="InputFormatType">
        <annotation>
            <documentation>The format required for a given Input parameter</documentation>
        </annotation>
        <restriction base="ns:FormatType"> </restriction>
    </simpleType>

    <simpleType name="OutputFormatType">
        <annotation>
            <documentation>The format of a given Output parameter</documentation>
        </annotation>
        <restriction base="ns:FormatType"> </restriction>
    </simpleType>

    <simpleType name="TagsetType">
        <annotation>
            <documentation> http://www.isocat.org/datcat/DC-2497: "Specifies the tag set used in the
                annotation of the resource or a used by the tool/service or it contains a URL that
                points to the information about the tag set"</documentation>
        </annotation>
        <restriction base="xsd:string"/>
    </simpleType>

    <simpleType name="ThresholdType">
        <annotation>
            <documentation>The level or point at which something would happen, would cease to
                happen, or would take effect, become true, etc.</documentation>
        </annotation>
        <restriction base="xsd:int"/>
    </simpleType>

    <complexType name="SourceTextType">
        <annotation>
            <documentation>The source text (for example in an alignment task)</documentation>
        </annotation>
        <complexContent>
            <restriction base="ns:TextType">
                <choice>
                    <element name="string" type="xsd:string"/>
                    <element name="file" type="xsd:anyURI"/>
                </choice>
            </restriction>
        </complexContent>
    </complexType>

    <complexType name="TargetTextType">
        <annotation>
            <documentation>The target text of a service that requires a source and a target input
                files (for example in an alignment task)</documentation>
        </annotation>
        <complexContent>
            <restriction base="ns:TextType">
                <choice>
                    <element name="string" type="xsd:string"/>
                    <element name="file" type="xsd:anyURI"/>
                </choice>
            </restriction>
        </complexContent>
    </complexType>

    <simpleType name="DomainType">
        <annotation>
            <documentation> http://www.isocat.org/datcat/DC-2467</documentation>
        </annotation>
        <restriction base="xsd:string"/>
    </simpleType>

    <simpleType name="TermType">
        <annotation>
            <documentation>http://www.isocat.org/datcat/DC-508: "A verbal designation of a general
                concept in a specific subject field". Typically, terms are used by web crawlers
                services as seed terms.</documentation>
        </annotation>
        <restriction base="xsd:string"/>
    </simpleType>

    <simpleType name="TermListType">
        <annotation>
            <documentation>http://www.isocat.org/datcat/DC-508: "A verbal designation of a general
                concept in a specific subject field". Typically, terms are used by web crawlers
                services as seed terms.</documentation>
        </annotation>
        <list itemType="ns:TermType"/>
    </simpleType>

    <simpleType name="UrlListType">
        <annotation>
            <documentation>URI list.</documentation>
        </annotation>
        <list itemType="anyURI"/>
    </simpleType>

    <simpleType name="NEType">
        <annotation>
            <documentation>http://www.isocat.org/datcat/DC-2275: "segment of text for which one or
                many rigid designators stands for the referent. usually named entities are located
                and classified into predefined types such as names of person, organizations,
                locations, expressions of times etc.".</documentation>
        </annotation>
        <restriction base="xsd:string"/>
    </simpleType>

    <simpleType name="NEListType">
        <annotation>
            <documentation>List of Named Entities
                (http://www.isocat.org/datcat/DC-2275).</documentation>
        </annotation>
        <list itemType="ns:NEType"/>
    </simpleType>

    <simpleType name="AssociationMeassureType">
        <annotation>
            <documentation>The measure of the link between two variables.</documentation>
        </annotation>
        <restriction base="string">
            <enumeration value="Log-Likelihood Ratio"/>
            <enumeration value="Mutual Information"/>
            <enumeration value="Poisson Stirling Measure"/>
            <enumeration value="Dice Coefficient"/>
            <enumeration value="Jaccard Coefficient"/>
            <enumeration value="Phi Coefficient"/>
            <enumeration value="Pearson's Chi Squared Test"/>
            <enumeration value="T.score"/>
        </restriction>
    </simpleType>

    <simpleType name="OrderByType">
        <annotation>
            <documentation>The sorting criteria to be used when dispalying results. (Possible more
                values should be added)</documentation>
        </annotation>
        <restriction base="string">
            <enumeration value="right"/>
            <enumeration value="left"/>
            <enumeration value="center"/>
        </restriction>
    </simpleType>

    <simpleType name="SizeType">
        <annotation>
            <documentation>http://www.isocat.org/datcat/DC-2580: "The size of the resource with
                regard to the SizeUnit measurement in form of a number."</documentation>
        </annotation>
        <restriction base="xsd:string"/>
    </simpleType>

    <simpleType name="SizeUnitType">
        <annotation>
            <documentation>http://www.isocat.org/datcat/DC-2583: "Specification of the unit of size
                that is used when specifying the size."</documentation>
        </annotation>
        <restriction base="xsd:string"/>
    </simpleType>

    <complexType name="maxSizeType">
        <annotation>
            <documentation>Maximum amount od data. It is expressed in terms of size (amount in
                numbers) and sizeUnit (unit)</documentation>
        </annotation>
        <sequence>
            <element name="size" type="ns:SizeType"/>
            <element name="sizeUnit" type="ns:SizeUnitType"/>
        </sequence>

    </complexType>

    <simpleType name="maxTimeType">
        <annotation>
            <documentation>Maximun duration.</documentation>
        </annotation>
        <restriction base="xsd:string"/>
    </simpleType>

    <simpleType name="timeOutType">
        <annotation>
            <documentation/>
        </annotation>
        <restriction base="xsd:string"/>
    </simpleType>

    <simpleType name="retriesType">
        <annotation>
            <documentation/>
        </annotation>
        <restriction base="xsd:string"/>
    </simpleType>


    <simpleType name="wordFormType">
        <annotation>
            <documentation/>
        </annotation>
        <restriction base="xsd:string"/>
    </simpleType>

    <simpleType name="lemmaType">
        <annotation>
            <documentation>http://www.isocat.org/datcat/DC-286 : The base form of a word or term
                that is used as the formal dictionary entry for the term.</documentation>
        </annotation>
        <restriction base="xsd:string"/>
    </simpleType>

    <simpleType name="PoSTagType">
        <annotation>
            <documentation> http://www.isocat.org/datcat/DC-396 A category assigned to a word based
                on its grammatical and semantic properties.</documentation>
        </annotation>
        <restriction base="xsd:string"/>
    </simpleType>

    <complexType name="LexicalEntriesListType">
        <annotation>
            <documentation/>
        </annotation>
        <sequence>
            <element name="lexicalEntry" type="ns:lexicalEntryType" maxOccurs="unbounded"/>
        </sequence>
    </complexType>

    <complexType name="lexicalEntryType">
        <annotation>
            <documentation>Expressed in terms of lemma and PoS tag</documentation>
        </annotation>
        <sequence>
            <element name="lemma" type="ns:lemmaType"/>
            <element name="PoSTag" type="ns:PoSTagType"/>
        </sequence>
    </complexType>


    <!-- Elements -->


    <element name="SentenceSplitterParams" type="ns:SentenceSplitterParamsType"/>
    <element name="TokenizerParams" type="ns:TokenizerParamsType"/>
    <element name="LemmatizerParams" type="ns:LemmatizerParamsType"/>
    <element name="POSTaggerParams" type="ns:POSTaggerParamsType"/>
    <element name="ShallowParserParams" type="ns:ShallowParserParamsType"/>
    <element name="ParserParams" type="ns:ParserParamsType"/>
    <element name="TextAlignerParams" type="ns:TextAlignerParamsType"/>
    <element name="CQPIndexerParams" type="ns:CQPIndexerParamsType"/>
    <element name="CQPQuerierParams" type="ns:CQPQuerierParamsType"/>
    <element name="ConcordancerParams" type="ns:ConcordancerParamsType"/>
    <element name="NgramsCooccurrencesParams" type="ns:NgramsCooccurrencesParamsType"/>
    <element name="CrawlerParams" type="ns:CrawlerParamsType"/>
    <element name="NERecognitionParams" type="ns:NERecognitionParamsType"/>
    <element name="TermExtractionParams" type="ns:TermExtractionParamsType"/>
    <element name="TopicIdentifierParams" type="ns:TopicIdentifierParamsType"/>
    <element name="DictionaryLookupParams" type="ns:DitionaryLookupParamsType"/>


    <element name="Response" type="ns:ResponseType"/>
    <element name="SentenceSplitterResponse" type="ns:SentenceSplitterResponseType"/>
    <element name="TokenizerResponse" type="ns:TokenizerResponseType"/>
    <element name="LemmatizerResponse" type="ns:LemmatizerResponseType"/>
    <element name="POSTaggerResponse" type="ns:POSTaggerResponseType"/>
    <element name="ShallowParserResponse" type="ns:ShallowParserResponseType"/>
    <element name="ParserResponse" type="ns:ParserResponseType"/>
    <element name="TextAlignerResponse" type="ns:TextAlignerResponseType"/>
    <element name="CQPQuerierResponse" type="ns:CQPQuerierResponseType"/>
    <element name="CQPIndexerResponse" type="ns:CQPIndexerResponseType"/>
    <element name="ConcordancerResponse" type="ns:ConcordancerResponseType"/>
    <element name="NgramsCooccurrencesResponse" type="ns:NgramsCooccurrencesResponseType"/>
    <element name="CrawlerResponse" type="ns:CrawlerResponseType"/>
    <element name="NERecognitionResponse" type="ns:NERecognitionResponseType"/>
    <element name="TermExtractionResponse" type="ns:TermExtractionResponseType"/>
    <element name="TopicIdentifierResponse" type="ns:TopicIdentifierResponseType"/>
    <element name="DictionaryLookupResponse" type="ns:DictionaryLookupResponseType"/>


</schema>

