Elamur Research

Entry Separation using a Mixed Visual and Textual Language Model: Application to 19th century French Trade Directories

Paper Β· 2023 Β· Bertrand Dumenieu, Edwin Carlinet, Nathalie Abadie et al.

Summary

A scanned trade directory can tell us where people lived and what work they did, provided we can tell which details belong together. A printed entry may fit on a single line or continue onto the next line, column or page. Optical character recognition (OCR) supplies a transcription, but a line in that transcription is still a unit of print. The entry is the unit a historian would want to put in a database. This paper studies how to recover those entries from French trade directories once the columns and reading order have been established.

The authors start with the recognized text and give the system a compact account of how it was printed. They insert special tokens, meaning recognizable items in the input sequence, for breaks and for the amount of blank space to the left or right of a line. A BERT-family encoder processes those markers alongside the words. It learns to identify the beginning and end of an entry from the surrounding evidence, which can include spelling, punctuation, indentation and the length of the previous line. The same system can also perform named entity recognition, identifying spans such as names and addresses within entries.

The benchmark contains 80 annotated pages and 8,900 entries, with evaluation on noisy OCR for which the reference annotations can be aligned. On the test split, the text-only system reached an entry-boundary F-score of 96.4%, while the system given layout cues alone reached 98.2%. The best configurations trained solely to find boundaries reached 99.0% using both sources of evidence. The highest reported boundary F-score was 99.2% in a joint experiment that put entry labels on the spacing tokens and reserved the word tokens for entity labels.

The experiment shows how much can be recovered from a reliable reading sequence with a small vocabulary of layout cues. It also draws a clear line around that result. The scores measure whether the system locates annotated boundaries exactly after OCR and layout processing. They leave open how many usable records a full digitization pipeline would recover from scans whose columns, reading order or transcription are difficult to establish.

Deep dive: Entry Separation using a Mixed Visual and Textual Language Model: Application to 19th century French Trade Directories

A study of how words, line breaks and indentation help locate the beginnings and ends of entries in scanned French trade directories. Β· about 31 minutes to read

The problem and its context

Where a printed line and a directory entry diverge

A trade directory arranges information about people or businesses into repeated records. Someone reading an entry is likely to take its name, occupation and address as parts of the same record even when the compositor has wrapped the address onto a fresh line. When a reader reaches the next name, they may recognize it as the start of a new entry from the wording, a visible indent or both. The paper asks how to make those judgments automatically over a long transcription. This is an information extraction problem because the aim is to recover units that can be used as records.

Record boundaries matter even when all the words are legible. If a continuation is treated as a separate entry, it can leave an occupation or address detached from the name that gives it meaning. If a new entry is missed, details from neighboring records can end up together. Recognizing names and addresses inside such a block leaves a further question about which items belong to whom. Entry separation supplies the scope within which the extracted fields can be interpreted.

The directories vary in how they organize those records. The paper illustrates an index by name from Duverneuil et La Tynna in 1806, an index by activity from Deflandre in 1828, and an index by street name from Bottin in 1851. Those examples show why a system has to work with the local evidence in a sequence. The information used to organize a list varies across directories, and the collection includes differences in printing and formatting. The authors also observe that indentation conventions may change from page to page within a directory.

There are two kinds of structure in play. The first is geometric. A digitization system has to locate columns and lines on a page and determine the order in which they should be read. The second is the extent of a meaningful unit within that order. An entry can continue beyond the geometric region in which it starts. The authors use separation for recovering those units from the ordered stream, reserving page segmentation for the geometric operation. That distinction makes it possible to ask how well the proposed stage works when the preceding stage has done its job.

What page layout can establish

Document layout analysis identifies regions on a page and may assign categories to them. Those regions provide the input for subsequent operations such as OCR. If they capture the wrong text, or if the regions are visited in the wrong order, later stages inherit the mistake. The authors take coarse layout analysis as an existing capability and ask how much further a system should try to go using geometry alone.

One family of methods starts with the page and divides it into smaller regions. The paper discusses recursive XY cuts as a classical example, along with variations that improve preprocessing or recover reading order. Such methods can work quickly on clear layouts where the divisions between columns or blocks are easy to see. At the scale of a directory entry, however, a visual gap may be missing or ambiguous. The small regions produced by repeated cutting can then require a separate assembly stage. The paper gives the example of the NewsEye project, where similarities in text content help link fragments of historical newspaper articles and recover their order.

A second family starts with fine page elements and assembles them. Docstrum, discussed in the paper as an early example, groups neighboring components using measurements related to skew and spacing within and between lines. Other approaches discussed by the authors classify parts of a page using pixel intensities or features designed to capture visual shape and texture. Deep learning systems can learn features from page images and use them to produce regions of varied shapes. The authors see these approaches as useful for establishing regions that a later operation can interpret. The distinction is important for a directory because all the lines in a column can belong to the same kind of page region while serving different purposes within individual entries.

The NewsEye benchmark came closest to the authors' task in the related work they surveyed. Its simpler newspaper setting uses regular columns without images or tables, and the objective is to assemble detected lines into coherent blocks. The resemblance explains why line grouping is a relevant comparison. The paper also identifies a difference in the cues available. Newspaper articles can be set apart by conspicuous white space or horizontal and vertical rules. Directory entries are brief and follow recurring patterns of wording and punctuation, with capitalization, line breaks and indents all carrying information. A benchmark tailored to entries can test those cues at the scale at which they are used.

How earlier work combined what a document says and shows

The paper describes several approaches to vision and language that integrate layout with text. One combines a spatial map of text representations with image information in a convolutional network for page segmentation. Another represents text segments as nodes in a graph and uses their visual and textual surroundings to help extract key information. In both cases, the surrounding document structure contributes evidence that would disappear if the transcription were read as an unadorned string.

The LayoutLM line of work brings page geometry into a BERT-based architecture. As described in the paper, a token can be represented by its text, the coordinates of its bounding box and a patch of the image. The coordinates help express where it stands in relation to other items. The patch can convey appearance, including visual properties of the print. Training before adaptation to a specific task gives the network experience using these inputs together. The paper places that approach in a family of systems developed for tasks including form and receipt understanding and document classification.

