-
Notifications
You must be signed in to change notification settings - Fork 18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add ability to test saving from multiple
results
#27
Comments
This should be workable to some extent, unless the specific item no longer appears in the search-results page at the given URL. For example, it may have fallen in search ranks and is no longer at the firs page. I imagine this can be a problem with Google Scholar. I've heard many complaints about its tendency of trying to outsmart the user. Currently in Z7's Scaffold, the 'multiple' test seems to emulate selecting the first choice and proceed with translating that. I think the result will show as failure if that single item fails to translate. This will make sure there's at least an arbitrary item that can be saved. The main difficulty with finding "specific" items is that we have no control whether those items will show up at all. And whether they show up says very little about our particular translator's quality, or even utility. But for those places where we in principle could be sure about the presence of some item, perhaps in the test case there may be an additional field indicating this, something like {
"type": "web",
"url": "[...]",
"items": "multiple",
"targetRow": "[...]"
} where "targetRow" is a string corresponding to one of the the text labels (conventionally called The reason I prefer a string value over an item object, is that to do this test but with items, in principle we have to translate every row in the multiple selection. With a string target, it suffices to inspect the object passed to This will at least show that the translator is doing something more "expected". I think perhaps we may design a Scaffold workflow like this:
But we should explain that the "Test Target?" box should only be ticked if the search query or URL is specifically crafted to ensure the stability of results. For example, an article-listing page of a journal issue should be fine, or a search query like https://zenodo.org/search?page=1&size=20&q=matplotlib+v3.7.1&type=software if the selected one is to be "matplotlib 3.7.1", but in general free-text searches in a database is not. |
An even more complicated design may look like this. Instead of a string value at {
"selectionTitle": "...",
"item": { ... }
} where the "item" field is the translation result. The workflow would be modified to be
When running the test from Scaffold, if the value of If the test case indicates (Here the field name |
Oh, if we go along this, it's likely a better idea to use the URLs (properties keys) than the text labels or "title" (values) as the index to the specific search result. The URLs are unique, but titles may duplicate each other. |
We should at least support opt-in testing of specific returned items when the results should never change (book chapter multiples, sites where results can be sorted by publication date ascending, ...). |
zotero/translators#3043 highlights how much we need the ability to add tests for
multiple
saving. I believe the reason we've never done it is that search results aren't stable, but I feel like we could come up with a test definition that would filter specific items from the results to save (based on either the key (URL, usually) or the title, I guess), so we could at least confirm that 1) the translator was finding results and 2) specific items could be saved.@zoe-translates, maybe you could think about how we might define these?
The text was updated successfully, but these errors were encountered: