<div dir="ltr"><div class="gmail_quote"><div>Thanks! I paste below the current output of the server (in case it changes for people reading this thread later):</div><div><br></div><div><div>{&quot;top&quot;: &quot;h1&quot;,</div><div>    &quot;index&quot;: &quot;e3&quot;,</div><div>    &quot;relations&quot;:</div><div>    [{&quot;label&quot;: &quot;h4&quot;, &quot;predicate&quot;: &quot;proper_q&quot;, &quot;lnk&quot;: {&quot;from&quot;: 0, &quot;to&quot;: 6}, &quot;roles&quot;:</div><div>      {&quot;ARG0&quot;: &quot;x6&quot;, &quot;RSTR&quot;: &quot;h5&quot;, &quot;BODY&quot;: &quot;h7&quot;}},</div><div>     {&quot;label&quot;: &quot;h8&quot;, &quot;predicate&quot;: &quot;named&quot;, &quot;lnk&quot;: {&quot;from&quot;: 0, &quot;to&quot;: 6}, &quot;roles&quot;:</div><div>      {&quot;ARG0&quot;: &quot;x6&quot;, &quot;CARG&quot;: &quot;Abrams&quot;}},</div><div>     {&quot;label&quot;: &quot;h2&quot;, &quot;predicate&quot;: &quot;_arrive_v_1&quot;, &quot;lnk&quot;: {&quot;from&quot;: 7, &quot;to&quot;: 14}, &quot;roles&quot;:</div><div>      {&quot;ARG0&quot;: &quot;e3&quot;, &quot;ARG1&quot;: &quot;x6&quot;}}],</div><div>    &quot;constraints&quot;:</div><div>    [{&quot;relation&quot;: &quot;qeq&quot;, &quot;high&quot;: &quot;h1&quot;, &quot;low&quot;: &quot;h2&quot;},</div><div>     {&quot;relation&quot;: &quot;qeq&quot;, &quot;high&quot;: &quot;h5&quot;, &quot;low&quot;: &quot;h8&quot;}],</div><div>    &quot;variables&quot;:</div><div>    {&quot;h2&quot;: {}, &quot;h8&quot;: {}, &quot;h7&quot;: {}, &quot;h5&quot;: {},</div><div>     &quot;x6&quot;: {&quot;type&quot;: &quot;x&quot;, &quot;PERS&quot;: &quot;3&quot;, &quot;NUM&quot;: &quot;sg&quot;, &quot;IND&quot;: &quot;+&quot;}, &quot;h4&quot;: {},</div><div>     &quot;e3&quot;: {&quot;type&quot;: &quot;e&quot;, &quot;SF&quot;: &quot;prop&quot;, &quot;TENSE&quot;: &quot;past&quot;, &quot;MOOD&quot;: &quot;indicative&quot;, &quot;PROG&quot;: &quot;-&quot;, &quot;PERF&quot;: &quot;-&quot;},</div><div>     &quot;h1&quot;: {}}}}]}</div></div><div><br></div><div>On Sun, Apr 3, 2016 at 3:49 PM Stephan Oepen &lt;<a href="mailto:oe@ifi.uio.no">oe@ifi.uio.no</a>&gt; wrote:</div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">
thanks for your thought regarding object references and the suggestion of separating the full object representation of variables from their occurrences throughout the MRS.  i adapted your proposal (and like this version much better), though ended up with a full ‘variables’ property, containing one entry for all MRS variable (including handles).  for one, even though arguably redundant, i like making the variable type explicit (rather than carving into stone our assumptions about variable naming conventions);</div></blockquote><div><br></div><div>A more generic &quot;variables&quot; object seems like a good idea. Just a small thing: mixing variable properties and other data (&quot;type&quot;) has the possibility for collisions (i.e. a variable property named &quot;type&quot;). We could either put the variable properties in a sub-object, or say something like &quot;variable property keys are always uppercase, other keys are lower or mixed case&quot;.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"> but more importantly, this way the distinction between variable vs. constant values is explicit in the MRS, i.e. one need not specify the inventory of constant-valued roles (e.g. CARG in the ERG) to programmatically tell the difference between, say, &quot;Abrams&quot; and &quot;h42&quot;.<br></div></blockquote><div><br></div><div>Do you mean that the absence of an argument value in the &quot;variables&quot; object indicates it&#39;s a constant value? That seems handy. I&#39;m definitely in favor of reducing reliance on grammar-specific configuration files.</div><div><br class="Apple-interchange-newline">Also, I notice that &quot;hcons&quot; became &quot;constraints&quot; in the latest version, which means that ICONS go in the same list as HCONS (which is not necessarily problematic)?<br></div><div>  </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">
&gt; What I was withholding was that I tried requesting XML<br>
&gt; and got JSON instead of an error 406:<br></div></blockquote><div><br></div><div><div>(I also withheld the comment because the server is still a WIP and I didn&#39;t expect such well-roundedness at this early a stage :) )</div></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"></div><div dir="ltr">
true, i am not currently interpreting incoming HTTP headers, hence arguably ended up overly robust to the above request :-).  if i understand you correctly, you would vote for an HTTP error code in the above scenario?</div></blockquote><div><br></div><div>Yes. It is a request that the server isn&#39;t configured to handle, so returning an error code is a good way of telling the browser that the request failed. It helps the browser know how to cache the requests.<br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">  for actual errors during parsing, i have in principle opted for option 4 from the o&#39;reilly post you pointed to (which is their recommendation for anything but genuine HTTP errors), though i have yet to provide distinct error codes and human-readable error messages (at present, i merely return {\&quot;readings\&quot;: -1}, as is the [incr tsdb()] convention).<br></div></blockquote><div><br></div><div>For a significant error, like the parser segfaulting, then maybe a server error (5xx) is appropriate. For something expected (like running out of max memory for a long sentence), it should be fine to indicate a successful transaction (a 2xx status) but have a user-readable error message in the response.</div><div> <br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">
—as regards interfacing through pyDelphin, for example, i have started to play with a simple batch parsing client (attached below), but feel i am running up against my pythonic inexperience already.  for example, i have a hard time deciding which python version one should support: seeing as we need to be able to include non-ascii characters in the URL submitted for parsing, the urllib implementation in 2.7 is known to be inadequate.  how would you approach this task?</div></blockquote><div><br></div><div>Hmm, I actually don&#39;t have much experience *sending* requests from Python, just *handling* them (for which I recommend Bottle: <a href="http://bottlepy.org">http://bottlepy.org</a>). But the Requests package (<a href="http://requests.rtfd.org">http://requests.rtfd.org</a>) seems well-liked. It&#39;s not in Python&#39;s standard library, but the documentation for urllib even suggests it. Regarding Python versions, I&#39;d try to first support versions 3.3+, then 2.7 if it&#39;s not too much work.</div><div><br></div></div></div>