Import and export

OCR import

The OCR import turns typed index cards, inventory lists and old catalogues into objects. It reads PDFs and scans, divides the text into objects and gives each section a field of the project. You check what it has read on the pages themselves, and on the right you see which objects come out of it. The result is taken over through the Excel import , with a preview and as one step in the history. It reads printed and typed text. Handwriting in Latin script is read only by the AI service , and none of the places reads Kurrent reliably.

You open it in the sidebar under Data In- & Export, section Import, Documents and scans (OCR). The objects are created in the project in which you open it.

OCR import of a typed inventory card: on the left the files and the settings, in the middle the toolbar and the card with framed sections, coloured and with field names only where there is a field (Inventarnummer, Objekttitel, Datierung, Material), the header line left out, in the margin the object number 1; on the right the preview as a card with the object's fields; at the bottom Undo, Download as XLSX and Continue to Excel import.

Loading documents

Drag files into the window or click to choose them, many at once. Later you can add more with Add documents or by dragging them onto the review view; while they hover over it, a dashed frame shows that the window accepts them.

FormatAccepted
PDFyes. If a page has its own text, it is read directly, without text recognition
JPG, PNG, WebP, GIF, BMPyes
TIFF, HEIC and othersno, Format not readable. Save as PDF, JPG or PNG first

The documents are read one after the other. The list on the left shows the status of each document (waiting, reading … n %) and afterwards how many objects come out of it and how many sections still have no field. A click on a document jumps to it in the middle; the document currently in view is underlined in the list. Above each document it says how many pages it has and where the text comes from: Text from the PDF or Text recognised (OCR). Read again reads it once more, Remove takes it out after a confirmation.

Settings

The settings are on the left below the files. Without ticks they apply to the document in view (Settings of this document, with its name below). If you tick documents, they apply to all ticked ones (Settings for n selected); this way a list of works gets One object per page while the index cards next to it keep One object per document. With Shift and a click you tick all documents between two. If the selected documents have different values, it says mixed there.

A document you add starts with the settings of the document in view, the first ones with those of the start page. As soon as it is read, Moliri looks at how it is built and sets what clearly follows from that:

What Moliri finds on the documentSet
A label appears more than once on a page, such as “Inv. no.:” twice, several pictures of one size stand one below the other, or at least three entries start alike after a gap, such as “Cat. 57”, “Cat. 58”Several objects per page
Most pages carry pictures of their own, or the same labels come page after pageOne object per page
A single page with one set of labelsOne object per document
Text in another language than the one chosenThat Language
Running text in long lines without labelsLayout Text in columns

Below the setting it then says Detected: with the reason, such as “Inv. no.” appears more than once on page 1 (2×). Small pictures in the same place on several pages, such as a logo, do not count. Where the signs are not clear, the document keeps the settings it started with. What you set on a document yourself is not changed by the detection.

Objects takes effect at once. A different Language or Layout only takes effect when reading, also when the detection proposes it: the document then appears in the list as Settings changed, read again, and Read with new settings (n) reads these documents once more. For PDFs with their own text the detection proposes neither language nor layout. Text recognition applies to all documents.

SettingChoiceDefault
Text recognitionIn the browser, With Transcribe on this computer, With the AI service or On the server. What can read at the moment is offered; if only the browser can read, the choice is missingThe default place from the profile, if it can read at the moment, otherwise In the browser
LanguageGerman, English, German and English; with Transcribe, with the AI service and on the server also German + FrakturGerman
LayoutIndex card or form, Text in columnsIndex card or form
ObjectsOne object per document, One object per page, Several objects per page. If you have set object boundaries by hand, it says below how manyOne object per document
Attach the documents to the objects as fileson, offon

