keep examples metadata when pulling
such as document metadata and sentence id
Adding requests from #62.
When "pulling", optionally filter the example sentences by collocation and/or gramrel. Be able to pull examples from more than one corpus.
So I am supposed to use "refs" in GET to ske to include additional metadata. To make this usable by the users, I have come up with a possible implementation in ea58cf5f8b18220462715e17ed3c5e1b63d64730. I am stuck as I don't know how to set/get these global variables (like ske_login). I can see they are in the database, but don't know how to introduce a new one. Or if that is actually the right way to go. When someone has five minutes, please take a look
I'm not sure I follow what you mean: the user needs to set them in the configuration (Sketch Engine connection etc.), you shouldn't need to take any care about that.
Ok. So then, which settings can add this to the API call? I was told:
it should be enough to add s.id to refs parametr. Various (structure.attribute) metadata are separated with comma: e.g. &refs=s.id,doc.title,p.heading
I see these settings inside lexonomy: Sketch Engine URL, Sketch Engine API URL, Corpus name, Concordance query, Additional search elements. Or do I have to set this somewhere else?
Yes - you need to change the API call to get the example from Lexonomy. That is hardcoded except for the API URL prefix. See the handler for ":dictID/skeget/xampl/" in lexonomy.js
If you will be changing anything there it would be good to rewrite it straight to Python. In this case it is extremely easy as it has no further dependences, it is basically just a wrapper to satisfy CORS.