CharGrid offers a different comparison. It represents characters in the page image by assigning character information to the pixels inside their bounding boxes. An object detector can then operate on the spatial arrangement of that coded image. The paper presents this as a good fit for single-page administrative documents such as invoices, where the placement of information is especially useful. Directories suggest reversing the direction of the conversion. Their text already forms a natural sequence, so the authors keep the sequence and turn a few visual observations into items that can travel along it.

The paper also discusses the Document Attention Network, which produces structured output from a document image in an integrated recognition process. The authors point to the difficulty of training such a system, working with several pages together and making a correction at an intermediate point. A column position is their example of something a historical digitization workflow may need to fix. With separate layout and entry stages, that correction has a place to enter before the downstream system is called. The experiments investigate the entry stage in that modular design.

Why an entity tagger is a starting point

Named entity recognition already provides a way to turn a sequence into labeled spans. Its customary targets are portions of text such as people, places or organizations. Early approaches reviewed in the paper use dictionaries and hand-built rules for recurring word patterns. The supervised approaches discussed there learn from examples, and the BERT-based approach assigns labels using a representation of each token in its surroundings.

An entry has a beginning and an end in much the same practical sense that a name or a street address does. It is usually larger and contains several kinds of information, but its boundaries still occupy positions in a sequence. The authors can therefore borrow the machinery of sequence labeling and change the targets. The initial task is to identify the edges of an entry. The joint task adds entity labels inside those edges. The distinctive step is to let the sequence include visible features of the printed lines, so that both tasks have access to what survives of the page's layout.

The method, step by step

From page regions to an ordered transcription

The process begins with scans whose columns can be recovered reliably. In practice, the authors describe using a top-down split suited to the documents, followed by line detection from the OCR system. They use that system's line extractor because they observed worse recognition when pairing the recognizer with other detection techniques. The line detector and recognizer are part of the upstream workflow, and the boundary experiments start from the structure that workflow supplies.

For each detected line, the pipeline can keep the transcription, its location and the larger region it belongs to. In the experiments, the relevant larger regions are columns, and OCR is run column by column. The line location carries information that the character string itself cannot express. A system can tell how far the printed text starts from the column edge or how much room it leaves on the right because it still has the line and column geometry.

The reading order turns these transcriptions into successive parts of a single stream. A move to a new column changes where the text is on the page. In the stream, it tells the system how two pieces of text follow each other. That representation makes it possible to pose the same boundary question at a column change as at a change of line. It also lets the authors describe the input across pages without making the physical page the object that receives an entry label.

From scanned directory columns to labeled entries

The steps in order.

From scanned directory columns to labeled entriesStep 1: Detect columns and establish reading order1. Detect columns and establish reading orderStep 2: Recognize text and retain line positions2. Recognize text and retain line positionsStep 3: Measure spaces and identify breaks3. Measure spaces and identify breaksStep 4: Convert spacing measurements into categories4. Convert spacing measurements into categoriesStep 5: Insert layout markers among the words5. Insert layout markers among the wordsStep 6: Tokenize the combined sequence6. Tokenize the combined sequenceStep 7: Predict entry boundaries and optional entity labels7. Predict entry boundaries and optional entity labels

Encoding the breaks and spaces

A break marks a transition in the transcription. The method description illustrates the idea with distinct strings for line and column breaks. In the experimental vocabulary, the authors specify a common <break> token for transitions including a new line, a new column or a new page. The token records that the transcription crossed a physical boundary. The classifier learns when that information is associated with the beginning or end of a record.

The blank space before a line and the blank space after it have different possible roles. A gap on the left can reflect an indent. A gap on the right can show that the printed text ends well before the edge of the column. Either may be informative in a directory, but their interpretation depends on the writing and the local layout. For instance, a short line with ample space after it may be a completed record or the final line of a wrapped record. It can be useful to know whether the following line starts with text that looks like the opening of another entry.

The paper tests absolute and relative measures of space. An absolute measurement describes a line edge in relation to the surrounding layout. The experiment description expresses the distance from the line border to the column border as a proportion of the column width. A relative measurement describes the shift from the preceding line on the same side. This can convey a change of alignment even when indents of the same apparent size serve different functions in different parts of a volume. The descriptions of the measurements refer to line width in one place and column width for absolute distances in another. The bins below are the thresholds given in the paper, independent of that variation in how it describes normalization.

The authors transform a continuous space measurement into a small number of categories. They chose the thresholds manually using the training set alone. For absolute spacing, they aimed to distinguish clear cases of little or no indentation from clear indentation, with an intermediate range for ambiguous measurements. For the relative left edge, the intended distinction is between a meaningful shift in either direction and a small change.

