[CWB] API access for CQPWeb

Kurt Sultana kurtanatlus at gmail.com
Thu Jan 24 22:27:05 CET 2013


Thanks for the insight Andrew. Much appreciated.


On Wed, Jan 23, 2013 at 12:31 AM, Hardie, Andrew
<a.hardie at lancaster.ac.uk>wrote:

>  Everything needs to be done by qname since everything in CQPweb operates
> around the notion of the query as the primary object.****
>
> ** **
>
> So, the API is intended to work as follows: first you call the query
> function, which returns a qname; then you call the collocation function
> with that qname as an argument.****
>
> ** **
>
> Internally, what happens when you request collocations is that CQP’s *
> tabulate* function spits out a tabulation of nearby words based on the
> cached query; this tabulation is imported into a MySQL table. Then, the
> actual statistical calculation is done as an SQL query on that table. Such
> tables (“databases” as they are called in the code) are also cached and
> tracked.****
>
> ** **
>
> Andrew.****
>
> ** **
>
> ** **
>
> *From:* cwb-bounces at sslmit.unibo.it [mailto:cwb-bounces at sslmit.unibo.it] *On
> Behalf Of *Kurt Sultana
> *Sent:* 22 January 2013 23:24
>
> *To:* Open source development of the Corpus WorkBench
> *Subject:* Re: [CWB] API access for CQPWeb****
>
>  ** **
>
> Thanks Andrew. ****
>
> ** **
>
> Up to now, I've done a small test and managed to output concordances as
> XML instead of HTML. ****
>
> ** **
>
> I'll then see for collocations. I'm noticing that there is a qname as a
> POST parameter which refers to a query cache file. It seems that
> collocations are computed using these files (coming from concordances?). Is
> this so?  Ideally, I'd pass the word I'd like to find collocations for,
> instead of the qname.****
>
> ** **
>
> Thanks in advance,****
>
> Kurt****
>
> ** **
>
> On Tue, Jan 22, 2013 at 10:42 PM, Hardie, Andrew <a.hardie at lancaster.ac.uk>
> wrote:****
>
> This has been on the menu for a very long time. The basic plan was to
> allow all the main scripts to operate in two “modes”, the primary mode that
> sends out HTML-formatted pages, and a secondary mode that returned the data
> in a form more amenable to programmatic manipulation (probably plaintext
> for compactness though I understand either XML or JSON would be trendier
> choices!). ****
>
>  ****
>
> Then, a single management-script would cope with calling the scripts in
> their secondary mode. Function calls would be made over HTTP GET in the
> form api.php?function=XXXX ; and I was planning ultimately to write an
> object model - exemplified in a JavaScript library - for the clientside.**
> **
>
>  ****
>
> But a lot of refactoring of the existing main scripts will be needed to
> allow this to work, as execution and HTML rendering are currently tied
> together quite closely and they will need to be disentangled.****
>
>  ****
>
> (The management script is *lib/api.inc.php*. As you can see I did not get
> very far with it, only outlining what the initial group of functions would
> be.)****
>
>  ****
>
> If you want to have a go at helping out, be my guest...****
>
>  ****
>
> best****
>
>  ****
>
> Andrew.****
>
>  ****
>
> *From:* cwb-bounces at sslmit.unibo.it [mailto:cwb-bounces at sslmit.unibo.it] *On
> Behalf Of *Kurt Sultana
> *Sent:* 22 January 2013 18:10
> *To:* Open source development of the Corpus WorkBench
> *Subject:* [CWB] API access for CQPWeb****
>
>  ****
>
> Hi all, ****
>
>  ****
>
> I really would like to be able to access CQPWeb via some sort of an API
> especially the collocation functionality. Somewhere I've read that this is
> currently under development. Is this so? ****
>
>  ****
>
> If so, to what extent could I "develop" this? I have working knowledge of
> PHP. ****
>
>  ****
>
> Thanks in advance,****
>
> Kurt****
>
>
> _______________________________________________
> CWB mailing list
> CWB at sslmit.unibo.it
> http://devel.sslmit.unibo.it/mailman/listinfo/cwb****
>
> ** **
>
> _______________________________________________
> CWB mailing list
> CWB at sslmit.unibo.it
> http://devel.sslmit.unibo.it/mailman/listinfo/cwb
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://devel.sslmit.unibo.it/pipermail/cwb/attachments/20130124/bd638234/attachment.html>


More information about the CWB mailing list