<div dir="ltr"><div dir="ltr">Hi Andrew,</div><div dir="ltr"><br><div>thank you for your answer. I understand now better the aim and scope.</div><div><br></div><div>I've taken a look at the API lib, the PHP client, and the python one. Is there some documentation/example about the API, how to call the functions for instance? Are there some guidelines to keep consistent the clients across languages? Or the list of features to be implemented? Just to have an idea of the volume of work.</div><div><br></div><div>I find the project interesting (in fact, I was considering to write in Python a light API to interact with CQP). I'd like to contribute to the Python client and team up with whoever wants to join forces.<br></div><div><br></div><div>Cheers,<br clear="all"><div><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div dir="ltr"><div>--</div><div><div>José Manuel Martínez Martínez</div><div><a href="https://chozelinek.github.io" target="_blank">https://chozelinek.github.io</a></div></div></div></div></div></div></div></div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Jul 11, 2019 at 9:57 AM Hardie, Andrew <<a href="mailto:a.hardie@lancaster.ac.uk">a.hardie@lancaster.ac.uk</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div bgcolor="white" lang="EN-GB">
<div class="gmail-m_2059585490124219032WordSection1">
<p class="MsoNormal"><span style="font-size:10pt;font-family:Verdana,sans-serif;color:rgb(31,73,125)">Hi José,<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:10pt;font-family:Verdana,sans-serif;color:rgb(31,73,125)"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:10pt;font-family:Verdana,sans-serif;color:rgb(31,73,125)">The clients have their own tree in the repo, here:<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:10pt;font-family:Verdana,sans-serif;color:rgb(31,73,125)"><u></u> <u></u></span></p>
<p class="MsoNormal"><a href="https://sourceforge.net/p/cwb/code/HEAD/tree/gui/cqpweb-client/trunk/" target="_blank">https://sourceforge.net/p/cwb/code/HEAD/tree/gui/cqpweb-client/trunk/</a><span style="font-size:10pt;font-family:Verdana,sans-serif;color:rgb(31,73,125)"><u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:10pt;font-family:Verdana,sans-serif;color:rgb(31,73,125)"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:10pt;font-family:Verdana,sans-serif;color:rgb(31,73,125)">>></span><span style="font-size:13.5pt"> Is the idea to have a client written in Python to interact with a REST API written in PHP?</span><span style="font-size:10pt;font-family:Verdana,sans-serif;color:rgb(31,73,125)"><u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:10pt;font-family:Verdana,sans-serif;color:rgb(31,73,125)"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:10pt;font-family:Verdana,sans-serif;color:rgb(31,73,125)">Yes, except I am not sure the API will abide by the rules of REST.
<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:10pt;font-family:Verdana,sans-serif;color:rgb(31,73,125)"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:10pt;font-family:Verdana,sans-serif;color:rgb(31,73,125)">To clarify: the API is accessed via an entry point within the normal CQPweb tree, at
<a href="http://your.server.net/cqpweb/CORPUS/api.php" target="_blank">http://your.server.net/cqpweb/<i>CORPUS</i>/api.php</a> . Functions can be called, and arguments sent, using GET/POST parameters on that entry point script.<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:10pt;font-family:Verdana,sans-serif;color:rgb(31,73,125)"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:10pt;font-family:Verdana,sans-serif;color:rgb(31,73,125)">The client objects are designed to be embedded into a larger software unit in the language of the user’s choice to make accessing the API less inconvenient. <u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:10pt;font-family:Verdana,sans-serif;color:rgb(31,73,125)"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:10pt;font-family:Verdana,sans-serif;color:rgb(31,73,125)">That will allow other GUIs to be written that use CQPweb as a backend while handling user interaction in whatever way they like.
<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:10pt;font-family:Verdana,sans-serif;color:rgb(31,73,125)"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:10pt;font-family:Verdana,sans-serif;color:rgb(31,73,125)">That’s the idea anyway; the API is not yet complete. The available functions so far can be seen at
<u></u><u></u></span></p>
<p class="MsoNormal"><a href="https://sourceforge.net/p/cwb/code/HEAD/tree/gui/cqpweb/trunk/lib/api-lib.php" target="_blank">https://sourceforge.net/p/cwb/code/HEAD/tree/gui/cqpweb/trunk/lib/api-lib.php</a><span style="font-size:10pt;font-family:Verdana,sans-serif;color:rgb(31,73,125)"><u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:10pt;font-family:Verdana,sans-serif;color:rgb(31,73,125)">lines 50 thru 73.<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:10pt;font-family:Verdana,sans-serif;color:rgb(31,73,125)"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:10pt;font-family:Verdana,sans-serif;color:rgb(31,73,125)">best<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:10pt;font-family:Verdana,sans-serif;color:rgb(31,73,125)"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:10pt;font-family:Verdana,sans-serif;color:rgb(31,73,125)">Andrew.<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:10pt;font-family:Verdana,sans-serif;color:rgb(31,73,125)"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:10pt;font-family:Verdana,sans-serif;color:rgb(31,73,125)"><u></u> <u></u></span></p>
<div>
<div style="border-right:none;border-bottom:none;border-left:none;border-top:1pt solid rgb(225,225,225);padding:3pt 0cm 0cm">
<p class="MsoNormal"><b><span lang="EN-US" style="color:windowtext">From:</span></b><span lang="EN-US" style="color:windowtext"> <a href="mailto:cwb-bounces@sslmit.unibo.it" target="_blank">cwb-bounces@sslmit.unibo.it</a> <<a href="mailto:cwb-bounces@sslmit.unibo.it" target="_blank">cwb-bounces@sslmit.unibo.it</a>>
<b>On Behalf Of </b>José Manuel Martínez Martínez<br>
<b>Sent:</b> 07 July 2019 18:16<br>
<b>To:</b> <a href="mailto:cwb@sslmit.unibo.it" target="_blank">cwb@sslmit.unibo.it</a><br>
<b>Subject:</b> Re: [CWB] CQPweb: help wanted for client objects<u></u><u></u></span></p>
</div>
</div>
<p class="MsoNormal"><u></u> <u></u></p>
<p><span style="font-size:13.5pt">Hi Andrew,</span><span style="font-size:12pt"><u></u><u></u></span></p>
<p><span style="font-size:13.5pt">this sounds interesting. But I'm not sure if I understand it. Where can I find the Python client? Is the idea to have a client written in Python to interact with a REST API written in PHP?</span><u></u><u></u></p>
<p><span style="font-size:13.5pt">Cheers,</span><u></u><u></u></p>
<pre>José Manuel Martínez Martínez<u></u><u></u></pre>
<pre><a href="https://chozelinek.github.io" target="_blank">https://chozelinek.github.io</a><u></u><u></u></pre>
<div>
<p class="MsoNormal">On 04.07.19 05:49, Hardie, Andrew wrote:<u></u><u></u></p>
</div>
<blockquote style="margin-top:5pt;margin-bottom:5pt">
<p class="MsoNormal"><span style="font-size:10pt;font-family:Verdana,sans-serif">Hi all,</span><u></u><u></u></p>
<p class="MsoNormal"><span style="font-size:10pt;font-family:Verdana,sans-serif"> </span><u></u><u></u></p>
<p class="MsoNormal"><span style="font-size:10pt;font-family:Verdana,sans-serif">If you happen to be subscribed to the checkin feed for the SVN repo on sourceforge you may have noticed that I have created a number of “CQPwebClient” class definitions for
different programming languages.</span><u></u><u></u></p>
<p class="MsoNormal"><span style="font-size:10pt;font-family:Verdana,sans-serif"> </span><u></u><u></u></p>
<p class="MsoNormal"><span style="font-size:10pt;font-family:Verdana,sans-serif">The idea of these is to ease use of the client API – raw API involves a lot of juggling about with GET and POST parameters. The only serious API function that is “working”
theoretically at the moment is access to frequency lists. (“theoretically” because I am sure there are bugs.)</span><u></u><u></u></p>
<p class="MsoNormal"><span style="font-size:10pt;font-family:Verdana,sans-serif"> </span><u></u><u></u></p>
<p class="MsoNormal"><span style="font-size:10pt;font-family:Verdana,sans-serif">I am trying to make each client follow the same object model within the constraints of each language’s structure. The “odd one out” is the JavaScript, which is designed for
asynchronous programming (As in a browser), unlike the others. </span><u></u><u></u></p>
<p class="MsoNormal"><span style="font-size:10pt;font-family:Verdana,sans-serif"> </span><u></u><u></u></p>
<p class="MsoNormal"><span style="font-size:10pt;font-family:Verdana,sans-serif">The two most complete are the JavaScript and PHP, followed by the C, the Python and the Perl. The idea is that, as far as possible, the same properties and methods should be
exposed by each object model – so the sequence of calls to the client (and the parameters which need to be specified) to accomplish some task X will be the same regardless of the language.
</span><u></u><u></u></p>
<p class="MsoNormal"><span style="font-size:10pt;font-family:Verdana,sans-serif"> </span><u></u><u></u></p>
<p class="MsoNormal"><span style="font-size:10pt;font-family:Verdana,sans-serif">I intend to continue to work on the JS and PHP clients myself as they are my languages of choice. (Well, actually, C is my language of choice, thus why there is a client object
for C, but really it is a proof of concept rather than something I have a strong expectation of people wanting to make use of). Plus they exemplify the asynchronous/synchronous usage generally. However, for the others, having put down the rough outlines I
would very much like to hand off maintenance to people who actually know what they are doing in the respective languages.</span><u></u><u></u></p>
<p class="MsoNormal"><span style="font-size:10pt;font-family:Verdana,sans-serif"> </span><u></u><u></u></p>
<p class="MsoNormal"><b><span style="font-size:10pt;font-family:Verdana,sans-serif">TLDR</span></b><span style="font-size:10pt;font-family:Verdana,sans-serif">:
</span><b><span style="font-size:10pt;font-family:Verdana,sans-serif;color:red">I would be most grateful to anyone willing to volunteer to take on primary responsibility for one of the clients
</span></b><span style="font-size:10pt;font-family:Verdana,sans-serif">other than the JS and PHP versions – especially the Python, R or Perl. (BTW – the R client is just an empty file; I have no intention of actually writing it because R’s object system
gives me the heebie-jeebies.)</span><u></u><u></u></p>
<p class="MsoNormal"><span style="font-size:10pt;font-family:Verdana,sans-serif"> </span><u></u><u></u></p>
<p class="MsoNormal"><span style="font-size:10pt;font-family:Verdana,sans-serif">Or if anyone would like to contribute a client object in one of the (many) languages that I’m too scared even to touch (e.g. Java, C#, Ruby, Go, Lisp, shell, Groovy, Lua, MATLAB,
BASIC, INTERCAL…) then that would also be fabulous.</span><u></u><u></u></p>
<p class="MsoNormal"><span style="font-size:10pt;font-family:Verdana,sans-serif"> </span><u></u><u></u></p>
<p class="MsoNormal"><span style="font-size:10pt;font-family:Verdana,sans-serif">Anyone who is interested – just drop a note to the list. The only requirement is that you must be happy for your contributions to be released open source (with an MIT style
licence). </span><u></u><u></u></p>
<p class="MsoNormal"><span style="font-size:10pt;font-family:Verdana,sans-serif"> </span><u></u><u></u></p>
<p class="MsoNormal"><span style="font-size:10pt;font-family:Verdana,sans-serif">Thanks in advance!</span><u></u><u></u></p>
<p class="MsoNormal"><span style="font-size:10pt;font-family:Verdana,sans-serif"> </span><u></u><u></u></p>
<p class="MsoNormal"><span style="font-size:10pt;font-family:Verdana,sans-serif">best</span><u></u><u></u></p>
<p class="MsoNormal"><span style="font-size:10pt;font-family:Verdana,sans-serif"> </span><u></u><u></u></p>
<p class="MsoNormal"><span style="font-size:10pt;font-family:Verdana,sans-serif">Andrew.</span><u></u><u></u></p>
<p class="MsoNormal"><span style="font-size:10pt;font-family:Verdana,sans-serif"> </span><u></u><u></u></p>
<p class="MsoNormal"><span style="font-size:12pt;font-family:"Times New Roman",serif"><br>
<br>
<u></u><u></u></span></p>
<pre>_______________________________________________<u></u><u></u></pre>
<pre>CWB mailing list<u></u><u></u></pre>
<pre><a href="mailto:CWB@sslmit.unibo.it" target="_blank">CWB@sslmit.unibo.it</a><u></u><u></u></pre>
<pre><a href="http://liste.sslmit.unibo.it/mailman/listinfo/cwb" target="_blank">http://liste.sslmit.unibo.it/mailman/listinfo/cwb</a><u></u><u></u></pre>
</blockquote>
</div>
</div>
_______________________________________________<br>
CWB mailing list<br>
<a href="mailto:CWB@sslmit.unibo.it" target="_blank">CWB@sslmit.unibo.it</a><br>
<a href="http://liste.sslmit.unibo.it/mailman/listinfo/cwb" rel="noreferrer" target="_blank">http://liste.sslmit.unibo.it/mailman/listinfo/cwb</a><br>
</blockquote></div></div>