<div dir="ltr">Hi Andrew,<br>I was playing also with the package you are using (<a href="https://github.com/ausgerechnet/cwb-ccc">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">Corpus</a>, there's a method <a href="https://github.com/ausgerechnet/cwb-ccc/blob/9809dc16c8aaae924b5dcdcee1e5035465a82994/ccc/cwb.py#L505">query</a> which uses the method <a href="https://github.com/ausgerechnet/cwb-ccc/blob/9809dc16c8aaae924b5dcdcee1e5035465a82994/ccc/cwb.py#L217">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">call</a> to the <a href="https://github.com/ausgerechnet/cwb-ccc/blob/9809dc16c8aaae924b5dcdcee1e5035465a82994/ccc/cqp_interface.py#L224">Dump</a> method of the API, check <a href="https://github.com/ausgerechnet/cwb-ccc/blob/9809dc16c8aaae924b5dcdcee1e5035465a82994/ccc/cqp_interface.py#L257">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">https://chozelinek.github.io</a></div><br clear="all"><div><div dir="ltr" class="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><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Mar 25, 2020 at 3:22 PM Andrew Nelson <<a href="mailto:an.linguist@gmail.com">an.linguist@gmail.com</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 dir="ltr">Hello,<div><br></div><div>The tool I'm building has several features and I'm writing everything in python. When I was writing the initial program I couldn'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'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'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>
_______________________________________________<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>