rβ‚— ∈ ]βˆ’βˆž;βˆ’0.01[, [βˆ’0.01;+0.01[, or [+0.01;+∞[

Here rβ‚— is the relative left spacing value, a signed change at the left edge compared with the preceding line. The subscript β‚— identifies the left side, and ∈ means that the value belongs to one of the displayed intervals. The minus and plus signs indicate the direction of the change. The semicolon divides a lower limit from an upper limit. An inward-facing square bracket includes a finite endpoint, and an outward-facing bracket excludes it. The infinity symbols denote unbounded ends. The middle category includes βˆ’0.01, while the upper category begins at +0.01.

aβ‚— ∈ [0.00;0.02[, [0.02;0.08[, or [0.08;1.00]

Here aβ‚— is the absolute left spacing value on the normalized scale, with β‚— again indicating the left edge. The symbol ∈ assigns that value to an interval, and the semicolon separates its endpoints. An opening [ at the lower end includes that value. At the upper end, [ excludes the endpoint and ] includes it. Thus the boundary 0.02 belongs to the middle category and 0.08 belongs to the highest category, which includes the upper limit 1.00.

aᡣ ∈ [0.00;0.05[, [0.05;0.08[, or [0.08;1.00]

Here aᡣ denotes normalized absolute space at the right edge, indicated by the subscript ᡣ. The membership sign ∈ and the semicolons and brackets have the same interval meanings. The lower right-space category extends from 0.00 up to the excluded endpoint 0.05. The middle category starts at 0.05 and ends before 0.08, where the highest category begins. The final ] includes 1.00. The authors display a distribution for relative right spacing as well, but the experiments use the absolute measure on that side.

A token such as <lhspace-x> encodes a left-space category, and <rhspace-y> encodes a right-space category. In these token names, x and y are integer category identifiers. The identifier stands for a range of space measurements rather than carrying the original measurement as a continuous input. The authors mention direct encoding of numeric values as another possibility. Here, the small categorical vocabulary keeps the added input simple and lets the classifier learn from repeated instances of the same category.

The method can include spacing tokens even where the measured gap is zero. The annotation discussion explains why that can be useful. If a spacing token is always supplied at the edge of a line, it can receive a boundary label even when the line is flush with the surrounding layout. The authors describe reserving a zero-width category as a design option. In the experimental intervals for absolute spacing, zero belongs to the lowest bin.

Placing the cues in the same sequence as the words

The cues become useful to the encoder when each appears near the text it describes. A left-space marker goes before the line's content. Right space describes the line ending, and the break records the transition out of the line. The insertion position supplies a cue of its own. It indicates which text the space or break belongs to, even though the input no longer contains the original polygons.

The authors illustrate this with a line containing a cutler's entry. The OCR produces recognizable words and a noisy rendering of the address. The geometric measurements still indicate little blank space before the text and a substantial gap after it. With those cues in the stream, the system can learn from the shopkeeper's name and occupation together with the spacing pattern, even when the address is imperfectly transcribed. The example also makes clear what survives the conversion. The sequence retains a distinction between small and large spaces, along with their positions relative to the text. The underlying image and the precise measurement are left upstream.

The ordinary text undergoes subword tokenization. The tokenizer uses a learned vocabulary to break a string into pieces and looks up the identifier associated with each piece. It can express a name using several pieces even if the complete name has no entry of its own in the vocabulary. CamemBERT uses SentencePiece for this representation. The vocabulary is extended so that a reserved marker for spacing or a break is recognized as a unit. The encoder can then acquire input weights for the new items while starting with its existing learned weights for the familiar text tokens.

This design preserves the sequential role of the layout signals. Suppose a word at the beginning of a line is consistent with the start of a person's name, while the preceding line has a long blank tail. Those clues appear close together in the sequence. When the word looks more like a continuation of an address, the same amount of blank space may support a different decision. The cues enter the encoder as items that can contribute context. Their presence alone does not predetermine the output labels.

The paper also describes a version of the sequence with the words removed. A <textline> token takes the place of the textual content between successive indents. The sequence still represents the existence of each line, the breaks and the spaces, but it hides the names, activities, street information and punctuation that the text system could use. This is the input in the layout-only experiment. It keeps the task in the same general sequence-classification framework while changing the information available to solve it.

The proposal leaves room for other visual markers. The authors mention page structure, vertical gaps and graphical elements such as rules or bullets. They also describe the possibility of enclosing a styled run of text with markers that indicate where the style starts and ends. The same idea could use style attributes recovered from a native digital document after establishing its reading order. These are ways to extend the representation. The directory experiments use breaks and horizontal spacing.

Assigning a label to an entry edge

The combined sequence goes to an encoder built around a Transformer and attention. Attention lets the representation at a token incorporate evidence from other tokens in the input. The encoder can use text and layout on either side of a candidate boundary within the sequence it receives. This is appropriate for deciding whether a line is the start of something, because the evidence may include the shape of what came before as well as the words that come next.

A classification layer maps each output representation to a label. The main boundary labels are EBEGIN and EEND, which mark the start and end of an entry. One token carries each reference marker in the separation task. The authors prefer to mark both ends of a record because a real input stream can contain material that should be left out of the extracted entries. A pair of labels can describe a span of interest with other items outside it. A system trained merely to insert cuts would describe a partition and would need some further decision about which parts to retain.

The location chosen to carry a label is part of how the task is defined. In most of the separation-only settings, the labels sit on text tokens. Layout tokens give the classifier additional evidence, while the start and end labels still refer to positions in the text. The layout-only setting has no ordinary word tokens, so its boundaries are represented in that different input sequence. In the first joint experiment, the spacing markers take an explicit role in the output: the left-space token can carry the start label and the right-space token can carry the end label.

Giving entry edges and entities their own positions

Joint prediction creates a problem that is easy to see at the opening of an entry. Suppose the first word is part of a person's name. The corresponding token lies both at the start of the directory record and inside the name. Under a system that predicts a single label at each position, it needs a way to express both facts. The same issue can arise with an activity at the start or an address at the end.

Experiment 2.1 uses two nearby input positions. It puts the entry boundary on the spacing marker and the entity annotation on the text. A line's left-space marker can receive EBEGIN, while the following pieces of a person's name retain their entity labels. Similarly, a right-space marker can receive EEND without taking the position used to label the final text. The type of blank space and the question of whether that position marks a boundary remain distinct. The first is an input category, and the second is the answer the system learns to predict.

Experiment 2.2 gives the classifier a vocabulary of combined labels on the text itself. At the opening of an entry, an activity label can be paired with EBEGIN in one category. A combination is then a distinct prediction compared with an activity on its own or with another kind of entity at an edge. This approach can preserve the fact that the same text position has both roles. It also requires the classifier to learn a larger inventory of target labels.

Both designs use a single encoder to learn the structure of the surrounding entry and the entities within it. The paper notes that a system could instead use hierarchical or multiple labels at each position, with the corresponding changes to the labels or architecture. The experiments compare the two single-classifier designs described above. This makes the special spacing tokens part of the annotation policy as well as a way to tell the encoder about the page.

Training on the directory stream

The starting point is a public CamemBERT variant already trained on noisy OCR from the same trade directories. Its preliminary training uses masked prediction, in which the network learns to infer hidden text from its context. That training gives it experience with the language and recurring structures of the collection before it sees labels for entry starts and ends. The paper specifies that the starting network had not been trained to recognize named entities in these directories.

During fine-tuning, each experimental setting gets the sequence appropriate to its input vocabulary and labeling policy. Training batches contain randomly cropped sequences of variable lengths. This exposes the network to portions of the stream whose extent is determined by the sampling procedure. The token labels supply the supervision within those portions. The paper uses a limit of 7500 training steps per network, evaluates the F-score every 300 steps, and stops training after 5 consecutive evaluations without improvement.

η = 10⁻⁴

Here η is the learning rate for AdamW, the optimizer the authors use to update the network. The equals sign gives the configured value, and 10⁻⁴ means ten raised to the negative fourth power.

λ = 10⁻⁡

Here λ is the weight decay setting, which controls the strength of the decay applied to the weights during optimization. The equals sign gives the configured value, and 10⁻⁡ means ten raised to the negative fifth power. Each experiment is run 3 times with different random seeds, and the reported results average the runs.

Experiments and results

What is in the benchmark

The dataset extends an existing collection of annotated Paris trade directories. The directories come from different publishers and have been digitized independently by libraries in Paris, with varying quality. The material includes lists carrying social and geographical information. In one example from the Didot directory of 1854, an entry records a person's name, title and work at a conservatory, followed by a street and number. The annotations can describe those pieces of information and also identify the extent of the entry that contains them.

There are 80 annotated pages containing 8,900 directory entries. The paper reports 1.4 lines per entry on average and says that most entries occupy a single line. The data are split by page, with 80% assigned to training, 15% to testing and 5% to validation. The test pages therefore provide a way to examine predictions on held-out pages of the collection. The distribution of entry lengths matters when comparing systems. A printed line and an entry coincide frequently enough that a rule treating them as equivalent will already recover a substantial share of the target positions.

The annotations are prepared on clean text, while the system is evaluated on raw OCR. To use the labels, the authors project the annotated spans onto the corresponding positions in the noisy transcription. This allows a correctly placed boundary to receive credit even when the transcribed wording includes errors. The projection also has a practical cutoff. Severe recognition errors can prevent alignment, and the affected items are dropped. The test consequently measures boundary and entity labeling on the alignable portion of the noisy OCR, with the reading order taken as correct.

The authors release the benchmark under an open license and make the accompanying implementation and experimental results available through the SODUCO project. The benchmark gives subsequent comparisons a way to hold the document material and annotation task fixed while changing what the input includes or how the labels are assigned.

What counts as a correct boundary

The evaluation checks positions exactly. For an entry start, the predicted start marker must land on the expected token position. An end marker is checked against its own reference position. If a prediction is close to the reference but assigned to the wrong token, the protocol treats it as an error. This is a way of measuring whether the resulting record would include the intended extent of text. It also keeps a small positional error from being absorbed into a score for general overlap.

Precision describes how many of the predicted boundaries match a reference. Recall describes how many reference boundaries the system recovers. The reported macro boundary F-score combines the average precision and recall for the EBEGIN and EEND classes across the runs. The paper describes that combination as their harmonic mean, which gives a high score when the system achieves both high precision and high recall. The boundary score therefore represents performance on the two kinds of edge. An evaluation that counted complete recovered entries would ask a further question about whether the two correct edges have been paired for a given record.

Named entities are also checked by span. The reference start and end have to match, and the entity is the unit used for scoring regardless of how many tokens it contains. A multi-token street name counts as an entity, so a prediction that covers only part of it fails the exact-span test. The authors use SeqEval to compute the reported measures.

The paper contrasts this evaluation choice with the coverage measure used for the NewsEye newspaper competition and drawn from READ-BAD. Coverage is designed for a different question about the extent of detected lines and can accommodate some displacement or fragmentation. The authors want the directory metric to answer whether a boundary is at the annotated position. Using token positions directly also avoids a separate matching procedure for geometric regions.

Layout and text as separate baselines

A simple rule that predicts an entry boundary for every line would reach an F-score of 83.3% on this dataset, according to the paper. This gives a reference for judging more flexible systems. For an entry that wraps, the rule introduces a cut at a typographic transition inside a record. The prevalence of single-line entries explains why it can still score well overall.

Experiment 1.1 keeps the words in reading order and leaves out the visual markers. It reaches a test boundary F-score of 96.4% on noisy OCR. The transcribed content alone therefore gives a strong basis for separation. The encoder can exploit patterns in how entries are written, without seeing the original line endings as break tokens. A change in the type of wording, a recurrent piece of punctuation or the opening of a fresh name can carry evidence about where a new record starts.

Experiment 1.7 uses the complementary input. The words are replaced by placeholders for their lines, while breaks and structural spacing tokens remain. This configuration reaches a test boundary F-score of 98.2%. The system can recover many boundaries from the sequence of line shapes and transitions. Its performance also shows why the learned layout-only setting is a meaningful baseline in its own right. It has access to more structure than the rule that turns every printed line into an entry.

The results when the evidence is combined

The authors add breaks and then combinations of space markers to the text sequence in experiments 1.2 through 1.6. They report a steady improvement across the progressive addition of layout cues, with a best separation-only test F-score of 99.0%. A configuration using breaks and absolute left and right spacing reaches that score. The paper reports the same score for the corresponding variant with relative left spacing. Both retain the ability to use the words in deciding which breaks and spacing changes matter.

The highest boundary F-score reported anywhere in the paper is 99.2% on the test split in experiment 2.1. This system uses text and layout, trains for boundaries and entities together, and places its boundary labels on spacing tokens. The authors also report good entity recognition for this setting. Experiment 2.2 shows that the predictions can be made with joint labels on text tokens, but the paper describes that setup as harder to bring to convergence and reports lower performance. The numerical results stated in the discussion support the boundary comparison, while the account of named entity recognition is qualitative.

Exact entry-boundary F-score on the Paris trade directories test split

The highest boundary score comes from joint tagging with entry edges assigned to spacing tokens.

Exact entry-boundary F-score on the Paris trade directories test splitText only: 96.4Text only96.4Layout only: 98.2Layout only98.2Best combined input for separation alone: 99.0Best combined input for separation alone99.0Joint tagging with boundary labels on spacing tokens (this paper): 99.2Joint tagging with boundary labels onspacing tokens (this paper)99.2
The numbers
System or settingF-score %
Text only96.4
Layout only98.2
Best combined input for separation alone99.0
Joint tagging with boundary labels on spacing tokens (this paper)99.2

The chart compares scores for boundary detection, even in the row for joint tagging. The entity task is additional supervision and an additional output in that setting. Its entity scores would answer a different question about the recovery of names, activities, locations and other annotated spans. The comparison is therefore useful for seeing how much boundary performance the joint system achieves while bearing that extra responsibility. It also needs to be read in light of how the position carrying a boundary changes in the joint setting.

What the ablations show

Words and layout answer overlapping questions

The text-only and layout-only settings isolate different kinds of evidence. The strong text-only result establishes that the transcription contains much of what the separator needs. This makes sense for records written in recurrent forms. Even with recognition noise, a sequence can contain enough of a person's name, an activity, a location or punctuation to suggest how the record is organized. The result is specific to text processed by a starting encoder already familiar with noisy OCR from these directories.

The layout-only comparison shows how much of the editorial structure is repeated in print. The network sees a placeholder for the line, the position of a break and categories of left and right space. With a sequence of those items, it can use an alignment change or a pattern of line endings to infer which lines belong together. The authors attribute the strength of this setting to the brevity of most entries and the system's ability to learn patterns across the sequence. For longer units, they expect layout alone to be less informative. That is an interpretation of why this experiment works and a qualification on where its outcome might apply.

The separate baselines also put the combined system in perspective. Either source of evidence already supplies many of the right decisions. The best separation-only system improves on both under the paper's metric, which supports using text and layout together. The experiment reports aggregate results, so it leaves room for several explanations of individual gains. A spacing marker may resolve a case whose words are ambiguous, while a recurring phrase may prevent a misleading break from being treated as an entry ending. The measured comparison establishes the joint benefit on the benchmark. It leaves the distribution of such cases across publishers or kinds of entry open.

How the choices about space matter

The staged additions begin with the generic break marker. In the text-only sequence, the classifier has to infer the structure of the print from the words it receives. Supplying a break marks where the transcription crosses a physical division. Adding the spaces then gives it a description of the lines on either side of that division. The paper's progressive comparisons test whether those more specific observations help within the same general token-classification approach.

Absolute and relative spacing provide distinct descriptions of the layout. Absolute space captures the margin left by the printed line. Relative space captures how that margin changes from the preceding line. A series of lines can have a consistent absolute offset while registering little relative change. A line aligned close to the column edge can show a meaningful relative change if its predecessor was set farther in. The paper's comparison makes it possible to ask whether one of these descriptions is more effective in the presence of the other cues.

The best reported F-score is tied between the absolute and relative left-space variants in the separation-only experiments. The authors interpret the tie as evidence that the network can obtain similar information from either form in these documents. An overall tie leaves open whether the systems assign the same labels to particular entries. In a regular part of a column, a familiar indent may be easy to recognize in absolute terms. Elsewhere a change from the preceding line may be informative even when the indent belongs to an intermediate range. The study reports the two descriptions at the level of aggregate performance.

The experiments use manually chosen categorical bins throughout these comparisons. They show that a coarse description of the spaces can be enough for this task. The paper leaves continuous values and alternative threshold choices outside the comparison. Likewise, it shows the training distribution of relative right space but reserves the right side of the experimental input for absolute spacing. The result supports the tested vocabulary in this corpus, with further evidence needed to choose among those other representations.

A visual token can carry an output decision

The joint task compares two ways to handle labels that overlap. Experiment 2.1 places an entry boundary on a spacing token and leaves the adjoining text available for entity labeling. Experiment 2.2 needs a combined category when the same word carries both the entry edge and an entity label. The paper reports a harder training process and lower performance for the combined categories. The best boundary score comes from using the spacing markers as dedicated positions for the entry labels.

This comparison reveals a second role for the visual input. A spacing token can tell the network about the page, and it can also provide a convenient place to ask the network a question about structure. With a separate token for each role in the joint setting, the label for the adjoining word can remain a name, activity or location label. Expressing the overlap through combined categories asks the classifier to distinguish more outcomes. It is plausible that the extra distinctions contribute to the training difficulty described by the authors, particularly when a given combination occurs infrequently. The paper reports the difficulty of convergence and leaves label-frequency effects unmeasured.

There are several changes bundled into the joint comparisons. Adding the entity task changes the supervision. Moving the entry labels changes which input positions receive credit. Using combined labels changes the target inventory. The improvement from the best separation-only result to experiment 2.1 therefore describes the outcome of the whole configuration. It cannot assign the improvement to entity supervision on its own. The paper also explains why it omits a text-only joint setting with ordinary, separate labels. In its setup that comparison would require another output head, bringing extra weights into the experiment. The evidence supports a practical single-network arrangement on this benchmark and leaves the effect of joint learning in a parameter-matched comparison open.

Limitations

Limits identified by the authors

The authors assume that coarse layout analysis has already found the columns and established the reading order. Their experience with the printed pages leads them to treat that stage as reliable for these experiments. They also acknowledge that an upstream mistake can cause errors to cascade. If adjacent columns are read in the wrong order, for example, the separator receives a sequence in which words that were never neighbors have been placed together. It must operate on that order, and the study does not measure its ability to correct it. The boundary F-scores describe the labeling stage under the layout assumption.

Raw OCR makes the setup realistic within a range of transcription quality. The authors explicitly qualify the range by describing the projection from clean annotation to noisy text. When OCR is poor enough that the reference span cannot be aligned, the item falls outside scoring. A full assessment of a digitization system would also need to account for items that reach the separator in that condition, as well as material missed by line or column detection. The paper calls for measuring those earlier sources of error when estimating global performance.

The paper also qualifies the layout-only finding by noting the short entries in the dataset. A sequence of indentation and break patterns is especially useful when a large fraction of the records fit on a line. For material with longer content units, the relationship between line shape and record structure may be looser. Dictionaries and newspapers help motivate the task, but the experiments establish the results on directories. The paper's suggestion that an ordered stream can help with units spanning columns or pages describes an affordance of the representation. The experiments do not provide a dedicated score for those crossings.

Limits visible in the experimental design

The benchmark has variation in publisher, date, layout and digitization quality. The split is defined by page within the collection. The paper does not describe an evaluation that withholds an entire publisher or tests on a different document genre. Additionally, the starting CamemBERT variant has already seen noisy text from these trade directories during pretraining. This is a sensible starting point for building a tool for the collection. Transfer to an unfamiliar collection, or the amount of labeled data needed when starting from an encoder unfamiliar with historical OCR, remains an empirical question.

The headline results compress performance over entry starts and ends and over experimental runs. They leave open how errors are distributed across single-line and multiline entries, across usable and heavily degraded OCR, and across different indexing conventions. An exact boundary score can be high even if a small class of entries remains difficult. The average length and the baseline based on printed lines explain why such distinctions matter. A test focused on continuation lines would address a part of the problem whose difficulty might be obscured by the prevalence of single-line records.

Annotation choices also shape the meaning of an exact match. In the joint system with spacing labels, the reference position is a visual token associated with an edge of a line. In settings with text labels, it is a position among the recognized pieces of a word. Each policy can support the intended separation, but the labels express the decision through different anchors. The reported precision, recall and F-score are scores under those policies. They do not separately establish the rate of complete, correctly assembled database records, including whether each entity was correctly extracted and associated with its entry.

The geometry encoding deliberately discards detail. A token identifies a spacing range, with all positions inside that range receiving the same category. A common break token signals a transition, while specialized geometry and appearance remain upstream. The design succeeds with the cues the authors selected for this material. Its results leave open how useful the proposed graphical and style tokens would be, how portable the spacing thresholds are, and how the edge labels behave where meaningful boundaries have no corresponding spacing position.

Finally, the authors argue that adaptation is comparatively light and that predicting entities and entry edges together can save repeated computation. The benchmark shows that a single classifier can produce both kinds of output and reports the training settings that made those runs possible. Timing, annotation effort and comparisons with page-image systems are outside the measurements used to support the headline scores. Similarly, an ordered stream can extend beyond a page, but the training protocol uses cropped sequences. The results leave the effects of context length and the handling of records at sequence joins open.

What came after

No subsequent study is documented as extending or testing this method. The paper itself suggests broadening the vocabulary to encode visual properties such as type style and applying the same scheme to documents whose reading order and style can be recovered from digital files. It also suggests that joint tagging can help extract structured content from a stream that continues across physical page divisions. Those proposals describe directions for extending the approach. The reported evidence comes from the trade-directory experiments, where the central question was whether a few markers of printed layout could help recover entries from noisy text.

Cite

Cite as Bertrand Dumenieu, Edwin Carlinet, Nathalie Abadie, Joseph Chazalon LaDeHiS, CRH, EHESS, France, EPITA Research Laboratory, France, Univ. Gustave Eiffel, IGN-ENSG, LaSTIG and France). 2023. Entry Separation using a Mixed Visual and Textual Language Model: Application to 19th century French Trade Directories. arXiv:2302.08948.

The paper itself, not this page. BibTeX from the library's record of the work. DOI 10.48550/arxiv.2302.08948 Β· arXiv 2302.08948

@misc{dumenieu2023entry,
  title = {{Entry Separation using a Mixed Visual and Textual Language Model: Application to 19th century French Trade Directories}},
  author = {Bertrand Dumenieu, Edwin Carlinet, Nathalie Abadie, Joseph Chazalon LaDeHiS, CRH, EHESS, France, EPITA Research Laboratory, France, Univ. Gustave Eiffel, IGN-ENSG, LaSTIG and France)},
  year = {2023},
  doi = {10.48550/arxiv.2302.08948},
  eprint = {2302.08948},
  archivePrefix = {arXiv},
  url = {https://doi.org/10.48550/arxiv.2302.08948}
}

↑ back to top

This page in Markdown https://md.research.elamur.ai/free/en/papers/dumenieu-2023-entry-separation-using-mixed-visual/

References

48 references, from the paper's own bibliography.

  1. Abadie, N., Carlinet, E., Chazalon, J., DumΓ©nieu, B.: A benchmark of named entity recognition approaches in historical documents - application to 19$^{th}$ century french directories. In: Uchida, S., Barney, E., Eglin, V. (eds.) Proc. of Document Analysis Systems. DAS 2022. Lecture Notes in Computer Science, vol. 13237. Springer, Cham (May 2022). OpenAlex β†— Β· Scholar β†—
  2. Binmakhashen, G.M., Mahmoud, S.A.: Document layout analysis: a comprehensive survey. ACM Computing Surveys (CSUR) 52(6), 1–36 (2019) OpenAlex β†— Β· Scholar β†—
  3. Chen, K., Seuret, M., Hennebert, J., Ingold, R.: Convolutional neural networks for page segmentation of historical document images. In: 2017 14th IAPR International Conference on Document Analysis and Recognition (ICDAR). vol. 1, pp. 965–970. IEEE (2017) OpenAlex β†— Β· Scholar β†—
  4. Chen, K., Wei, H., Hennebert, J., Ingold, R., Liwicki, M.: Page segmentation for historical handwritten document images using color and texture features. In: 2014 14th International Conference on Frontiers in Handwriting Recognition. pp. 488–493. IEEE (2014) OpenAlex β†— Β· Scholar β†—
  5. Chi, Z., Huang, H., Xu, H.D., Yu, H., Yin, W., Mao, X.L.: Complicated table structure recognition. arXiv preprint arXiv:1908.04729 (2019) OpenAlex β†— Β· Scholar β†—
  6. Coquenet, D., Chatelain, C., Paquet, T.: DAN: a segmentation-free document attention network for handwritten document recognition. IEEE Transactions on Pattern Analysis and Machine Intelligence pp. 1–17 (2023). OpenAlex β†— Β· Scholar β†—
  7. Devlin, J., Chang, M.W., Lee, K., Toutanova, K.: BERT: Pre-training of deep bidirectional transformers for language understanding. In: Proc. of NAACL-HLT. pp. 4171–4186 (2019) our card
  8. Diem, M., Kleber, F., Sablatnig, R.: Text classification and document layout analysis of paper fragments. In: 2011 International Conference on Document Analysis and Recognition. pp. 854–858. IEEE (2011) OpenAlex β†— Β· Scholar β†—
  9. Fischer, A., Baechler, M., Garz, A., Liwicki, M., Ingold, R.: A combined system for text line extraction and handwriting recognition in historical documents. In: 2014 11th IAPR International Workshop on Document Analysis Systems. pp. 71–75. IEEE (2014) OpenAlex β†— Β· Scholar β†—
  10. Garz, A., Diem, M., Sablatnig, R.: Detecting text areas and decorative elements in ancient manuscripts. In: 2010 12th International Conference on Frontiers in Handwriting Recognition. pp. 176–181. IEEE (2010) OpenAlex β†— Β· Scholar β†—
  11. Garz, A., Sablatnig, R., Diem, M.: Layout analysis for historical manuscripts using sift features. In: 2011 International Conference on Document Analysis and Recognition. pp. 508–512. IEEE (2011) OpenAlex β†— Β· Scholar β†—
  12. GrΓΌning, T., Leifert, G., Strauß, T., Michael, J., Labahn, R.: A two-stage method for text line detection in historical documents. International Journal on Document Analysis and Recognition (IJDAR) 22(3), 285–302 (2019) OpenAlex β†— Β· Scholar β†—
  13. GrΓΌning, T., Labahn, R., Diem, M., Kleber, F., Fiel, S.: READ-BAD: A New Dataset and Evaluation Scheme for Baseline Detection in Archival Documents. In: 2018 13th IAPR International Workshop on Document Analysis Systems (DAS). pp. 351–356 (Apr 2018). OpenAlex β†— Β· Scholar β†—
  14. Gu, Z., Meng, C., Wang, K., Lan, J., Wang, W., Gu, M., Zhang, L.: Xylayoutlm: Towards layout-aware multimodal networks for visually-rich document understanding. In: Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition. pp. 4583–4592 (2022) OpenAlex β†— Β· Scholar β†—
  15. Ha, J., Haralick, R.M., Phillips, I.T.: Recursive xy cut using bounding boxes of connected components. In: Proceedings of 3rd International Conference on Document Analysis and Recognition. vol. 2, pp. 952–955. IEEE (1995) OpenAlex β†— Β· Scholar β†—
  16. Hao, Y., Song, H., Dong, L., Huang, S., Chi, Z., Wang, W., Ma, S., Wei, F.: Language models are general-purpose interfaces. , http://arxiv.org/abs/2206.06336 OpenAlex β†— Β· Scholar β†—
  17. Harley, A.W., Ufkes, A., Derpanis, K.G.: Evaluation of deep convolutional nets for document image classification and retrieval. In: 2015 13th International Conference on Document Analysis and Recognition (ICDAR). pp. 991–995. IEEE (2015) OpenAlex β†— Β· Scholar β†—
  18. Hong, T., Kim, D., Ji, M., Hwang, W., Nam, D., Park, S.: Bros: A pre-trained language model focusing on text and layout for better key information extraction from documents. In: Proceedings of the AAAI Conference on Artificial Intelligence. vol. 36, pp. 10767–10775 (2022) OpenAlex β†— Β· Scholar β†—
  19. Huang, Y., Lv, T., Cui, L., Lu, Y., Wei, F.: Layoutlmv3: Pre-training for document ai with unified text and image masking. In: Proceedings of the 30th ACM International Conference on Multimedia. pp. 4083–4091 (2022) our card
  20. Huang, Z., Chen, K., He, J., Bai, X., Karatzas, D., Lu, S., Jawahar, C.: Icdar2019 competition on scanned receipt ocr and information extraction. In: 2019 International Conference on Document Analysis and Recognition (ICDAR). pp. 1516–1520. IEEE (2019) OpenAlex β†— Β· Scholar β†—
  21. Jaume, G., Ekenel, H.K., Thiran, J.P.: Funsd: A dataset for form understanding in noisy scanned documents. In: 2019 International Conference on Document Analysis and Recognition Workshops (ICDARW). vol. 2, pp. 1–6. IEEE (2019) OpenAlex β†— Β· Scholar β†—
  22. Kat ti, A.R., Reisswig, C., Guder, C., Brarda, S., Bickel, S., HΓΆhne, J., Faddoul, J.B.: Chargrid: Towards Understanding 2D Documents (Sep 2018), https://arxiv.org/abs/1809.08799v1 OpenAlex β†— Β· Scholar β†—
  23. Kudo, T., Richardson, J.: SentencePiece: A simple and language independent subword tokenizer and detokenizer for Neural Text Processing. In: Proceedings of the 2018 Conference on Empirical Methods in Natural Language Processing: System Demonstrations. pp. 66–71. Association for Computational Linguistics, Brussels, Belgium (Nov 2018). , https://aclanthology.org/D18-2012 our card
  24. Li, C., Bi, B., Yan, M., Wang, W., Huang, S., Huang, F., Si, L.: StructuralLM: Structural pre-training for form understanding. In: Proceedings of the 59th Annual Meeting of the Association for Computational Linguistics and the 11th International Joint Conference on Natural Language Processing (Volume 1: Long Papers). pp. 6309–6318. Association for Computational Linguistics, Online (Aug 2021). , https://aclanthology.org/2021.acl-long.493 OpenAlex β†— Β· Scholar β†—
  25. Li, J., Sun, A., Han, J., Li, C.: A survey on deep learning for named entity recognition. IEEE Transactions on Knowledge and Data Engineering 34(1), 50–70 (2020) OpenAlex β†— Β· Scholar β†—
  26. Liu, X., Gao, F., Zhang, Q., Zhao, H.: Graph convolution for multimodal information extraction from visually rich documents. In: Proceedings of the 2019 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, Volume 2 (Industry Papers). pp. 32–39. Association for Computational Linguistics, Minneapolis, Minnesota (Jun 2019). , https://aclanthology.org/N19-2005 OpenAlex β†— Β· Scholar β†—
  27. Mansouri, A., Affendey, L.S., Mamat, A.: Named entity recognition approaches. TAL 52(1), 339–344 (2008) OpenAlex β†— Β· Scholar β†—
  28. Mathew, M., Karatzas, D., Jawahar, C.: Docvqa: A dataset for vqa on document images. In: Proceedings of the IEEE/CVF winter conference on applications of computer vision. pp. 2200–2209 (2021) our card
  29. Maurel, D., Friburger, N., Antoine, J.Y., Eshkol-Taravella, I., Nouvel, D.: Casen : a transducer cascade to recognize french named entities. TAL 52(1), 69–96 (2011) OpenAlex β†— Β· Scholar β†—
  30. Meunier, J.L.: Optimized xy-cut for determining a page reading order. In: Eighth International Conference on Document Analysis and Recognition (ICDAR'05). pp. 347–351. IEEE (2005) OpenAlex β†— Β· Scholar β†—
  31. Michael, J., Weidemann, M., Laasch, B., Labahn, R.: Icpr 2020 competition on text block segmentation on a newseye dataset. In: Pattern Recognition. ICPR International Workshops and Challenges: Virtual Event, January 10-15, 2021, Proceedings, Part VIII. p. 405–418. Springer-Verlag, Berlin, Heidelberg (2021). OpenAlex β†— Β· Scholar β†—
  32. Michael, J., Weidemann, M., Laasch, B., Labahn, R.: ICPR 2020 Competition on Text Block Segmentation on a NewsEye Dataset. In: Del Bimbo, A., Cucchiara, R., Sclaroff, S., Farinella, G.M., Mei, T., Bertini, M., Escalante, H.J., Vezzani, R. (eds.) Pattern Recognition. ICPR International Workshops and Challenges. pp. 405–418. Lecture Notes in Computer Science, Springer International Publishing, Cham (2021). OpenAlex β†— Β· Scholar β†—
  33. Nadeau, D., Sekine, S.: A survey of named entity recognition and classification. Lingvisticae Investigationes 30(1), 3––26 (2007) OpenAlex β†— Β· Scholar β†—
  34. Nagy, G., Seth, S.C.: Hierarchical representation of optically scanned documents. In: " International conference on Pattern Recognition (1984) OpenAlex β†— Β· Scholar β†—
  35. Nakayama, H.: seqeval: A python framework for sequence labeling evaluation (2018), https://github.com/chakki-works/seqeval OpenAlex β†— Β· Scholar β†—
  36. Nouvel, D., Antoine, J.Y., Friburger, N., Soulet, A.: Recognizing named entities using automatically extracted transduction rules. In: 5th Language and Technology Conference. pp. 136–140. Poznan, Poland (2011) OpenAlex β†— Β· Scholar β†—
  37. O'Gorman, L.: The document spectrum for page layout analysis. IEEE Transactions on pattern analysis and machine intelligence 15(11), 1162–1173 (1993) OpenAlex β†— Β· Scholar β†—
  38. Oliveira, S.A., Seguin, B., Kaplan, F.: dhsegment: A generic deep-learning approach for document segmentation. In: 2018 16th International Conference on Frontiers in Handwriting Recognition (ICFHR). pp. 7–12. IEEE (2018) OpenAlex β†— Β· Scholar β†—
  39. Park, S., Shin, S., Lee, B., Lee, J., Surh, J., Seo, M., Lee, H.: Cord: a consolidated receipt dataset for post-ocr parsing. In: Workshop on Document Intelligence at NeurIPS 2019 (2019) OpenAlex β†— Β· Scholar β†—
  40. Ren, S., He, K., Girshick, R., Sun, J.: Faster R-CNN: towards real-time object detection with region proposal networks. In: Proceedings of the 28th International Conference on Neural Information Processing Systems - Volume 1. NIPS'15, vol. 28, pp. 91–99. MIT Press, Cambridge, MA, USA (2015) our card
  41. Sutheebanjard, P., Premchaiswadi, W.: A modified recursive xy cut algorithm for solving block ordering problems. In: 2010 2nd International Conference on Computer Engineering and Technology. vol. 3, pp. V3–307. IEEE (2010) OpenAlex β†— Β· Scholar β†—
  42. Teklia: Nerval, a python package for NER evaluation on noisy text. online (2022), https://gitlab.com/teklia/ner/nerval OpenAlex β†— Β· Scholar β†—
  43. Vaswani, A., Shazeer, N., Parmar, N., Uszkoreit, J., Jones, L., Gomez, A.N., Kaiser, Ł., Polosukhin, I.: Attention is all you need. In: Adv. Neural Inf. Process. Syst. pp. 5998–6008 (2017) our card
  44. Wang, J., Jin, L., Ding, K.: LiLT: A simple yet effective language-independent layout transformer for structured document understanding. In: Proceedings of the 60th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers). pp. 7747–7757. Association for Computational Linguistics, Dublin, Ireland (May 2022). , https://aclanthology.org/2022.acl-long.534 OpenAlex β†— Β· Scholar β†—
  45. Xu, Y., Xu, Y., Lv, T., Cui, L., Wei, F., Wang, G., Lu, Y., Florencio, D., Zhang, C., Che, W., Zhang, M., Zhou, L.: LayoutLMv2: Multi-modal pre-training for visually-rich document understanding. In: Proceedings of the 59th Annual Meeting of the Association for Computational Linguistics and the 11th International Joint Conference on Natural Language Processing (Volume 1: Long Papers). pp. 2579–2591. Association for Computational Linguistics, Online (Aug 2021). , https://aclanthology.org/2021.acl-long.201 our card
  46. Xu, Y., Li, M., Cui, L., Huang, S., Wei, F., Zhou, M.: Layoutlm: Pre-training of text and layout for document image understanding. In: Proceedings of the 26th ACM SIGKDD International Conference on Knowledge Discovery & Data Mining. pp. 1192–1200 (2020) our card
  47. Xu, Y., Lv, T., Cui, L., Wang, G., Lu, Y., Florencio, D., Zhang, C., Wei, F.: Layoutxlm: Multimodal pre-training for multilingual visually-rich document understanding. arXiv preprint arXiv:2104.08836 (2021) OpenAlex β†— Β· Scholar β†—
  48. Yang, X., Yumer, E., Asente, P., Kraley, M., Kifer, D., Lee Giles, C.: Learning to extract semantic structure from documents using multimodal fully convolutional neural networks. In: Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition. pp. 5315–5324 (2017) OpenAlex β†— Β· Scholar β†—