Query tags/context labels of senses using JWKTL - parsing

I am working on a project where I need to deal with Wiktionary. For some entries, there are context labels/tags before its sense I want to query for, e.g. idiomatic, transitive like HERE. I am now trying to use JWKTL, to do the job. But it seems no api call supports the query.
Can anyone let me know how to get that information by JWKTL, or, is there any other tool can parse the Wiktionary dump .xml file while being able to access that labels/tags?
Thanks.

According to Dr. Christian. Meyer, there is currently no API on this.
I ended up with pattern matching in the original wiktionary .xml dump.

Related

Nested Jira Search on two independent projects

I need to get a nested Jira search. I am okay with JQL query but I have a usecase that I don't know how to solve
Company uses project=XTBOW for reporting purpose for executives (Epic)
The company also uses project=XTA for underling development work (Task)
The XTA task are linked to the XTBOW Epic for a subset of task, but not all. (There is a large body of XTA task that are not linked to XTBOW)
I need to get a filter going for all XTA projects that are linked to XTBOW Epics only. I would like to use a filter like this:
project = XTA and "Epic Link" in (<project = XTBOW.key>)
I can manually prove this filter works. But need a way to automate this filter, because the number of tickets being created/tracked in growing exponentially, and if someone deletes a key for XTBOW that is in the "Epic Link" field, the JQL search throws and error because the "Key" is missing.
Example - FYI cf[10231] is the "Epic Link" field:
project in (XTA,XTWOF) and cf[10231] in (XTBOW-42,XTBOW-59)
The overall objective is to download the data to a dataframe. So if there is a better suggestion to even avoid JQL and do it through python. I am all ears. Just need so pointers to start. I am just going this route because I have already built a JIRA-Downloader/Parser using Python.
The easiest way to get subsets of issues is with:
search_issues(jql_str, startAt=0, maxResults=50, validate_query=True, fields=None, expand=None, json_result=None)
You should be able to just pull the issue sets using the queries you already created, just make them into strings.
DOC

Using custom metadata in the result of OData queries

I wonder if it's possible to use custom metadata within the result of OData queries (at the entity level). I think of metadata such as scores since the query executed on an ElasticSearch database and I would like to provide these hints to the end user.
Thanks very much for your help!
Thierry
Sorry I'm not familiar with ElasticSearch. But if I understand your questions correctly, you want some information other than the raw data in the request result ? If so, there is such things called Instance Annotation that may satisfy your need. An explanation from OData spec.
HTH

Google Drive queryForFilesList not returning any results

I'm currently having issues with the iOS Google Drive SDK. I'm using GTLQueryDrive queryForFilesList to search for a file in my Google Drive. All the files I want have a path in the format directory-name/file-name. Since the SDK/API doesn't allow searching for files using a full path, I'm using the following query to ultimately get it's downloadUrl. I'm using a query in the following format:
((title = 'directory-name') AND ('root' in parents) AND (mimeType = 'application/vnd.google-apps.folder')) OR
((title = 'file-name') AND (not 'root' in parents) AND (mimeType != 'application/vnd.google-apps.folder'))
The first line is meant to find all directories in the root directory whose name matches mine, and the second line should match all files with the same name. This should return the directory i'm looking for, the file i'm looking for, and maybe some other stuff (e.g. files with the same name in other directories). I have some code to figure out which file is the correct one.
The problem I'm having is that sometimes I get no results from the query. This generally happens after I rename the file, and rename it back, or other things like that. The weird part is that if I run either of the two lines of the query independently, it returns correctly, but together they don't.
Any help would be greatly appreciated, and I would gladly provide more information if required.
And yes, I'm using the kGTLAuthScopeDrive scope.
The ideal solution would be if I could just search using a full path, so if there's a way to do this, then I'm not aware.
Unfortunately, I was unable to get this to work. And also unfortunately, Google does not provide an API to query for a full path. So I resorted to iterating over the path to get the directory IDs, and then when I get to the file, get its ID and download it. Although slightly more complex, my solution was based on this question and chosen answer: What's the right way to find files by "full path" in Google Drive API v2

How do I construct the cake when using Scalaxb to connect to a SOAP service?

I've read the documentation, but what I need to know is:
I'm not using a fictitious stock quote service (with an imaginary wsdl file). I'm using a different service with a different name.
Where, among the thousands and thousands of lines of code that have been generated, will I find the Scala trait(s) that I need to put together that correspond to this line in the documentation's example:
val service = (new stockquote.StockQuoteSoap12Bindings with scalaxb.SoapClients with scalaxb.DispatchHttpClients {}).service
Now, you might be thinking "Why not just search for Soap12Bindings in the generated code"? Good idea - but that turns up 0 results.
The example in the documentation is outdated, or too specific. (The documentation is also internally inconsistent and inconsistent with the actual filenames output with scalaxb.)
First, search for SoapBindings instead of Soap12Bindings to find the service-specific trait (the first trait).
Then, instead of scalaxb.SoapClients, use scalaxb.Soap11Clients.

NSXMLDocument parsing into custom objects

Using NSXMLDocument, without using XPath, is there an easy way to parse an XML document and deserialize it into custom objects to create an object tree hierarchy?
For example, if I have the xml shown below, is it possible to put the details into a Restaurant object and a content object within it?
<restaurants>
<content>spanish name</content>
<content>english name</content>
</restaurant>
<spa>
<content>spa spanish name</content>
<content>spa english name</content>
</spa>
I will be using your answer above to extend it for programming in kissxml in iOS. As the kissXML document mentions that the XML parser behaves in the same way as NSXMLDocument, so I've asked the question using NSXMLDocument.
If you know your expected content structure, the easiest is to just use NXMLParser and loop through it looking for the bits you need and keeping track of the previous bit, building an object as you find them.
If you want tree-based approach, consider learning XQuery and XPath, they are not all that bad. Without them, the only thing NSXMLDocument really gives you is Cocoa bindings.
At the end of the day you must transform your data somehow.
With NSXMLDocument you will still do well to validate against an XML DTD if possible, to ensure you have good data.
With NSXMLParser, you are able to handle things without a formal DTD.
You only need worry about how big the data is, an how you want to parse it, then do some trial and error with test data to ensure it's grabbing what you want or need.

Resources