[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Freecats-Dev] Is there any Software Architect aboard?
From: |
Dan Urist |
Subject: |
Re: [Freecats-Dev] Is there any Software Architect aboard? |
Date: |
Mon, 20 Oct 2003 23:03:05 -0600 |
User-agent: |
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.5) Gecko/20031007 |
Henri Chorand wrote:
In order to achieve convergence quickly, I hope you can publish your API,
and I'll be glad to see (for my own's sake) if it's close to my proposal. I
would not mind replacing my suggestions with something coming from a real
piece of code.
I'm attaching the WSDL files for my server; if anyone wants to write a
server with the same interface, be my guest. I've randomly chosen to run
the server on port 5280, since it's not in use on my development box.
I've also broken out the services into separate TranslationMemory,
TranslationGlossary and MachineTranslation pieces, even though they're
served by the same server; that way they don't have to be.
Here's a brief description of the API functions, all strings are utf-8
encoded:
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
TranslationMemory # Implements translation memory
=================
>> getSegmentMatches() <<
Arguments:
^^^^^^^^^^
user # Username of user accessing database; I don't do
# anything with this yet but it's there for eventual
# access control
project # Only return segments that belong to this project, or
# use "_ALL_" for any project. This *WILL
CHANGE* in # future to an array to allow a list of projects
filename # Same deal as project; my client just sends "_ALL_"
segtype # "sentence" or "paragraph"
nummatches # max number of matches to return
sourcelocale # of form "en_US" (case irrelevant)
strictsource # Boolean; if true only return segments that match this
# exact locale; if false match just language part e.g. # "en"
targetlocale # Same deal as source
stricttarget
sourcetext # Text to match against
Returns:
^^^^^^^^
An array; each element is of the form:
user
project
filename
segtype
segnum
sourcelocale
targetlocale
sourcetext
translationtext
>> putSegment() <<
Arguments:
^^^^^^^^^^
user
project
filename
segtype
segnum
sourcelocale
targetlocale
sourcetext
translationtext
Returns:
^^^^^^^^
1 # this shouldn't be necessary, but the OOo wsdk wasn't happy #
without it
Also planned but not yet implemented are functions to get and put TMX.
This isn't hard, at least for TMX level 1, but I haven't had time.
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
TranslationGlossary # Implements a simple glossary
===================
>> getGlossaryMatches() <<
Arguments:
^^^^^^^^^^
user
project
filename
sourcelocale
strictsource
targetlocale
stricttarget
sourcetext
Returns:
^^^^^^^^
An array; each element is of the form:
term
definition
>> putGlossaryTerm() <<
Arguments:
^^^^^^^^^^
user
project
filename
sourcelocale
targetlocale
term
definition
Returns:
^^^^^^^^
1
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
MachineTranslation # A wrapper for machine translation services
================== # Currently my server does babelfish and google
>> getSupportedMT() << # get supported MT engines for a language pair
Arguments:
^^^^^^^^^^
srclang # These can be either 2-letter lang or locale strings
targetlang
Returns:
^^^^^^^^
An array; each element is a string; e.g. "Babelfish", "Google"
>> getTranslation() <<
Arguments:
^^^^^^^^^^
tmengine # as returned from getSupportedMT()
srclang
targetlang
source # text to be MT'd
Returns:
^^^^^^^^
translation
--
Daniel J. Urist
address@hidden
<?xml version="1.0"?>
<definitions name="MachineTranslation"
targetNamespace="urn:MachineTranslation"
xmlns:typens="urn:MachineTranslation"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
xmlns="http://schemas.xmlsoap.org/wsdl/">
<!-- Types -->
<types>
<xsd:schema xmlns="http://www.w3.org/2001/XMLSchema"
targetNamespace="urn:MachineTranslation">
<xsd:complexType name="getSupportedMTResult">
<xsd:complexContent>
<xsd:restriction base="soapenc:Array">
<!-- <xsd:attribute ref="soapenc:arrayType"
wsdl:arrayType="typens:MTengine[]"/> -->
<xsd:attribute ref="soapenc:arrayType"
wsdl:arrayType="xsd:string[]"/>
</xsd:restriction>
</xsd:complexContent>
</xsd:complexType>
</xsd:schema>
</types>
<!-- Messages -->
<message name="getSupportedMTRequest">
<part name="srclang" type="xsd:string"/>
<part name="targetlang" type="xsd:string"/>
</message>
<message name="getSupportedMTResponse">
<part name="resultarray" type="typens:getSupportedMTResult"/>
</message>
<message name="getTranslationRequest">
<part name="tmengine" type="xsd:string"/>
<part name="srclang" type="xsd:string"/>
<part name="targetlang" type="xsd:string"/>
<part name="source" type="xsd:string"/>
</message>
<message name="getTranslationResponse">
<part name="translation" type="xsd:string"/>
</message>
<!-- Port -->
<portType name="MachineTranslationPort">
<operation name="getSupportedMT">
<input message="typens:getSupportedMTRequest"/>
<output message="typens:getSupportedMTResponse"/>
</operation>
<operation name="getTranslation">
<input message="typens:getTranslationRequest"/>
<output message="typens:getTranslationResponse"/>
</operation>
</portType>
<!-- Binding -->
<binding name="MachineTranslationBinding"
type="typens:MachineTranslationPort">
<soap:binding style="rpc"
transport="http://schemas.xmlsoap.org/soap/http"/>
<operation name="getSupportedMT">
<soap:operation soapAction=""/>
<input>
<soap:body use="encoded"
namespace="urn:MachineTranslation"
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
</input>
<output>
<soap:body use="encoded"
namespace="urn:MachineTranslation"
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
</output>
</operation>
<operation name="getTranslation">
<soap:operation soapAction=""/>
<input>
<soap:body use="encoded"
namespace="urn:MachineTranslation"
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
</input>
<output>
<soap:body use="encoded"
namespace="urn:MachineTranslation"
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
</output>
</operation>
</binding>
<!-- Endpoint -->
<service name="MachineTranslationService">
<port name="MachineTranslationPort"
binding="typens:MachineTranslationBinding">
<soap:address location="http://localhost:5280/MachineTranslation"/>
</port>
</service>
</definitions>
<?xml version="1.0"?>
<definitions name="TranslationGlossary"
targetNamespace="urn:TranslationGlossary"
xmlns:typens="urn:TranslationGlossary"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
xmlns="http://schemas.xmlsoap.org/wsdl/">
<!-- Types -->
<types>
<xsd:schema xmlns="http://www.w3.org/2001/XMLSchema"
targetNamespace="urn:TranslationGlossary">
<xsd:complexType name="getGlossaryMatchesResult">
<xsd:complexContent>
<xsd:restriction base="soapenc:Array">
<xsd:attribute ref="soapenc:arrayType"
wsdl:arrayType="typens:TranslationGlossaryMatch[]"/>
</xsd:restriction>
</xsd:complexContent>
</xsd:complexType>
<xsd:complexType name="TranslationGlossaryMatch">
<xsd:all>
<xsd:element name="term" type="xsd:string"/>
<xsd:element name="definition" type="xsd:string"/>
</xsd:all>
</xsd:complexType>
</xsd:schema>
</types>
<!-- Messages -->
<message name="getGlossaryMatchesRequest">
<part name="user" type="xsd:string"/>
<part name="project" type="xsd:string"/>
<part name="filename" type="xsd:string"/>
<part name="sourcelocale" type="xsd:string"/>
<part name="strictsource" type="xsd:boolean"/>
<part name="targetlocale" type="xsd:string"/>
<part name="stricttarget" type="xsd:boolean"/>
<part name="sourcetext" type="xsd:string"/>
</message>
<message name="getGlossaryMatchesResponse">
<part name="resultarray" type="typens:getGlossaryMatchesResult"/>
</message>
<message name="putGlossaryTermRequest">
<part name="user" type="xsd:string"/>
<part name="project" type="xsd:string"/>
<part name="filename" type="xsd:string"/>
<part name="sourcelocale" type="xsd:string"/>
<part name="targetlocale" type="xsd:string"/>
<part name="term" type="xsd:string"/>
<part name="definition" type="xsd:string"/>
</message>
<message name="putGlossaryTermResponse">
<part name="bogus" type="xsd:int"/>
</message>
<!-- Port -->
<portType name="TranslationGlossaryPort">
<operation name="getGlossaryMatches">
<input message="typens:getGlossaryMatchesRequest"/>
<output message="typens:getGlossaryMatchesResponse"/>
</operation>
<operation name="putGlossaryTerm"> <!-- This should be
a one-way, but either SOAP::Lite is screwing up or OO is -->
<input message="typens:putGlossaryTermRequest"/>
<output message="typens:putGlossaryTermResponse"/>
</operation>
</portType>
<!-- Binding -->
<binding name="TranslationGlossaryBinding"
type="typens:TranslationGlossaryPort">
<soap:binding style="rpc"
transport="http://schemas.xmlsoap.org/soap/http"/>
<operation name="getGlossaryMatches">
<soap:operation soapAction=""/>
<input>
<soap:body use="encoded"
namespace="urn:TranslationGlossary"
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
</input>
<output>
<soap:body use="encoded"
namespace="urn:TranslationGlossary"
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
</output>
</operation>
<operation name="putGlossaryTerm">
<soap:operation soapAction=""/>
<input>
<soap:body use="encoded"
namespace="urn:TranslationGlossary"
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
</input>
<output>
<soap:body use="encoded"
namespace="urn:TranslationGlossary"
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
</output>
</operation>
</binding>
<!-- Endpoint -->
<service name="TranslationGlossaryService">
<port name="TranslationGlossaryPort"
binding="typens:TranslationGlossaryBinding">
<soap:address location="http://localhost:5280/TranslationGlossary"/>
</port>
</service>
</definitions>
<?xml version="1.0"?>
<definitions name="TranslationMemory"
targetNamespace="urn:TranslationMemory"
xmlns:typens="urn:TranslationMemory"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
xmlns="http://schemas.xmlsoap.org/wsdl/">
<!-- Types -->
<types>
<xsd:schema xmlns="http://www.w3.org/2001/XMLSchema"
targetNamespace="urn:TranslationMemory">
<xsd:complexType name="getSegmentMatchesResult">
<xsd:complexContent>
<xsd:restriction base="soapenc:Array">
<xsd:attribute ref="soapenc:arrayType"
wsdl:arrayType="typens:TranslationMemorySegment[]"/>
</xsd:restriction>
</xsd:complexContent>
</xsd:complexType>
<xsd:complexType name="TranslationMemorySegment">
<xsd:all>
<xsd:element name="user" type="xsd:string"/>
<xsd:element name="project" type="xsd:string"/>
<xsd:element name="filename" type="xsd:string"/>
<xsd:element name="segtype" type="xsd:string"/>
<xsd:element name="segnum" type="xsd:int"/>
<xsd:element name="sourcelocale" type="xsd:string"/>
<xsd:element name="targetlocale" type="xsd:string"/>
<xsd:element name="sourcetext" type="xsd:string"/>
<xsd:element name="translationtext" type="xsd:string"/>
</xsd:all>
</xsd:complexType>
</xsd:schema>
</types>
<!-- Messages -->
<message name="getSegmentMatchesRequest">
<part name="user" type="xsd:string"/>
<part name="project" type="xsd:string"/>
<part name="filename" type="xsd:string"/>
<part name="segtype" type="xsd:string"/>
<part name="nummatches" type="xsd:int"/>
<part name="sourcelocale" type="xsd:string"/>
<part name="strictsource" type="xsd:boolean"/>
<part name="targetlocale" type="xsd:string"/>
<part name="stricttarget" type="xsd:boolean"/>
<part name="sourcetext" type="xsd:string"/>
</message>
<message name="getSegmentMatchesResponse">
<part name="resultarray" type="typens:getSegmentMatchesResult"/>
</message>
<message name="putSegmentRequest">
<part name="user" type="xsd:string"/>
<part name="project" type="xsd:string"/>
<part name="filename" type="xsd:string"/>
<part name="segtype" type="xsd:string"/>
<part name="segnum" type="xsd:int"/>
<part name="sourcelocale" type="xsd:string"/>
<part name="targetlocale" type="xsd:string"/>
<part name="sourcetext" type="xsd:string"/>
<part name="translationtext" type="xsd:string"/>
</message>
<message name="putSegmentResponse">
<part name="bogus" type="xsd:int"/>
</message>
<!-- Port -->
<portType name="TranslationMemoryPort">
<operation name="getSegmentMatches">
<input message="typens:getSegmentMatchesRequest"/>
<output message="typens:getSegmentMatchesResponse"/>
</operation>
<operation name="putSegment"> <!-- This should be a
one-way, but either SOAP::Lite is screwing up or OO is -->
<input message="typens:putSegmentRequest"/>
<output message="typens:putSegmentResponse"/>
</operation>
</portType>
<!-- Binding -->
<binding name="TranslationMemoryBinding" type="typens:TranslationMemoryPort">
<soap:binding style="rpc"
transport="http://schemas.xmlsoap.org/soap/http"/>
<operation name="getSegmentMatches">
<soap:operation soapAction=""/>
<input>
<soap:body use="encoded"
namespace="urn:TranslationMemory"
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
</input>
<output>
<soap:body use="encoded"
namespace="urn:TranslationMemory"
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
</output>
</operation>
<operation name="putSegment">
<soap:operation soapAction=""/>
<input>
<soap:body use="encoded"
namespace="urn:TranslationMemory"
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
</input>
<output>
<soap:body use="encoded"
namespace="urn:TranslationMemory"
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
</output>
</operation>
</binding>
<!-- Endpoint -->
<service name="TranslationMemoryService">
<port name="TranslationMemoryPort"
binding="typens:TranslationMemoryBinding">
<soap:address location="http://localhost:5280/TranslationMemory"/>
</port>
</service>
</definitions>
- [Freecats-Dev] Perl, Python, Ruby..., Henri Chorand, 2003/10/20
- Re: [Freecats-Dev] Perl, Python, Ruby..., Yves Champollion, 2003/10/20
- [Freecats-Dev] Is there any Software Architect aboard?, Henri Chorand, 2003/10/20
- Re: [Freecats-Dev] Is there any Software Architect aboard?, Dan Urist, 2003/10/20
- Re: [Freecats-Dev] Is there any Software Architect aboard?, Henri Chorand, 2003/10/20
- Re: [Freecats-Dev] Is there any Software Architect aboard?,
Dan Urist <=
- Re: [Freecats-Dev] Is there any Software Architect aboard?, Stanislav Visnovsky, 2003/10/21
- Re: [Freecats-Dev] Is there any Software Architect aboard?, Dan Urist, 2003/10/21
- [Freecats-Dev] Dan's API - first remarks, Henri Chorand, 2003/10/22
- Re: [Freecats-Dev] Dan's API - first remarks, Michael Roberts, 2003/10/22
- Re: [Freecats-Dev] Dan's API - SOAP, Henri Chorand, 2003/10/22
- Re: [Freecats-Dev] Dan's API - SOAP, Michael Roberts, 2003/10/22
- Re: [Freecats-Dev] Dan's API - SOAP, Dan Urist, 2003/10/23