<div><div><div dir="auto">Hi José,</div></div><div dir="auto"><br></div><div dir="auto">Thanks for getting back to me. This was an extremely helpful comment. I had noticed previously that I was able to access dump results from python, but I didn&#39;t realize why. I ended up doing a very similar thing that the dump command does in my own CQP function and it&#39;s working perfectly!! Thank you!</div></div><div dir="auto"><div><img src="cid:17112f415b486c5ef401" style="max-width: 100%;"></div>Also here&#39;s a screenshot of my code for reference if anyone wants to do this in the future. First, execute a query where formatted_query is something like &#39;query = &#39;this&#39; &#39;is&#39; [pos = &#39;dt&#39;] &#39;query&#39;</div><div dir="auto"><br></div><div dir="auto">Then execute a command where you cat that query. Then read stringio to dataframe and return the DF to use how you want!</div><div dir="auto"><br></div><div dir="auto">Thanks again!</div><div dir="auto"><br></div><div dir="auto">Andrew</div><div dir="auto"><br></div><div><div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Mar 25, 2020 at 11:24 AM José Manuel Martínez Martínez &lt;<a href="mailto:chozelinek@gmail.com" target="_blank">chozelinek@gmail.com</a>&gt; wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi Andrew,<br>I was playing also with the package you are using (<a href="https://github.com/ausgerechnet/cwb-ccc" target="_blank">cwb-ccc</a> pretty awesome work by Philipp) to run the commands. Checking the class <a href="https://github.com/ausgerechnet/cwb-ccc/blob/9809dc16c8aaae924b5dcdcee1e5035465a82994/ccc/cwb.py#L22" target="_blank">Corpus</a>, there&#39;s a method <a href="https://github.com/ausgerechnet/cwb-ccc/blob/9809dc16c8aaae924b5dcdcee1e5035465a82994/ccc/cwb.py#L505" target="_blank">query</a>  which uses the method <a href="https://github.com/ausgerechnet/cwb-ccc/blob/9809dc16c8aaae924b5dcdcee1e5035465a82994/ccc/cwb.py#L217" target="_blank">df_node_from_query</a> and there in line 253  you will see the <a href="https://github.com/ausgerechnet/cwb-ccc/blob/9809dc16c8aaae924b5dcdcee1e5035465a82994/ccc/cwb.py#L253" target="_blank">call</a> to the <a href="https://github.com/ausgerechnet/cwb-ccc/blob/9809dc16c8aaae924b5dcdcee1e5035465a82994/ccc/cqp_interface.py#L224" target="_blank">Dump</a> method of the API, check <a href="https://github.com/ausgerechnet/cwb-ccc/blob/9809dc16c8aaae924b5dcdcee1e5035465a82994/ccc/cqp_interface.py#L257" target="_blank">line 257</a> you can see how the results become a dataframe object in memory instead to serializing to disk.<br>Cheers,<br>--<br>José Manuel Martínez Martínez<br><a href="https://chozelinek.github.io" target="_blank">https://chozelinek.github.io</a></div><br clear="all"><div><div dir="ltr"><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><br><div class="gmail_quote"></div><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Mar 25, 2020 at 3:22 PM Andrew Nelson &lt;<a href="mailto:an.linguist@gmail.com" target="_blank">an.linguist@gmail.com</a>&gt; wrote:<br></div></div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"></blockquote></div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">Hello,<div><br></div><div>The tool I&#39;m building has several features and I&#39;m writing everything in python. When I was writing the initial program I couldn&#39;t figure out how to feed the CQP results to a dataframe, so to just get it working I wrote it to a file, then read the data from the file to a dataframe to send the DF to html. I&#39;m using a cqp_interface.py wrapper to run the CQP commands (<a href="https://github.com/ausgerechnet/cwb-ccc/blob/master/ccc/cqp_interface.py" target="_blank">found here</a>). Can anyone here help explain how I should go about passing the results from cqp to python so I don&#39;t have to do this extra step of saving to a file? My largest corpus is over 800 million tokens, so saving and loading results just slows things down more.<br></div><div><br></div><div>Thanks for any help!</div><div><br></div><div>Best regards,</div><div><br></div><div>Andrew</div></div></blockquote></div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
_______________________________________________<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>
_______________________________________________<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>
</div>