1"use strict";(self.webpackChunkopenrefine_documentation=self.webpackChunkopenrefine_documentation||[]).push([[3451],{99264(e,n,t){t.r(n),t.d(n,{assets:()=>r,contentTitle:()=>o,default:()=>h,frontMatter:()=>l,metadata:()=>i,toc:()=>c});const i=JSON.parse('{"id":"manual/wikibase/new-entities","title":"Creating new items","description":"OpenRefine can create new items. This page explains how they are","source":"@site/docs/manual/wikibase/new-entities.md","sourceDirName":"manual/wikibase","slug":"/manual/wikibase/new-entities","permalink":"/docs/manual/wikibase/new-entities","draft":false,"unlisted":false,"editUrl":"https://github.com/OpenRefine/openrefine.github.com/edit/master/docs/manual/wikibase/new-entities.md","tags":[],"version":"current","lastUpdatedBy":"Antonin Delpeuch","lastUpdatedAt":1669278148000,"frontMatter":{"id":"new-entities","title":"Creating new items","sidebar_label":"New items"},"sidebar":"docs","previous":{"title":"Schema alignment","permalink":"/docs/manual/wikibase/schema-alignment"},"next":{"title":"Quality assurance","permalink":"/docs/manual/wikibase/quality-assurance"}}');var s=t(74848),a=t(28453);const l={id:"new-entities",title:"Creating new items",sidebar_label:"New items"},o=void 0,r={},c=[{value:"Words of caution",id:"words-of-caution",level:2},{value:"Workflow overview",id:"workflow-overview",level:2},{value:"Adding labels to new items",id:"adding-labels-to-new-items",level:2},{value:"Marking multiple cells as identical items",id:"marking-multiple-cells-as-identical-items",level:2},{value:"Retrieving the Qids of the newly-created items",id:"retrieving-the-qids-of-the-newly-created-items",level:2}];function d(e){const n={a:"a",code:"code",em:"em",h2:"h2",li:"li",ol:"ol",p:"p",section:"section",strong:"strong",sup:"sup",ul:"ul",...(0,a.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(n.p,{children:"OpenRefine can create new items. This page explains how they are\ngenerated."}),"\n",(0,s.jsx)(n.h2,{id:"words-of-caution",children:"Words of caution"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:["\n",(0,s.jsx)(n.p,{children:"The fact that OpenRefine does not propose any item when reconciling\na cell does not mean that the item is not present in the Wikibase instance:\nit can be missed for all sorts of reasons. Please make\nsure that you are not creating any duplicates!"}),"\n"]}),"\n",(0,s.jsxs)(n.li,{children:["\n",(0,s.jsxs)(n.p,{children:["Make sure that the items that you want to create are admissible in\nthe Wikibase instance. For Wikidata, see the ",(0,s.jsx)(n.a,{href:"https://www.wikidata.org/wiki/Wikidata:Notability",children:"notability guidelines"}),";"]}),"\n"]}),"\n",(0,s.jsxs)(n.li,{children:["\n",(0,s.jsx)(n.p,{children:"Deleting items generally requires special rights: if you want to revert an\nedit group that includes new items in Wikidata, you will need to ask an\nadministrator to do it."}),"\n"]}),"\n"]}),"\n",(0,s.jsx)(n.h2,{id:"workflow-overview",children:"Workflow overview"}),"\n",(0,s.jsx)(n.p,{children:"Here is how you would typically create new items with OpenRefine:"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:"Reconcile a column;"}),"\n",(0,s.jsxs)(n.li,{children:["Mark some of its cells as new items. This will not create items yet.\nIf you need to mark many rows as new items, use the ",(0,s.jsx)(n.strong,{children:"Reconcile"})," \u2192\n",(0,s.jsx)(n.strong,{children:"Actions"})," \u2192 ",(0,s.jsx)(n.strong,{children:"Create a new item for each cell"})," operation."]}),"\n",(0,s.jsx)(n.li,{children:"Create a Wikibase schema as usual, using the column where your new\nitems are marked;"}),"\n",(0,s.jsx)(n.li,{children:"Perform the edits: the new items will be created on Wikidata at this\npoint;"}),"\n",(0,s.jsx)(n.li,{children:"The cells that you had marked as new items will now be reconciled to\nthe newly-created items."}),"\n"]}),"\n",(0,s.jsxs)(n.p,{children:["It is often useful (but not mandatory) to treat new items in isolation\nand use a dedicated schema for them. This helps you add many statements\non the new items (including labels and descriptions) without risking to\nclutter existing items with redundant edits. Use a facet on the judgment\nstatus of the reconciled column to isolate new items and perform their\nedits separately. As always in OpenRefine, only the rows covered by your\nfacets will be considered when uploading the edits to Wikidata: if a\ncell is reconciled to a new item but is excluded by the facet, no new\nitem will be created for it.",(0,s.jsx)(n.sup,{children:(0,s.jsx)(n.a,{href:"#user-content-fn-1",id:"user-content-fnref-1","data-footnote-ref":!0,"aria-describedby":"footnote-label",children:"1"})})]}),"\n",(0,s.jsx)(n.p,{children:'Note that even if you know that all items in your column are new, you\nwill still need to make a first reconciliation pass by selecting the\nWikidata reconciliation service, and then setting all reconciliation\nstatuses to "new". If you skip the first part, OpenRefine will not\nknow that this column is reconciled against your Wikibase instance (it could be\nreconciled to other services) so it will not let you use it in place of\nan item in a Wikibase schema.'}),"\n",(0,s.jsx)(n.p,{children:"You can also perform the edits with QuickStatements - in this case, your\nOpe
1nRefine project will not be updated with the newly created Qids."}),"\n",(0,s.jsx)(n.h2,{id:"adding-labels-to-new-items",children:"Adding labels to new items"}),"\n",(0,s.jsx)(n.p,{children:'The text that is in a cell reconciled to "new" is not automatically\nused as label for the newly-created item. This is because OpenRefine has\nno way to guess in which language this label should be. When adding new\nitems, you need to explicitly add a label in the schema. This label can\nuse the reconciled column as source, but if you have other cells matched\nto existing items, be careful not to override the labels of these items\n(if it is not your intention).'}),"\n",(0,s.jsx)(n.p,{children:"OpenRefine will refuse to perform edits where new items are created\nwithout any labels (as this is considered a critical issue). Other\nissues will be raised if insufficient basic information is added on the\nitems (but these other warnings will not prevent you from performing the\nedits)."}),"\n",(0,s.jsx)(n.h2,{id:"marking-multiple-cells-as-identical-items",children:"Marking multiple cells as identical items"}),"\n",(0,s.jsxs)(n.p,{children:["If you mark individual cells as new items, one new item per cell will be\ncreated. Sometimes multiple rows refer to the same item. OpenRefine\nmakes it possible to mark all the corresponding cells as the ",(0,s.jsx)(n.em,{children:"same"})," new\nitem. Two conditions have to be met:"]}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:"the reconciled cells must be in the same column (it is not possible\nto mark two cells in different colums as the same new item);"}),"\n",(0,s.jsx)(n.li,{children:"the cells must contain the same initial text value."}),"\n"]}),"\n",(0,s.jsxs)(n.p,{children:["If these two conditions are met, then isolate these cells with facets\nand go to ",(0,s.jsx)(n.strong,{children:"Reconcile"})," \u2192 ",(0,s.jsx)(n.strong,{children:"Actions"})," \u2192 ",(0,s.jsx)(n.strong,{children:"Create one item for similar\ncells"}),". This will mark the cells as new and referring to the same item."]}),"\n",(0,s.jsx)(n.h2,{id:"retrieving-the-qids-of-the-newly-created-items",children:"Retrieving the Qids of the newly-created items"}),"\n",(0,s.jsxs)(n.p,{children:["Once you have performed your edits with OpenRefine, any new cells\ncovered by the facet will be updated with their new Qids. You can\nretrieve these Qids with the ",(0,s.jsx)(n.strong,{children:"Edit column"})," \u2192 ",(0,s.jsx)(n.strong,{children:"Add column based on\nthis column"})," action and using the ",(0,s.jsx)(n.code,{children:"cell.recon.match.id"})," expression.\nNote that you will no longer be able to isolate new items with a\njudgment facet at this stage (because the judgment will be updated to\n",(0,s.jsx)(n.strong,{children:"matched"}),") so it can be worth marking these rows (for instance with a\nstar or flag) before performing the edits."]}),"\n","\n",(0,s.jsxs)(n.section,{"data-footnotes":!0,className:"footnotes",children:[(0,s.jsx)(n.h2,{className:"sr-only",id:"footnote-label",children:"Footnotes"}),"\n",(0,s.jsxs)(n.ol,{children:["\n",(0,s.jsxs)(n.li,{id:"user-content-fn-1",children:["\n",(0,s.jsxs)(n.p,{children:["The only exception to this rule is when marking multiple cells as\nidentical items: in this case, if one of such cells are included in\nthe facet, then all the others will be updated with the newly\ncreated Qid once the edits are made. ",(0,s.jsx)(n.a,{href:"#user-content-fnref-1","data-footnote-backref":"","aria-label":"Back to reference 1",className:"data-footnote-backref",children:"\u21a9"})]}),"\n"]}),"\n"]}),"\n"]})]})}function h(e={}){const{wrapper:n}={...(0,a.R)(),...e.components};return n?(0,s.jsx)(n,{...e,children:(0,s.jsx)(d,{...e})}):d(e)}},28453(e,n,t){t.d(n,{R:()=>l,x:()=>o});var i=t(96540);const s={},a=i.createContext(s);function l(e){const n=i.useContext(a);return i.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function o(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:l(e.components),i.createElement(a.Provider,{value:n},e.children)}}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.