May I Check Again? –- A simple but efficient way to generate and use contextual dictionaries for Named Entity Recognition. Application to French Legal Texts.
Paper · 2019 · Valentin Barriere and Amaury Fouret
Summary
A person's name can appear clearly in one part of a court decision and be much harder to recognize elsewhere. A missing space can join it to a title. A later sentence can refer to someone by first name alone. When the aim is to remove identifying information before publication, either occurrence can matter. The paper addresses this problem through named entity recognition, the task of finding passages that mention entities and assigning them categories. Its proposal, MICA, lets a system reconsider a difficult word using entities detected in nearby sentences of French court decisions.
MICA trains a first tagger to recognize entities from the wording of a sentence. When a second tagger processes a sentence, it receives extra evidence from the first tagger's predictions in the surrounding text. Those predictions form a temporary dictionary organized by entity type. For each word being tagged, MICA checks how closely its spelling resembles the strongest candidate in each category. An edit-based comparison and a measure of shared text supply the evidence. The final tagging layer uses those signals alongside what it has learned about the sentence. A close match can support a label while leaving the system free to consider the word's role in the sentence.
The evaluation uses 94 real court decisions annotated for personal names, names of court members and attorneys, addresses associated with birthplaces or residences, and dates of birth. On the held-out test set, the main baseline with representations adapted to legal text scores 94.85% F1, a measure that combines precision and recall. Adding MICA produces 96.52% F1 at the best reported context size of 128 sentences. The authors report a 32% reduction in relative F1 error. With a wider window, recall continues to improve, while a loss of precision lowers F1. The dictionary features also improve a simpler tagger that uses hand-crafted features.
The paper's examples show why it can help to look beyond a sentence. A nearby mention can supply spelling evidence for a name attached to a title without a space, or for a first name that appears in a less formal passage. The approach depends on the earlier tagger finding useful candidates, and the same spelling can turn up under conflicting entity types. The reported gains establish the value of this extra evidence on the annotated court decisions. The authors leave comparisons on other languages and open-domain datasets for future work.
Deep dive: May I Check Again? –- A simple but efficient way to generate and use contextual dictionaries for Named Entity Recognition. Application to French Legal Texts.
MICA checks nearby sentences for names and other entities, using spelling similarities to improve recognition in French court decisions. · about 33 minutes to read
The problem and its context
Recognizing every occurrence that matters
The application belongs to legal AI and begins with a practical publication problem. The authors put the annual number of decisions released by French courts at 3800k. Identifying sensitive passages by hand across that volume would take more effort than the application can reasonably rely on. An automated system needs to locate the relevant text before a later operation can replace it. The paper evaluates the locating and labelling task. Its unit of work is an occurrence in the text, such as a person's name or a date of birth.
That distinction between an occurrence and a person is important. A decision may give a person's name in a readily recognizable form at one point and use a shorter or messier form later. Finding the clear occurrence does part of the work. The later occurrence still needs a label at its own position. For de-identification, recognizing the person somewhere in the decision is of limited help if another mention remains visible. This is why the authors emphasize recall, the share of relevant entities the system finds. They also track precision, the share of the system's proposed entities that are correct, because a less selective system can mark text that should remain intact.
The target categories reflect the task for which the documents were annotated. The dataset distinguishes names of individuals from names of legal professionals, and it labels particular kinds of addresses and dates. The authors identify the personal-name, address and birth-date categories as the ones relevant to de-identification in their application. Professional names still belong to the recognition task and contribute to the evaluation. This division matters because an error can involve the category as well as the presence of a name. A system that locates a name and assigns it the professional category has made a different mistake from one that leaves the name unmarked.
The paper places the task within the wider practice of information extraction. It mentions using recognized entities to populate knowledge bases and locating sensitive information in medical and legal records. The court decisions give the authors a narrower question to test. When a sentence alone gives weak evidence about a word, can other passages in its vicinity supply evidence about the spelling and type of the entity? The method depends on what has been written and detected nearby, which means that two identical words can receive different dictionary features in different parts of a collection.
What a tagger could use before MICA
The paper describes several ways earlier systems brought knowledge to the recognition task. A rule-based system uses patterns designed by an expert. Such patterns can be precise when a document follows familiar conventions, but designing them takes work, and they can be sensitive to the domain and to noise in the text. Hybrid approaches give a statistical tagger features derived from resources such as dictionaries or linguistic rules. Those features let the tagger use a domain-specific clue alongside patterns learned from labelled examples. The authors situate dictionary features within this tradition.
The introduction also describes systems that learn representations of words and their characters. A representation supplies a vector of values to the recognizer, which can then learn which patterns help it identify and classify entities. Character information and the words around a mention give the tagger evidence beyond a lookup of its exact written form. The paper cites Contextual String Embeddings for Sequence Labeling for the approach that supplies its main baseline. It also cites Neural Architectures for Named Entity Recognition and Dissecting Contextual Word Embeddings in its account of learned representations. Neural Architectures for Named Entity Recognition · Dissecting Contextual Word Embeddings
The authors present data-intensive neural approaches as the strongest general option in the field they describe, citing BERT in that discussion. Spelling errors remain a practical reason to examine what such systems can use. A misspelling can make a familiar name look unfamiliar, and a missing space can change the unit passed to the tagger. A different difficulty arises when the style changes within a document. A formal introduction may make a name easy to recognize through surrounding words, while a later report of what someone said can place the same name in a sentence with weaker cues. The nearby text is potentially informative in both situations.
The earlier work on learning entity dictionaries poses an especially close comparison. As the authors describe it, Neelakantan and Collins sought to learn a dictionary of entities for recognition. MICA builds a fresh collection from entities predicted around the sentence it is currently processing. Its entries therefore depend on the text under consideration and on the first tagger's decisions. An entry can be useful for a particular passage even if it would have little value throughout a corpus. Conversely, a name that occurs often in the collection contributes no local evidence unless a relevant candidate appears in the selected context.
Two scales of context
In the baseline, context helps determine how to represent and label a word within its sentence. MICA adds a different use of context. It searches surrounding sentences for already recognizable examples of the kinds of entities the tagger is meant to find. Consider the difference between the words immediately around an unfamiliar first name and an earlier passage that introduced the same person formally. The first kind of evidence describes the name's local grammatical and textual setting. The second supplies a candidate whose spelling and assigned type can be checked against the current word.
The authors' decision to keep those roles separate shapes the whole procedure. The first tagger turns nearby raw text into typed candidates. A string comparison then reduces those candidates to numerical evidence for the current word. The second tagger sees that evidence at the point where it makes label decisions. This arrangement lets MICA use the ordinary sequence labelling machinery and add information from a wider span of text without requiring that machinery to process the whole span as part of the target sentence.
The method, step by step
From a first reading to a second decision
Start with a sentence whose words need entity labels. A conventional sequence tagger reads the sentence and makes a prediction at each position. MICA prepares a second source of evidence for the same task. It takes a window of sentences around the target sentence, runs the first tagger on the contextual text, and gathers the resulting entity candidates by type. A candidate enters the dictionary through a prediction, so the procedure can build the dictionary when expert labels are unavailable for the surrounding sentences.
The second stage works word by word. For a given word in the target sentence, MICA asks how closely it resembles a predicted personal name, a predicted professional name, a predicted address, and a predicted birth date. Each category contributes its own feature. A strong match in the personal-name dictionary can therefore coexist with a strong match in the professional-name dictionary. The final tagger receives both signals, together with its usual representation of the word in the sentence. The similarity calculation contributes evidence about type and leaves the final choice of a tag to the sequence labeller.
How MICA builds and uses a contextual dictionary
The steps in order.
There are two kinds of learning behind this flow. The first pass trains the ordinary recognizer, which the paper calls Vanilla in its neural experiments. The enhanced recognizer is then initialized from that trained system, apart from its final tagging layer. It learns to use the new evidence in addition to the sentence representation. The process of collecting contextual candidates is repeated for the sentences it sees. The dictionary is consequently a product of the context supplied to a tagging decision, while the system's learned parameters determine how to interpret the resulting feature values.
The paper describes the representation and the training order in enough detail to distinguish the proposed change from the underlying recognizer. The ordinary recognizer supplies both the starting weights for the enhanced system and the predictions used to produce local evidence. The features use the first recognizer's predicted categories. The enhanced recognizer has its own final layer, which works with a larger input and can learn how to weigh those categories against the evidence available inside the target sentence.
Building the ordinary word representation
The neural tagger uses word embeddings, vectors that give it numerical representations to work with. The authors stack embeddings from different sources at each word position. One source is FastText, which supplies word vectors learned before the named entity task. Another is Flair's contextual representation from a character-based bidirectional language model. A further character-based representation is trained together with the recognizer. The paper associates those components with Learning Word Vectors for 157 Languages, Contextual String Embeddings for Sequence Labeling and End-to-end Sequence Labeling, respectively. Learning Word Vectors for 157 Languages · End-to-end Sequence Labeling
The components play different roles. The FastText vector provides information learned from text outside the supervised recognition task. The Flair vector is contextual: its source reads characters in both directions, so the representation of a word can reflect its surroundings. The jointly trained character component can learn patterns that are useful for the entity labels in the training decisions. All of this happens before the dictionary features enter. A spelling irregularity can already affect or be accommodated by the ordinary word and character representations. MICA gives the final tagging layer another source of spelling evidence, drawn from concrete entity predictions in the vicinity.
wᵢ = [wᵢᶠᵃˢᵗᵀᵉˣᵗ ; wᵢᶜʰᵃʳᴮⁱᴸᴹ ; wᵢᶜʰᵃʳ]
Here i indexes a word position, and wᵢ is the stacked input vector at that position. The superscript FastText identifies the precomputed FastText representation. CharBiLM identifies the precomputed contextual representation from the bidirectional character-level language model. Char identifies the character-based representation learned during the recognition task. The brackets and separators indicate concatenation, which places the vector entries one after another. The equals sign defines the input in terms of those components.
The paper also changes where the precomputed information comes from. Its general-domain baseline uses representations learned from general text. For the legal-domain version, the authors adapt the Flair representations and train FastText using a collection of 660,000 court decisions. That collection provides text for learning representations. The much smaller annotated corpus provides examples of the entity categories and their locations. The distinction matters in interpreting the experiment. Domain adaptation changes the information supplied at the input to the recognizer. MICA changes the information supplied to the output layer using predictions near the current sentence.
From word vectors to a label sequence
The stacked word vectors pass through a bidirectional long short-term memory network, abbreviated BiLSTM or BLSTM. It reads the sequence in its forward order and in reverse. At each position, the system combines the resulting states so the representation can draw on evidence from both directions. The architecture couples this word-level network with a conditional random field, abbreviated CRF, as in the work the paper cites on bidirectional sequence tagging. Bidirectional LSTM-CRF for Sequence Tagging
rᵢ = [rᵢᶠ ; rᵢᵇ]
Here i is again the word position and rᵢ is the output vector from the bidirectional network at that position. The superscript f denotes its forward state rᵢᶠ, and b denotes its backward state rᵢᵇ. The brackets and separator indicate that the states are concatenated. The equals sign specifies the vector supplied for that word in the ordinary recognizer.
The CRF receives one observation vector per word and predicts a sequence of labels for the sentence. In a sequence labelling task, the choice at one position can be informed by neighbouring choices. A label that continues a mention, for instance, makes sense in relation to the tags marking its beginning and the rest of its span. The CRF gives the system a way to score those decisions together. MICA preserves this setup and extends the observations at each position. The dictionary does not need to produce a complete proposed labelling of the target sentence to influence the result.
The paper uses the BIO scheme for the labelled sequences. A beginning label marks the start of a mention, an inside label continues it, and an outside label identifies a token beyond the annotated mentions. Beginning and inside labels also specify the entity category. A token can receive spelling evidence for a category from the dictionary, while the tagger still has to decide whether it starts a mention, continues a mention or belongs outside one. This distinction explains why a similarity feature and an entity prediction serve different functions. Text Chunking using Transformation-Based Learning
Turning neighbouring predictions into a dictionary
Once Vanilla has been trained, it supplies entity predictions on the context associated with a target sentence. The window is measured in sentences in the experiments. The method groups candidates under the labels assigned by Vanilla. A personal-name candidate is stored with personal names, while a candidate labelled as a date of birth is stored with dates of birth. At this point the dictionary records what the first recognizer found. The second recognizer has yet to decide whether any of those candidates should affect the labels of the current sentence.
Dₛₑₙₜ = {
PER: [c₁^PER, …, c_(L_PER)^PER],
PRO: [c₁^PRO, …, c_(L_PRO)^PRO],
LOC: [c₁^LOC, …, c_(L_LOC)^LOC],
DATE: [c₁^DATE, …, c_(L_DATE)^DATE]
}
Dₛₑₙₜ denotes the dictionary for the target sentence, with the subscript sent identifying that sentence. PER designates personal names, PRO names of court members and attorneys, LOC addresses connected with birthplaces or residences, and DATE dates of birth. Each c is a candidate. A subscript gives its position in the list for its category, starting at 1 and ending at L for that category. The subscripts on L identify the corresponding category's list length. A caret marks the category superscript, and the parentheses group the final candidate index where it contains a subscript of its own. The ellipses represent intervening candidates. Braces enclose the dictionary, brackets enclose a list, colons associate categories with lists, commas separate entries, and the equals sign defines the dictionary.
The document supplies candidate strings through the first tagger's predictions. This lets the same spelling contribute evidence to different groups if the first tagger assigns different types to different occurrences. It also means there may be very different amounts of evidence for the categories. The candidate lists are tied to the target sentence and its window, so a spelling can be available when one sentence is processed and unavailable when a sentence farther away is processed. The dictionary is thus situated at a particular position in the text, even though its entries can come from several sentences.
The window controls what the second recognizer has a chance to recover. With a narrow window, an informative occurrence may lie beyond reach. With a wider one, a useful candidate may enter the dictionary together with unrelated strings. The method gathers the predictions by type and then compares spellings. It does not identify which person an occurrence refers to or give greater similarity merely because two occurrences are closer in the text. The window determines availability. The next stage determines the strength of the spelling evidence among the available candidates.
Comparing spellings within each category
For each word in the target sentence, MICA compares its written form with the candidates in each list. The first comparison is based on Damerau–Levenshtein distance. An edit distance measures how much textual change separates two strings. The Damerau–Levenshtein comparison is relevant here because it can account for character edits such as an insertion, a deletion, a substitution or the transposition of adjacent characters. The feature in the paper uses an edit-based similarity, so a higher value means that a candidate supplies a stronger match. The authors take the maximum similarity for each entity category.
The second comparison uses the longest common string. It measures shared written material between the target word and the candidate already selected as closest by the edit-based comparison. This matters for how to read the formula. The two terms come from the same selected candidate within a category, subject to any tie in the edit-based maximum. The paper does not describe a separate search for whichever candidate yields the longest shared string. The feature can therefore reflect substantial overlap even when the strings do not match exactly, while grounding that overlap in the candidate picked by the edit-based score.
sᵢ = [
maxₗ Lev(wᵢ, cₗ^PER) + LCS(wᵢ, c*^PER) ;
maxₗ Lev(wᵢ, cₗ^PRO) + LCS(wᵢ, c*^PRO) ;
maxₗ Lev(wᵢ, cₗ^LOC) + LCS(wᵢ, c*^LOC) ;
maxₗ Lev(wᵢ, cₗ^DATE) + LCS(wᵢ, c*^DATE)
]
Here sᵢ is the similarity feature vector for the word at position i. In this formula wᵢ denotes the word's written form used for comparison, and cₗ is the candidate at index l in the list for the type shown after the caret. The type names retain their dictionary meanings. Lev is the similarity based on Damerau–Levenshtein distance, and maxₗ takes the highest such value over the corresponding candidate list. The star marks a candidate c* attaining that maximum for the indicated type. LCS is the shared-string similarity evaluated for the word and that selected candidate. Parentheses enclose the arguments and commas separate them. The plus sign adds the two similarity values for a category. The brackets and separators collect the category values as components of one vector, and the equals sign defines that vector.
This construction reduces a candidate list of any available length to a feature of the same shape for each word. The system uses the strongest edit-based evidence it sees in each category. Additional candidates matter when they change what the best match is or supply evidence where there was previously little. Frequency of a name in the window is not an explicit input to this formula. If several appearances produce the same candidate with the same score, the maximum will reflect the strength of the match. It will not become larger merely because the string was repeated.
The paper specifies the comparisons and the way their values are combined. It leaves some implementation details open, including the conversion from edit distance to similarity, what value a category gets if its list is empty, and how candidates tied on the edit-based term are handled. These details matter to an exact implementation because the shared-string term uses the selected candidate. The architectural idea is still clear: each word gets the same set of typed feature slots, and each slot represents the most compelling spelling evidence available under its category.
Putting the dictionary evidence at the output
The enhanced recognizer receives the new features at the input to the CRF. Its bidirectional network produces the same kinds of forward and backward states as before. The system appends the similarity vector at that position to those states. This gives the CRF both a contextual representation of the sentence and explicit evidence that the word resembles a nearby entity of a particular type.
rᵢᵉⁿʰᵃⁿᶜᵉᵈ = [rᵢᶠ ; rᵢᵇ ; sᵢ]
Here rᵢᵉⁿʰᵃⁿᶜᵉᵈ is the observation vector used by the enhanced CRF at word position i. Its components rᵢᶠ and rᵢᵇ are the forward and backward states, and sᵢ is the vector of dictionary similarities at that position. The brackets and separators indicate concatenation, and the equals sign defines the augmented observation.
The authors chose the last layer because the features are already closely related to the decision it has to make. The personal-name component, for example, summarizes how strongly nearby predictions support that type on spelling grounds. It arrives after the preceding layers have built their ordinary sentence representation. The CRF can use a high similarity as support in a compatible passage or give other evidence more weight where a close spelling match would lead to a poor sequence of labels. The procedure therefore leaves room for the trained recognizer to handle cases in which the dictionary's suggestion is ambiguous.
The use of a late feature also makes the idea portable across the two kinds of tagger in the study. In the simpler experiment, a CRF receives hand-crafted input features. The authors use the NER tutorial feature set associated with Peng and Koborov and omit part-of-speech tagging features because those tags are unavailable in the dataset. The similarity vector is attached to those handcrafted observations in the same role that it plays alongside the neural states. The experiment asks whether the dictionary features help when the main tagger represents the sentence in a different way.
The implementations follow that division. The neural experiments use PyTorch and the Flair toolbox. The hand-crafted CRF experiments use pycrfsuite. In both, the defining change is the same typed comparison between the current word and predicted entities from the context. The representation adaptation, the first-stage recognizer and the final sequence labelling layer have distinct jobs. That separation allows the experimental comparisons to address whether legal-domain text helps at the input and whether nearby entity candidates help at the output.
Experiments and results
The court decisions and their labels
The annotated corpus consists of 94 court decisions with 11,209 sentences and 276,705 tokens in total. A legal expert annotated the texts, marking entity spans and applying the task's four categories. In this linguistic annotation scheme, PER covers individuals' personal names and PRO covers those of attorneys and court members. LOC covers addresses tied to birthplaces and residences. DATE is reserved for dates of birth. The last two categories are defined by their role in the decision. A generic address or date category would pose a different tagging task.
The paper follows the BIO convention through the protocol of the CoNLL-2003 shared task. It reports the train, development and test splits by decision count as well as by sentences, tokens and annotated entities. The training split contains 57 decisions, 6,989 sentences and 173,448 tokens. The development split contains 20 decisions, 1,963 sentences and 42,964 tokens. The test split contains 17 decisions, 2,257 sentences and 60,293 tokens. The methods description calls the splits approximately 80%, 10% and 10%. The detailed counts give the concrete allocation used to describe the evaluation, and the approximate percentages do not match that allocation by decision count.
The label distribution provides context for the aggregate scores. The training split contains 1799 PER, 750 PRO, 468 LOC and 57 DATE entities. The development split contains 447 PER, 215 PRO, 115 LOC and 9 DATE entities. In the test data, the respective counts are 629, 243, 139 and 18. Personal names supply the most annotated entities in each split. Birth dates supply the fewest. The overall results describe the recognizer across this mix. They provide less insight into the behaviour of a sparse category such as birth dates, particularly when the reported scores are pooled across categories.
The expert knew the writing conventions of these decisions. The authors cite that familiarity and the cost of another annotation pass when explaining why the data have no inter-annotator agreement score. Such a score would measure how consistently different people apply the categories and boundaries. The reported evaluation compares predictions with the expert's labels. Those labels also define what counts as a missed entity or an erroneous prediction in the comparisons between systems.
What changed between systems
The neural baseline called Vanilla uses the Flair-based sequence architecture with embeddings learned from general-domain text. The legal-domain baseline preserves that architecture and changes the representations to ones adapted or learned on legal decisions. The neural MICA variants then use legal-domain representations and add the typed similarity features. They vary the contextual window used to build those features. All these comparisons use the same annotated splits, so the test scores refer to the same decisions under the same label scheme.
The paper also evaluates a hand-crafted CRF baseline and versions that receive the MICA features. This comparison establishes a separate performance reference for the simpler tagger. Its baseline uses the tutorial features described in the method. In its enhanced versions the extra evidence still comes from comparing target words with predicted entities in a sentence window. Comparing each enhanced system with its own baseline is the direct way to measure the benefit of the addition in that architecture.
There are two useful neural reference points for the headline result. Vanilla shows what the authors get from the general-domain representations. Legal-domain Vanilla shows what happens once the representation change has already been made. The stronger baseline for the claim about MICA is the second. This comparison avoids assigning to the dictionary an improvement that can already be obtained by learning from legal text. The window sweep then shows how results change once the legal-domain representations and the use of similarity features are in place.
How to read the scores
Precision is the number of true positives divided by the number of true and false positives together. It tells the reader how much of what the system marks is supported by the annotations. Recall divides the true positives by the sum of true positives and false negatives. It tells the reader how much of what the expert marked the system finds. A system can gain recall by marking more candidates, but that change can lower precision when some of those additional candidates are incorrect. The F1 score combines precision and recall through a harmonic mean and is sensitive to weakness in either.
The paper also reports a measure called accuracy. Its denominator consists of true positives, false positives and false negatives, with true positives as the numerator. With that definition, the score addresses overlap between the entities found and the entities annotated. Correctly leaving ordinary text unmarked contributes no true negatives to the denominator. The definition is worth noting because a reader could otherwise interpret the accuracy column as the share of all tokens assigned the correct tag, including the many tokens outside entities.
The reported error reductions express gains relative to the error left by the baseline on a particular metric. The abstract's 32% refers to relative F1 error. The high-recall discussion likewise reports a relative recall error reduction of 40,90% for the best system against legal-domain Vanilla. These figures describe the reduction in the remaining gap for the stated scores. The underlying F1, precision and recall values provide the direct comparison for readers concerned with how well the system distinguishes correct entities from errors.
Neural results with legal text and wider context
The general-domain Vanilla baseline scores 94.30 F1 on the court-decision test set. With legal-domain representations, Vanilla scores 94.85 F1. The improvement accompanies a change in the balance of the component scores. Recall rises from 92.18 to 93.62, while precision moves from 96.52 to 96.11. Accuracy under the paper's definition increases from 89.21 to 90.20. Domain adaptation therefore changes the result even before the recognizer gets access to candidate dictionaries, with its gain in F1 driven by stronger recall alongside somewhat lower precision.
Neural taggers on the French court decision test set by F1
Legal-domain representations improve the baseline, and the contextual dictionary reaches its best score before the widest setting.
The numbers
| System or setting | F1 |
|---|---|
| General-domain Vanilla | 94.30 |
| Legal-domain Vanilla | 94.85 |
| Legal-domain MICA, context 0 | 95.33 |
| Legal-domain MICA, context 1 | 95.43 |
| Legal-domain MICA, context 8 | 95.64 |
| Legal-domain MICA, context 32 | 96.42 |
| Legal-domain MICA, context 128 (this paper) | 96.52 |
| Legal-domain MICA, context 256-512 | 96.48 |
The best neural MICA setting in the paper uses a window of 128 sentences. On the test set it scores 96.52 F1, with 96.23 recall, 96.81 precision and 93.28 accuracy. The legal-domain baseline has lower values in all of those columns. The abstract describes the F1 comparison as an increase from 94.85% to 96.52%, and its reported relative F1 error reduction of 32% uses that baseline. The high-recall comparison uses the same baseline and the same selected MICA setting. It focuses on a different part of the result, the improvement from 93.62 to 96.23 recall while precision also improves.
The widest neural setting is labelled 256-512 in the results. It obtains 96.34 recall, above the 128-sentence setting, and its precision falls to 96.62. Its F1 is 96.48 and its accuracy is 93.20. This setting shows why the best choice in the paper is tied to the metric. The widest row finds a greater share of annotated entities, while the row with 128 sentences achieves the strongest combination of precision and recall. The paper treats this tradeoff as evidence that the choice of candidate window affects the usefulness of the dictionary.
At the smaller settings, recall goes from 93.68 at MICA context 0 to 93.87 at context 1, 94.36 at context 8 and 95.94 at context 32. Precision is highest within the neural sweep at context 1, where it reaches 97.04. At context 32 it is 96.90. At context 128 it is 96.81, still above legal-domain Vanilla's 96.11. These figures trace how the main system moves through different combinations of recall and precision. They also show that the best F1 setting lies beyond the setting with the highest precision.
Results with a hand-crafted CRF
The simpler baseline has substantially lower test scores than the neural baseline. Its recall is 79.06, its precision is 92.77, its F1 is 85.37 and its accuracy is 74.47. With MICA at a window of 8 sentences, recall is 80.31 and precision is 94.28, producing 86.74 F1 and 76.58 accuracy. This setting supplies an example where both components of F1 improve when contextual similarities are available. The next window continues to improve recall, while the highest precision among these CRF variants occurs at the smaller window.
Hand-crafted CRF settings on the French court decision test set by F1
Dictionary features improve the hand-crafted baseline, with the intermediate window giving the best balance of precision and recall.
The numbers
| System or setting | F1 |
|---|---|
| Hand-crafted CRF baseline | 85.37 |
| MICA with hand-crafted CRF, context 8 | 86.74 |
| MICA with hand-crafted CRF, context 128 (this paper) | 89.91 |
| MICA with hand-crafted CRF, context 512 | 89.78 |
At context 128, the enhanced hand-crafted CRF reaches 86.30 recall, 93.83 precision and 81.67 accuracy. It attains its best F1 there, at 89.91. At context 512, recall increases to 87.39 and precision falls to 92.30. F1 consequently declines to 89.78, and accuracy to 81.45. The direction of the widest-window tradeoff resembles the one in the neural experiments. The simpler system gains useful evidence from MICA and continues to trail the neural Vanilla baseline's 94.30 F1.
For de-identification, a reported recall gain is especially relevant because an entity that the recognizer misses can persist in the released document. The experiment measures that gain on the labelled recognition task. Its aggregate results include the professional-name category alongside the categories the authors identify as relevant to removal. The scores therefore give a general view of recognition performance on the decisions. The extent to which any particular gain translates into identifying more of the sensitive text depends on where, among the categories and documents, the additional correct predictions occur.
What the ablations show
Separating domain adaptation from dictionary features
The work offers controlled comparisons across representation sources, tagger families and context sizes, along with examples of prediction differences. A useful starting point is the comparison between the neural baselines. The legal-domain version uses the same kind of recognizer as the general-domain version, while its input representations come from legal text. Its F1 is higher, and the precision and recall columns show how the scores move. This comparison assesses the combined representation change. The paper changes both Flair and FastText for the domain-adapted condition, so the separate contribution of each remains undetermined.
The neural MICA rows keep the legal-domain representation setup and vary the context used with the extra features. Comparing legal-domain Vanilla with legal-domain MICA gives the added value of the enhanced procedure in that setup. The zero-context MICA row is already above legal-domain Vanilla in F1. Those rows are separate conditions in the paper, and the zero-context condition still belongs to the enhanced system family. The paper describes it in the analysis as the version without context. It gives limited procedural detail about how candidates are handled at that setting. The cleanest reading is to preserve the distinction between Vanilla and the zero-context MICA row and use the MICA sweep to study the effect of widening the context.
The sequence of scores supplies evidence at two levels. One comparison concerns the full proposed procedure, including the enriched final layer and its training, against the fine-tuned Vanilla system. The other concerns the context setting within the enhanced procedure. MICA with context 128 reaches 96.52 F1 on the test set, while the zero-context MICA row reaches 95.33. The comparison is informative even though the earlier improvement over Vanilla cannot be assigned entirely to evidence from additional sentences. Wider contextual settings can be assessed against a baseline that is itself a version of MICA.
What happens when the dictionary has more candidates
Both tagger families show gains as the window increases up to their best F1 setting. The result is consistent with useful occurrences being available farther from the target sentence than a short window would reach. In the neural family, the move from the shortest contextual settings to the stronger ones is especially apparent in recall. For the simpler CRF, the increase from context 8 to context 128 also comes with noticeably higher recall and some loss of precision. In both cases, a larger dictionary can make a plausible spelling match available for more target words.
The reversal at the widest measured settings adds an important qualification to that interpretation. The dictionary-building procedure gives every candidate in a type list a chance to become its best match. Adding candidates can bring unrelated strings into contention. Because the feature takes a maximum, a single close spelling can make a category look plausible even when the word and candidate occur in passages about different entities. The decline in precision at the widest settings fits that mechanism. The experiments compare the resulting label scores across windows and leave the cause of individual false matches open.
The neural rows also show that the context window affects more than the ability to find mentions. The precision maximum at context 1 and the F1 maximum at context 128 imply different operating choices under the measures reported. A reader interested mainly in the proportion of correct predictions would look at the former. The latter yields a larger share of annotated entities found while maintaining precision above legal-domain Vanilla. The widest setting raises recall again, though it gives up enough precision to lower F1. The sweep describes these observed tradeoffs for the tested windows and this split.
The simpler CRF comparison tests a different question. Since its main inputs are hand-crafted, its gain demonstrates that useful dictionary signals can reach the final tagger without neural sentence representations. The comparison supports the authors' claim that the idea can be applied to another kind of sequence tagger. The experiment also shows the performance of the underlying taggers remains consequential: the enhanced CRF starts from weaker recognition and does not reach the neural baseline on this dataset. The value of the contextual feature can coexist with a substantial difference between the tagging architectures.
Missing spaces and changes in register
The paper illustrates a spelling problem with the string MS.LAVERGNE, where the title and name have been joined. In the authors' comparison, the system with no context misses this mention, while the enhanced setting can detect it. The example shows why exact dictionary membership would be too restrictive for the intended use. A token joined to a title can still share much of its spelling with a name that occurs in a cleaner form elsewhere. A similarity feature can convey that resemblance even after the written boundary between title and surname has disappeared.
The example also clarifies what it means to recover an entity with a typo. The output the authors inspect is the entity label for the observed text. The system need not restore the missing space or replace the written form with a corrected name to make that prediction. Recognition can succeed when the input retains its original spelling. This division between detection and correction matters for the application because marking identifying text and editing it are separate tasks. It also explains why the experiment can evaluate a spelling-sensitive recognizer using entity annotations as the reference.
A different example concerns the way children are named. The authors describe formal passages in which a first name appears close to birth information. That setting can make the entity easy to recognize on its first appearance. Later, the same first name can appear inside a long sentence reporting what the children said or wanted. In the paper's illustration, Jérémy and Léo occur in that less formal setting. The contextual evidence is valuable because an earlier recognizable occurrence can supply a candidate when the local wording offers less support.
The change of register tests a broader use of the same mechanism. When part of a name has been joined to another string, the similarity measures can help bridge the spelling discrepancy. When a first name occurs in a less revealing sentence, a dictionary candidate can support its type even if its spelling needs little accommodation. Both examples involve transferring evidence from a context where an entity is easier to recognize to an occurrence where the ordinary tagger struggles. The paper offers individual cases of these behaviours, so their frequency and contribution to the total gain remain unmeasured.
Where the comparisons stop
The analyses do not isolate the edit-based and common-string terms. Because the distance-based score selects the candidate and the shared-string score is added for that candidate, the formula gives the terms different roles. A separate comparison of those terms could distinguish the value of selecting a near spelling from the value of rewarding overlap once it has been selected. The reported results evaluate the feature with both pieces in place. They support the combined method under the tested settings.
There is a similar distinction between a plausible failure path and a demonstrated pattern. The authors point out that a false positive from the first tagger can enter the dictionary and influence the second tagger. They say the observed false-positive rate was stable in the results they discuss. That observation concerns the aggregate behaviour they report. It leaves room for individual early errors to affect later predictions, including cases where such errors coexist with corrections elsewhere. The paper also identifies trouble when the first tagger assigns the same word to different entity categories, a case in which the downstream features can supply competing evidence.
Limitations
Limits identified by the authors
The quality of the dictionary depends on the first tagger. A missed mention contributes no candidate, and a spurious one can contribute the wrong evidence. If both stages have difficulty with all occurrences of a name, the method may lack a clear occurrence from which to recover it. If the initial tagger predicts a false positive with a plausible spelling, the resulting feature can encourage the second tagger to repeat the error. The authors view this as a structural risk even though their discussion says it did not produce an evident rise in the false-positive rate in their results.
Another limitation the authors identify concerns type conflicts. A word tagged one way in a contextual sentence can be tagged another way in a different contextual sentence. Since each category has its own best-match feature, the same written form can support both. The CRF still has its sentence representation and sequence information, but the dictionary evidence itself supplies no way to decide which candidate refers to the relevant entity. More context can gather more occurrences of an ambiguous form and preserve the conflict rather than resolving it.
The authors also point to the way the window is defined. Their window is blind to document boundaries, and they suggest building the dictionary from the full decision instead. This proposal changes the meaning of context. A document-based dictionary would gather evidence according to which passages belong to the same case text, including passages far apart in sentence count. The window sweep shows a decline in F1 beyond the best tested size. The document-based alternative remains a proposed explanation and improvement to test, since the experiment does not compare it with the fixed window.
The paper's spelling features compare strings directly. The authors suggest another route based on cosine similarity between representations from the character embedding network. Such a comparison would use similarity in the learned representation space to supplement the evidence from shared spelling. They also propose trying the misspelling-oriented FastText work of Edizel and colleagues in place of the FastText component they tested. Both proposals concern how the system handles noisy written forms. The results come from the string-based MICA features with the embedding setup described in the method.
The authors see the design as applicable across domains and languages and propose evaluating it on open-domain recognition datasets in other languages. The reported recognition test takes place completely within French court decisions. The method can be described without a manually written French entity dictionary, since it gets candidates through predictions. Its usefulness still depends on whether the first tagger produces good candidates and whether spelling resemblance provides reliable evidence in the new setting. The proposed cross-domain and multilingual evaluations would be needed to measure those conditions.
Limits that follow from the evaluation setup
The annotated test set has 17 decisions. The paper reports results for one train, development and test allocation and gives no variation across repeated training runs or alternative splits. Its scores show what happened on the held-out decisions in that allocation. The closeness of the best F1 result and the widest-window result gives particular reason to read the ordering as a finding about the reported conditions. The experiment does not quantify how stable the ordering would be if different decisions supplied the test data.
The annotation and category distribution also constrain what can be inferred. One expert supplied the labels, and there is no measure of agreement with another annotator. A reader can assess how well each tagger matches this expert's decisions, while the consistency of category choices and span boundaries across experts remains unknown. The test counts range from 629 PER entities to 18 DATE entities. The aggregate columns give no separate scores for those categories, so a strong overall result does not reveal whether recognition of birth dates improved, held steady or worsened.
The paper's privacy motivation and its evaluation answer related questions at different levels. The experiment measures entity recognition with the annotated categories. It does not report an end-to-end evaluation of transformed decisions or count how many decisions are free of missed identifying passages after applying a replacement procedure. An entity-level recall score also leaves open how the misses are distributed. The same recall could reflect errors spread across many decisions or concentrated in fewer of them. That distinction matters to the application even when the aggregate comparison between taggers favours MICA.
The evidence on typos comes from the general test scores and the illustrative prediction differences. The paper does not give a separate test subset with documented spelling errors, nor does it report performance by error type. The missing-space case demonstrates a concrete success. The register example demonstrates that additional context may also help where spelling is ordinary and local cues have changed. Taken together, these cases support the proposed mechanism and indicate that the total score improvement can have several sources. They do not establish how much of that improvement comes specifically from recovering mistyped entities.
Some details of the data and context procedure are too sparse for exact reconstruction solely from the paper. The window sizes and named inputs are given, but the treatment of empty lists, ties and similarity scaling is left unspecified. The reported neural row labelled 256-512 likewise gives a range label rather than separate scores for those sizes. These gaps restrict comparisons that would depend on the exact behaviour of a particular window configuration. The reported scores remain interpretable at the level of the named systems and settings.
The scope of the architectural comparison is also specific. The study applies the added features to a neural tagger with a CRF output and to a hand-crafted CRF. This provides evidence that two different types of input representation can benefit from the same kind of contextual signal. Both experiments still use a CRF for sequence decisions. The authors' broader claim that the idea can be used with other sequence taggers rests on the general form of the features. The tests establish its use in the two CRF-based configurations they actually evaluate.
What came after
No later study is identified that tests or extends MICA. The paper closes with open questions about which passages should supply candidates, how to compare spellings, and whether the gains transfer to other recognition datasets. Its reported evidence ends with the French court-decision experiments.
Cite
Cite as Valentin Barriere and Amaury Fouret. 2019. May I Check Again? –- A simple but efficient way to generate and use contextual dictionaries for Named Entity Recognition. Application to French Legal Texts. Proceedings of the 22nd Nordic Conference on Computational Linguistics.
@inproceedings{barriere2019may,
title = {{May I Check Again? –- A simple but efficient way to generate and use contextual dictionaries for Named Entity Recognition. Application to French Legal Texts.}},
author = {Valentin Barriere and Amaury Fouret},
booktitle = {Proceedings of the 22nd Nordic Conference on Computational Linguistics},
year = {2019},
url = {https://aclanthology.org/W19-6136/}
}This page in Markdown https://md.research.elamur.ai/free/en/papers/barriere-2019-may-i-check-again-simple/