In the browser and with Transcribe on this computer, the documents are not uploaded for text recognition. Transcribe is Moliri’s desktop app; its address is in the profile under Text recognition, where each person also chooses their default place. On the server, the instance’s transcription service reads, the same one as on the Text tab of the file window. Transcribe and the server also read Fraktur. On the server, text recognition runs with low priority. If a page waits longer, the list says so and offers Continue in the browser; the browser then reads this page and the remaining ones.

With the AI service, an image model of the AI account reads the pages, one after the other, as long as the dialog is open. Each page goes as an image through the server to the service of the AI account. This place is only available where the AI account has a Model for text recognition and the instance has not switched off text recognition by the AI service . The AI service also reads handwriting in Latin script, for example handwritten index cards in today’s cursive hand. It does not read Kurrent reliably: there the models invent text that sounds fluent and has little to do with the sheet. A model on your own server can take several minutes for one page.

The AI service delivers lines without word boxes, their position on the sheet only approximately, and no uncertain words. The import still forms the sections and their frames; on these pages n unsure has nothing to jump to.

With Several objects per page, Moliri divides each page like this:

On the pageA new object begins
Thumbnails stand one below the other, as in a list of works or a location reportwith each image
Entries without images, each after a blank line or a larger gap, with a short first line that starts alike in several of them (“Cat. 57”, “Cat. 58”, or the artist’s name every time) and stands at the same left edgewith each such entry, also in columns side by side; they are counted column by column
otherwiseas soon as a field recurs that is already filled in the current object

For entries without images, the first word of the first line counts, and digits count as alike; Moliri does not look at bold type. A heading between the entries, such as an artist’s name above several works, belongs to the entry above it; text beside it, such as the lender, to the entry level with it. Where an object begins and ends is shown in the margin next to the pages (Object boundaries ).

In PDFs with their own text, columns stay apart even when they stand close together: a line of the left column does not run on into the line of the middle one.

With Attach the documents to the objects as files, each object gets its document as a file during the import. If an object consists of single pages of a PDF, these pages are attached as images.

How a section gets its field

Moliri divides the text of each page into sections and looks for a field for each one. Next to the field it says where the assignment comes from:

NoteOrigin
from the labelThe section begins with the name of a field, such as “Inventarnummer: …”, also in a similar spelling
as with other objectsYou have already assigned the same label elsewhere, or the section is at the same position on a page of the same size as an assigned one
same place in the order as in other objectsThe section has the same place in the order of its object as an assigned one in another object: the first text after the figure, the second and so on
by contentThe text resembles the values the field already has in the project, such as dates or measurements
proposed by AIAssigned after Suggest fields with AI; the tag on the page carries a ✦
assigned by handYour decision. It takes precedence over everything else
entered by handA text you wrote on the page yourself (Entering text )

What you decide is picked up by the other documents and objects as soon as the label or position matches. In a list of works you assign the lines of the first work, and the other works of the same document follow.

Where the position on the page says nothing, the order counts. If the caption is centred below figures of different heights, it sits somewhere else on every page; title, date, technique and dimensions still follow in the same order. If an object has one text more or fewer, such as the frame size as well, Moliri lines the objects up by what they share: a date stands only for a date, a measurement only for a measurement, similar texts for similar ones. Objects with as many texts count most. Only objects of the same kind are compared, both with a figure or both without, on pages of the same size. If two details of an object come in another order, such as dimensions before technique, the order does not see it; then the position on the page or your own assignment helps.

If two of your decisions disagree, such as Titel on the first work and Originaltitel on the second, the other works follow the object with as many texts and then the closest one, here the second. The other field then stands at the top of the field picker in Assign field, marked Suggested: stands here in other objects.

The page shows who gave a field: a field you gave yourself has a filled tag; one Moliri took over has an outlined tag and a lighter frame. The legend by hand and taken over above the pages explains this. On the cards, values taken over have a dotted underline; point at one to see where the assignment comes from. Changing a field that was taken over makes it your decision, and it gets the filled tag. How well the assignment by content works depends on the values the project already has.

Figures

Moliri finds figures on the page and, for PDFs, takes the embedded images, small thumbnails beside the caption too; a flat strip such as a logo at the foot of the page does not count. Of the figures of an object, the one with the most natural shape becomes the title image: the one whose sides come closest to 4:3, upright or across. A narrow strip or a small stamp therefore does not become the title image, even if it comes first. If two are equally good, the larger one wins. The other figures are attached to the object as files. A figure that sits in the same place on several pages, such as a logo, is not taken over.

The title image goes into the first image field listed among the image fields of the project’s view (view settings). If none is listed there, it goes into the first image field of the project, or into the first file field if there is no image field. If you give a title image another field, the title images of all objects go into that field, including those of documents you add afterwards. Moliri still picks the title image by its shape. If you put another figure of an object into the field of the title images, it counts as the title image there, and the one Moliri chose is attached to the object as a file.

Each figure carries a tag on the page: the field, as a file of the object or not imported. A click on the figure decides what happens to it:

ChoiceEffect
Into a fieldThe figure goes into the chosen image or file field
Only as a file of the objectThe figure is attached to the object as a file, in no field. This only works through Continue to Excel import; in the XLSX it is in the column Abbildungen (OCR) (figures)
Do not importThe figure stays out and appears hatched
No picture (wrongly detected)Removes the frame; there was no figure there

Every figure has the same choice in the Cards preview. If an object has several, Change all … changes them for this object in one go: all into the image field, the title image into the image field and the others as files, or only the title image. You draw a figure that was not found on the page with the Figure tool; it goes into the field of the title images.

Keywords on figures

Under Keywords you give a figure keywords, such as back or detail. The keywords that files in the project already carry are suggested. Before Add you choose which figures the keyword is for:

ChoiceEffect
Picture 2 of every objectThe figure at the same place in every object gets it, counted in reading order. If the detail is second in every object, one keyword is enough for all
All picturesEvery figure of the import gets it
Only this pictureOnly the figure you clicked gets it

The choice also holds for documents you add afterwards. The list above the input shows each keyword of the figure with its choice; there you change the choice or remove the keyword with ×. The cards show the keywords below each figure. After the import they are on the files, like keywords you give in the file window. They do not go into Download as XLSX.

For all objects

Some details appear only once in the document and apply to every object, such as the artist’s name on the title page. In Assign field you choose under Applies to:

Applies toEffect
this objectThe text belongs to the object it stands in
all objectsThe text goes into the chosen field of every object of the import
selected objectsThe text goes only into the ticked objects, listed with their number from the preview

The tag on the page and the value on the card then say all objects or n objects. A page that holds only such texts becomes no object of its own; so the title page drops out of the preview. The choice selected objects depends on how the documents are split into objects: if you change that afterwards, choose the objects again.

Leaving out

Headers and footers that recur on most pages, and page numbers, are left out by the import on its own (on many pages). You leave out a section in Assign field or in the Text preview with the eye icon (Leave out). The same text on other pages and in other documents is then left out as well (the same text is left out elsewhere). Take in after all brings it back. Text that is left out appears hatched on the page and does not go into the table.

With the Exclude tool you draw a frame around everything that is not to be imported, such as a letterhead or a stamp. Whatever lies inside it, text and figures alike, stays out (in an excluded area). With on every page on the frame’s tag, it applies at the same place on every page of the document; the × takes the area back in. A click with this tool on a single text or figure leaves out only that one or takes it back in. Excluded areas are kept on Read again.

Suggest fields with AI

Suggest fields with AI (n) is above every document that has been read; n is the number of its texts that have no field yet and that you have not decided yourself. Only these texts get a suggestion. The language model sees the whole document and the project’s most used fields, each with up to three existing values. If every text has a field, the button is greyed out. The button appears as soon as an AI account is set up and you have write access in the project.

The question runs as a job on the server. While it runs, a box above the pages shows where it stands:

In the boxMeaning
Sending the texts to the serverThe question is being put
Waiting in line (jobs ahead: n)Other jobs of the server come first, such as a transcription
The model (name) reads the texts and picks fieldsThe model is working on the answer
1:12 of about 2:30How long it has taken so far and about how long it will take, estimated from the last answer in this browser. Before the first answer only the time is shown and the bar runs without end

You can keep working meanwhile: the suggestions only fill texts that still have no field by then, and whatever you change stays yours. Stop waiting ends the wait without changing anything; the job on the server still finishes, but its answer no longer arrives. Once the answer is there, it says above the pages how many texts got a field and how long it took. Their tags carry a ✦ (proposed by AI). Similar documents take over the suggestions by their position on the page.

Checking the pages

In the middle, all pages of all documents are shown one below the other, for scrolling through. To the left of them is the toolbar, with a sentence above saying what the chosen tool does. On every page each section is framed; a section with a field is coloured and carries the name of its field to the right of it, a section without a field is grey and dashed, one that is left out is hatched. At the top right of every page are its number and the eye Do not import this page; a page that is not imported appears faded.

Tools

A tool stays on until you choose another one or press Esc. Each has a key.

ToolKeyEffect
SelectVA click on a section opens Assign field: the text for correction and the usual field picker. The chosen section has handles at its corners and sides to make its box smaller or larger (Changing a box ). A click on a figure decides what happens to it
Mark textTDraw a frame around text and give it a field. Several lines, also from different sections, become one field. If a field is chosen above the pages under Field when marking, the text gets it straight away, without asking; then a click on a section is enough too. If the frame holds no recognised text, you type it in yourself (Entering text )
ExcludeXA frame excludes everything inside it, on every page if you want; a click leaves out a single text or figure (Leaving out )
New object from hereSA click on the page: the next object begins there (Object boundaries )
ObjectOShows the objects as frames. Draw a frame around everything that belongs to one object; move, resize or remove found frames (Object frames )
FigureBDraw a rectangle around a figure that was not found. It goes into the field of the title images. The tool stays on, so in a list of works you draw one image after another

Below them are zoom in (+), zoom out (-), Page width (0) and the switch for the frames of the sections. Alt + → and Alt + ← jump to the next and previous document.

Assign field shows the text for correction, with several objects Applies to (For all objects ), and below it the usual field picker. For a whole section, a chosen field applies straight away; so choose Applies to before the field. For marked text, Apply (or Enter) takes over text, field and Applies to. Leave out leaves the text out, Esc closes without changes.

Entering text

If the page holds text the recognition did not read, such as a handwritten inventory number on a printed sheet, draw a frame around it with Mark text. If the frame holds no recognised text, Assign field opens with an empty text: you type it in, choose the field and Apply. The section then has a dotted frame on the page, says entered by hand in the Text preview and belongs to its object like any other.

Changing a box

If the recognition put too much or too little into a section, drag its box into shape: click the section with Select and drag one of the handles. The section then holds the lines whose middle lies in the new box, and it keeps its field, now as your decision. Lines left outside become a section of their own, for which Moliri looks for a field as for any found one. A larger box takes in the lines of found sections, never those of a section you assigned yourself. A box you draw with Mark text over found sections works the same way: what it covers becomes one section, the rest of the found ones stays on its own. A box whose text you typed in yourself is only moved or resized by the handles.

Object boundaries

In the left margin of every page there is a bracket for each object with its number, the same as in the preview. If an object continues on the next page, the bracket is open at the bottom, and on the next page at the top. If you point at a bracket or at a card in the preview, the object is highlighted on the page; a click on the bracket shows its card.

Between two pages of a document it says how it continues:

Between the pagesButtonEffect
Object n continues on the next pageSplit hereA new object begins with the next page
A new object starts hereJoin with the page beforeThe next page belongs to the object of the page before

Pages with the same caption as the page before, such as several photos of one work, belong together automatically. Identical text counts only once in the object.

