Openrefine: Extract Wikidata Q-numbers from reconciled items

Created on 5 Mar 2019  Â·  11Comments  Â·  Source: OpenRefine/OpenRefine

Is your feature request related to a problem or area of OpenRefine? Please describe.
I often need to extract the Wikidata Q-values from reconciled items. I now do this via "Edit column --> Add column based on this column" and then using the GREL expression "cell.recon.match.id" to retrieve the Q-numbers

afbeelding

Describe the solution you'd like
It would be handy to have a function ("Extract Q-value", or some other description) under "Edit column" to automatically extract the Q-value and put these in a new adjecent column.

enhancement good first issue reconciliation

All 11 comments

To do this, one would need to add an action in the menu, probably in main/webapp/modules/core/scripts/views/data-table/menu-reconcile.js. This action should prompt the user for a column name and use the existing operation to create the column (no backend change should be needed).

Hi! I'd like to be assigned this.

Screenshot from 2020-03-09 00-36-29
Just got to add a function with the query expression now and we're good to go!

Here's how the fix works:

Screenshot from 2020-03-09 11-03-28
Screenshot from 2020-03-09 11-04-15
Screenshot from 2020-03-09 11-09-42
Screenshot from 2020-03-09 11-04-59

I think the menu item / column /... should be renamed to "Add ID values column" / "ID values" /... or something like that. Because this extracts all ids of the cells, only in the case of Wikidata this is a Q...-value.

@CennoxX the screenshot above is not the final version of this feature. Have you tried OR 3.4? Here is what it looks like there:
image

Thanks for clarifing. I only read the release notes.

Il Dom 5 Lug 2020, 08:12 Antonin Delpeuch notifications@github.com ha
scritto:

@CennoxX https://github.com/CennoxX the screenshot above is not the
final version of this feature. Have you tried OR 3.4? Here is what it looks
like there:
[image: image]
https://user-images.githubusercontent.com/309908/86526674-35318b80-be97-11ea-9f36-a069aeb0facd.png

—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/OpenRefine/OpenRefine/issues/1975#issuecomment-653847298,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AA4Z4JPF674ULWF5GQE7RHDR2AKVLANCNFSM4G3Y7M4A
.

@wetneb Just to ensure the correct behavior; is this how @allanaaa could describe the functionality to document it?

... this extracts all ids of the cells, only in the case of Wikidata this is a Q...-value.

Also I wonder if "Add" was the right word choice on the menu item. Maybe "Extract entity identifiers to column"?

This feature is not specific to Wikidata in any way - it extracts the identifier of matched cells, and works regardless of which reconciliation service was used to reconcile the column.

Was this page helpful?
0 / 5 - 0 ratings