If there are several objects on one page, use New object from here to set a line where the next one begins. Whatever is above the first line belongs to the object before, even if that began on the previous page. With Several objects per page, the lines Moliri has found by itself appear dashed (New object (detected)). If the objects stand in columns side by side, Moliri shows no lines, only their frames with the Object tool. The × on a line removes the split. If you set or remove a line on a page, only the lines you can see apply there from then on.

This way a catalogue in which one work spans two pages and the third page holds two works becomes three objects: Split here between page 2 and 3, and on page 3 a line between the two works.

Object frames

With the Object tool, the objects Moliri found stand on the page as dashed frames, with their number and found. Frames you drew or changed yourself are solid and stay visible with the other tools as well.

On the frameEffect
Draw a new frameEverything inside becomes one object. It takes only this place from the found objects; what lies outside stays with them
Drag a side or cornerChanges the size. A found object becomes yours; if it spans several pages, it goes on there. What it no longer covers becomes an object of its own
Drag the grip on the tagMoves the frame
× on a found frameRemoves the object at this place: its part of the page is not imported, like an excluded area . The × on the red area brings it back
Choice on the tag of your own frameAssigns the frame to another object, also one on another page (front and back of a card), makes a new object of it or removes the frame

Making a frame smaller or drawing a new one in the same place thus leads to the same result.

Preview

On the right you see which objects the import creates, in four views:

ViewShows
CardsOne card per object with its number, its figures and its fields, as the object will get them. Text without a field is folded away below. Each value is the section it comes from: point at it and its frame lights up on the page; a click shows it on the page and opens Assign field to change text, field and Applies to there. A click on a section of the page in turn highlights its value on the card. If an object has several values in several fields, the card asks are these several objects? and offers One object per page or Several objects per page for this document
TableOne row per object, one column per field, as the Excel import receives them. An empty field can be recognised by a short dash
FieldsField by field, the value of each object and how many objects have the field (3 of 5). Where a value is missing, it says missing
TextThe text of the document currently in view, section by section, with search and n unsure

A click on an object in the preview shows it on the page.

In the Text view the text uses the same editor as the Text tab of the file window (Recognised text ):

In the Text viewEffect
Field button on the sectionOpens Assign field for the whole section
Editing the text directlyEnter jumps to the next section, Shift + Enter makes a new line, Esc takes back the input. The change is applied when you leave the section
Selecting part of the textOpens Assign field for that part
n unsureJumps to the next section with words recognised with uncertainty. These only exist after text recognition, not for PDFs with their own text

Taking over

The footer shows how many documents and objects there are and how many sections have a field.

ButtonEffect
Continue to Excel importOpens the Excel import with the result as a spreadsheet. Mode, options, column functions and preview are the same as for an Excel file. Documents and figures go along. The OCR import is empty afterwards
Download as XLSXThe spreadsheet as the file ocr-import-<Datum>.xlsx, one row per object, one column per field. In addition the columns Datei (OCR) (file), Ohne Feld (OCR) (without field) with the text that has no field (as “Label: text”) and Abbildungen (OCR) (figures) with the figures that have no field
UndoTakes back the last change to fields, object boundaries, areas, figures and text, also with Ctrl + Z
Start overAfter a confirmation, discards all loaded documents and changes

After Continue to Excel import the OCR import opens empty the next time. Its start page then says Last import handed to the Excel import with Restore last OCR import, for example if you cancelled the Excel import or want to add something. The import handed over last can be restored until you hand over the next.

The review lives in the open browser tab. If you close the window, it is kept as long as you stay in the same project. Reloading, closing the tab or opening the OCR import in another project discards it without asking, and the import handed over last with it. Nothing is saved until the Excel import writes it.

AI account

The administration sets up the language model for Suggest fields with AI and the AI service in the instance’s AI account (status 9). What to enter there and what goes to the model is described under AI account in the chapter AI in Moliri.

Further reading