Ilhem Slama
email: ilhem.slama@imt-atlantique.fr

Oussama Ben-Ammar
email: oussama.ben-ammar@emse.fr

Alexandre Dolgui
email: alexandre.dolgui@imt-atlantique.fr

Faouzi Masmoudi
email: masmoudi.fawzi@gmail.com

A stochastic model for a two-level disassembly lot-sizing problem under random lead time

Keywords: Disassembly lot-sizing, Random lead time, Stochastic programming, Monte Carlo simulation

The purpose of this research is to propose an optimization method for the stochastic disassembly lot-sizing problem under uncertainty of lead time. One type of end-of-life (EoL) product is disassembled to satisfy a dynamic and known demand of items over a planning horizon. The tactical problem is considered as a random optimization problem in order to minimize the expected total cost. A sample average approximation (SAA) approach, is developed to model the studied random optimization problem and minimize the average total cost. The effectiveness of the solution approach has successfully tested and proved.

Introduction

Managing uncertainty is becoming one of the most important challenge in optimizing the disassembly process. Uncertainty leads to several difficulties in production planning and inventory management. The sources of uncertainty are diverse and can be found at several levels of the disassembly process: variability of demand, probabilistic recovery rates of items, delivery times, quality problems, etc. In this paper we consider the situation where demand on items/parts must be satisfied from the disassembly of EoL products. According to the classification proposed by [START_REF] Ilgin | Environmentally conscious manufacturing and product recovery (ecmpro): A review of the state of the art[END_REF], the studied problem enters into the classification of disassembly lot sizing problem (DLS) problem that consists in finding when and how much EoL products to disassemble to meet demand for the items while minimizing the costs associated with the disassembly system.

Without trying to do an exhaustive review of the literature, we highlight the works on DLS problem under uncertainty. The stochastic literature review can be split into four different cases: (i) the uncertainty of demand [START_REF] Barba-Gutiérrez | Reverse MRP under uncertain and imprecise demand[END_REF][START_REF] Kim | Capacitated disassembly scheduling with random demand[END_REF], (ii) the uncertainty of disassembly yield (see for example the paper of [START_REF] Inderfurth | How yield process misspecification affects the solution of disassemble-to-order problems[END_REF][START_REF] Inderfurth | Heuristics for solving disassemble-to-order problems with stochastic yields[END_REF]), (iii) the uncertainty of yield and demand [START_REF] Liu | Capacitated disassembly scheduling under stochastic yield and demand[END_REF] and (iv) the uncertainty of disassembly lead time (DLT) [START_REF] Slama | Scenario-based stochastic linear programming model for multi-period disassembly lot-sizing problems under random lead time[END_REF][START_REF] Slama | Newsboy problem with twolevel disassembly system and stochastic lead time[END_REF]. This latter can be defined as the time difference between placing a disassembly order and receiving the disassembled items. The DLT is crucial parameter in disassembly planning. However, their variability strongly affect the disassembly system efficiency and it can affect the customer orders with a random availability of disassembled items. Managing disassembly operation under uncertainty of DLT is very challenging in practice. Indeed, when an EOL product is disassembled, it is fundamental to ensure that it is the right model to be supplied under uncertain DLT in order to manage disassembly and delivery process. In order to position our research in the existing literature, we will only review in detail the previous works on the stochastic DLS problem under uncertainty of DLT. Only two papers populated this category. The paper of [START_REF] Slama | Scenario-based stochastic linear programming model for multi-period disassembly lot-sizing problems under random lead time[END_REF] is the first to treat this problem type. The case of two-level disassembly system is studied under unlimited disassembly capacity. The problem is formulated as a minimization problem and then converted to a Monte Carlo-mixed integer programming model. The Model is used to determine the optimal quantity for EoL products in order to minimize the average total cost over the planning horizon. Recently, [START_REF] Slama | Newsboy problem with twolevel disassembly system and stochastic lead time[END_REF] proposed a generalization of the discrete Newsboy formulae to find the optimal release date when the disassembly lead time of the EoL product is random variable. This study deals with a single-period disassembly to-order problem with known and fixed demand for components, when the disassembly capacity is unlimited.

To close to real industrial planning approach, the capacity restriction on disassembly resources is an important consideration. As for approach, a sample average formulation is necessary to approximate the expected objective value. This paper is a continuation of our previous preliminary work [START_REF] Slama | Scenario-based stochastic linear programming model for multi-period disassembly lot-sizing problems under random lead time[END_REF]. The contributions of this study are as follow:

1. The problem is extended to a capacitated disassembly lot sizing (CDLS) problem and formulated as a minimization problem and converted to a Monte Carlo-Mixed-Integer Programming model (MC-MIP); 2. The sample average approximation algorithm based on Monte Carlo (MC) optimization approach is proposed.

In this article, we study the case of a two-level disassembly system with a lotsizing policy. The disassembled item requests are known and must be delivered on predefined delivery dates. To meet the items requirements, a quantity of EoL product Z t is ordered at the period t. Once the disassembly order is released, a random real L t is found in that period and the disassembled items are received at period t = t + L t . Note that, a setup cost is generated if any disassembly operation is released in period t. The DLT at each period are independent random random discrete variables with known probability distributions and varying between L -and L + . The randomness of the lead time is a classic problem for industrial companies. If the date of recovery of an item during the disassembly of the EoL product is lower than its planned delivery time, this item will be stored until this date. This situation usually occur in companies and generates holding costs. In the same manner, if an item is not received in time, a backlogging cost is incurred for it. Regarding the capacity, the disassembly quantity is limited by a certain capacity time in each period over the planning horizon. The rest of this paper is organized as follows. In section 2, the proposed stochastic programming model of the CDLS problem is described. MC optimization approach is presented in section 3. Section 4 reports some preliminary results. Our conclusions are drawn in the final section.

Problem Formulation

To solve the studied problem under random lead time, a stochastic MIP is proposed to minimize the expected total cost (E(T C)). The list of notations used in this paper is given in Table 1 We note that the total number of scenarios is |Ω| = t∈T (L + -L -+ 1). Thus, E(T C) can be calculated by considering all possible values of L ω t and the objective function, expressed in Eq. ( 1), can be modeled as follows:

min E(T C) = t∈T ∀i∈N ω∈|Ω| 1 |Ω| h i .H ω i,t + b i .B ω i,t + s t .Y t (1)
Eq. ( 2) defines the inventory balance for each item i at the end in each period t under scenario ω:

I ω i,t = H ω i,t -B ω i,t ∀i ∈ N , ∀t ∈ T , ∀ω ∈ Ω (2)
where

I ω i,t ≡ I i,0 + t-L ω τ τ =1 R i .Z τ - t τ =1 D i,τ
Constraints (3) represents the modeling constraint for disassembly indicator of the EOL product in period t:

Z t ≤ Y t .M ∀t ∈ T (3)
Constraints ( 4) represents the capacity constraint in each period t:

G.Z t ≤ C t ∀t ∈ T (4)
Constraints (5 to 7) provides the conditions on the decision variables:

Z t ≥ 0 ∀t ∈ T (5)
H ω i,t , B ω i,t ≥ 0 ∀i ∈ N , ∀t ∈ T , ∀ω ∈ Ω (6) Y t ∈ {0, 1} ∀t ∈ T (7)
The complexity of the problem may increase exponentially if a large set of |Ω| is considered to represent the stochastic DLT and the resolution of (1) to [START_REF] Liu | Capacitated disassembly scheduling under stochastic yield and demand[END_REF] becomes impossible. The total cost can be estimated by an empirical average ( T C) by using: Monte Carlo (MC) simulation. It can provide an estimate of the criterion that converge to E(T C) calculated by the stochastic MIP.

Proposition 1. The MIP model can be converted to the following MC-MIP model:

T C = ∀t∈T ∀i∈N ω∈ϑ 1 K h i .H ω i,t + b i .B ω i,t + s t .Y t (8)
I ω i,t = H ω i,t -B ω i,t ∀i ∈ N , ∀t ∈ T , ∀ω ∈ K (9) H ω i,t , B ω i,t ≥ 0 ∀i ∈ N , ∀t ∈ T , ∀ω ∈ K ( 10
)
subject to (2), ( 3),( 4), ( 5) and [START_REF] Liu | Capacitated disassembly scheduling under stochastic yield and demand[END_REF].

Proof. The MC-MIP is implemented with the following steps:

-Step 1: ∀t ∈ T , generate the random samples for L ω t for ω ∈ ϑ where ϑ is a set of random samples such that ϑ ⊂ Ω and |ϑ| = K, -Step 2: Each expected inventory level, noted by E(I i,t ), is estimated by Īi,t .

Of particular interest is to study the Monte Carlo optimal solution convergence, we describe in the next section the convergence provided by the SAA algorithm based on MC optimization approach.

"Exact" Monte Carlo Optimization Method

In this section we present an almost exact method to solve the stochastic problem, referred to as the true optimization problem using MC-MIP. This approach is also known as the stochastic counterpart or the sample path method [START_REF] Ruszczyński | Stochastic programming models[END_REF]. The evidence from this study points towards the idea incorporates an optimal algorithm to solve the problem under a large set of samples [START_REF] Lamiri | A stochastic model for operating room planning with elective and emergency demand for surgery[END_REF]. Thus,the excepted total cost developed in Eq. ( 1) can be approximated by SAA based on MC optimization steps:

-Step 1: Solve the MC-MIP model: Let X * be the optimal solution and T C * the obtained optimal average cost, -Step 2: ∀t ∈ T , generate B large random samples of L t : L 1 t , . . . , L B t |ω ∈ B, -Step 3: Evaluate the "Exact" optimal cost T C B of the optimal solution X * , using Eq. (11):

T C B = ∀t∈T ∀i∈N ω∈B 1 B h i .H ω i,t + b i .B ω i,t + s t .Y t (11)
subject to ( 9), ( 4) and [START_REF] Slama | Newsboy problem with twolevel disassembly system and stochastic lead time[END_REF].

Remark 1. According to [START_REF] Lamiri | A stochastic model for operating room planning with elective and emergency demand for surgery[END_REF], "By the law of large numbers, Īi,t (respectively T C) converges with probability 1 to E(I i,t ) (respectively E(T C)) as K increases".

Computational Experiments and Result

In order to investigate the speed convergence of the solution provided by the MC optimization, this section presents numerical results that prove our findings. All approaches were solved using optimization software for small instances. All formulations are implemented in C using Concert Technology and are solved by IBM CPLEX 12.4 on a PC with processor Intel (R) Core ™ i7-5500 CPU @ 2.4 GHz and 8 Go RAM under Windows 10 Professional.

We considered a finite planning horizon with 5 periods and a disassembly system with 3 items (See Fig. 1). The number in parentheses represents the number of items obtained from the EoL product. The number of scenarios K takes a value in [START_REF] Ilgin | Environmentally conscious manufacturing and product recovery (ecmpro): A review of the state of the art[END_REF][START_REF] Slama | Newsboy problem with twolevel disassembly system and stochastic lead time[END_REF]30,50,150,200,400,600,1000]. For each K, we performed 100 independent runs of the MC-MIP to provide 100 optimal solutions X * and the related average costs. The "exact"cost of each X * was evaluated using a big number of scenarios (10 5 samples), i.e., T C B ≈ E(T C) with B =10 5 (See [START_REF] Lamiri | A stochastic model for operating room planning with elective and emergency demand for surgery[END_REF]).

To obtain E(T C), the stochastic MIP was solved with |Ω| = 3125 scenarios and the E(T C) takes a value equal to 70955 (see Fig. 2). The tests are carried out under the parameter costs listed in Table 2. The inventory and backlogging costs of one unit of item i are 3 and 87, respectively. Starting inventory for each item is assumed to be zero. We note that the capacity is 180 for all periods. Let us now compare the convergence of T C. Fig. 2 shows that T C B decreases when K is increasing. The findings of this study support the idea that T C converges to the optimal solution E(T C) and is quite robust if a large number of samples is used, for example if K ≥ 200. Our work has led us to conclude that our proposed optimization method can provide the convergence of the solution to the optimal one as the set of scenarios increases. As expected, our experiments show that for K = 10 3 , the MC-MIP approach can generate a good approximate solution for the stochastic problem. As previously noted, we realized 100 independent runs of the same data set of the MC-MIP with 10 3 scenarios. Then, 100 optimal estimated solutions are obtained (Sol 1000 ). Among these solution, the Best Known Solution (BKS) is selected.

As Fig. 3 witnesses, the results founded are stable and the average gap from BKS is no more than 4% for all runs.

Conclusion

In this work, we studied a stochastic CDLS problem with several items disassembled from one type of EoL. We assumed that the items-demand is known. The DLT are an independent random variables whose probability distribution is known and bounded. The combination of MC-MIP approach has been developed. A SAA based on MC optimization provides almost optimal solutions using a modest number of scenarios in order to minimize the average total cost. Our model can easily be implemented in practice to define the DLT in a disassembly planning and control system. Our experiments show clear that the average total cost can be tends to the expected one as the number of scenarios increases. The stability of the proposed model is also verified. In the future, we will try to treat the randomness of demand and/or disassembly yield in the study of the multi-level disassembly systems and multi type EOL products.

Fig. 1 :

 1 Fig.1: A two-level disassembly system.

  Lt = ω) 0.245 0.48 0.255 0.01 0.01

Fig. 2 :

 2 Fig. 2: Convergence cost.

Fig. 3 :

 3 Fig. 3: Validation of MC simulation approach.

Table 1 :

 1 : Notation. Backordered quantity of item i at period t under scenario ω

	Parameters
	T	Set of time periods of the planning horizon
	N	Set of items
	Ω	Set of possible scenarios
	t	Index of period t, t ∈ T
	i	Index of item i, i ∈ N
	ω	Index of scenario ω, ω ∈ Ω
	R i	Number of units of i obtained from disassembling the EoL product
	D i,t External demand for item i in period t
	I i,0	Starting inventory of item i
	L ω t	Random disassembly lead time in period t under scenario ω
	h i	Per-period inventory holding cost of one unit of item i
	s t	Per-period setup cost in period t
	b i	Per-period backlogging cost of one unit of item i
	G	Disassembly operation time
	C t	Available capacity in period t
	M	A large number
	Functions
	E(.) Expected value
	p ω	Probability distribution for scenario ω, ω∈Ω p ω = 1
	Decision variable
	Z t	Disassembly quantity ordered in period t
	Y t	Binary indicator of disassembly in period t
	H ω i,t B ω i,t	Inventory level of item i at period t under scenario ω

Table 2 :

 2 Characteristics of the data set.


Mehdi Mirzapour

Amine Abdaoui

Andon Tchechmedjiev

William Digan

Sandra Bringay

Clement Jonquet
email: jonquet@lirmm.fr

French FastContext: A publicly accessible system for detecting negation, temporality and experiencer in French clinical notes

Keywords:

The context of medical conditions is an important feature to consider when processing clinical narratives. NegEx and its extension ConText became the most well-known rule-based systems that allow determining whether a medical condition is negated, historical or experienced by someone other than the patient in English clinical text. In this paper, we present a French adaptation and enrichment of FastContext which is the most recent, n-trie engine-based implementation of the ConText algorithm. We compiled an extensive list of French lexical cues by automatic and manual translation and enrichment. To evaluate French FastContext, we manually annotated the context of medical conditions present in two types of clinical narratives: (i) death certificates and (ii) electronic health records. Results show good performance across different context values on both types of clinical notes (on average 0.93 and 0.86 F1, respectively). Furthermore, French FastContext outperforms previously reported French systems for negation detection when compared on the same datasets and it is the first implementation of contextual temporality and experiencer identification reported for French. Finally, French FastContext has been implemented within the SIFR Annotator: a publicly accessible Web service to annotate French biomedical text data (http://bioportal.lirmm.fr/annotator). To our knowledge, this is the first implementation of a Web-based ConText-like system in a publicly accessible platform allowing non-natural-language-processing experts to both annotate and contextualize medical conditions in clinical notes.

Introduction and background

Health organizations store different kinds of medical notes within Electronic Health Records (EHRs). These notes often include unstructured elements (free text) that represent valuable information for medical research [START_REF] Häyrinen | Definition, structure, content, use and impacts of electronic health records: a review of the research literature[END_REF]. Therefore, the natural-language-processing community has developed automatic systems to detect clinical conditions and extract valuable knowledge from EHRs to facilitate: decision support [START_REF] O'connor | Impact of electronic health record clinical decision support on diabetes care: a randomized trial[END_REF], identification of patient cohorts [START_REF] Shivade | A review of approaches to identifying patient phenotype cohorts using electronic health records[END_REF], surveillance [START_REF] Herasevich | Limiting ventilator-induced lung injury through individual electronic medical record surveillance[END_REF], etc. However, in order to extract the best outputs (selection of patients, prediction, decision) from EHRs, it is important to determine the context of the annotated clinical conditions. Indeed, it is not enough to detect a particular disease within the text, but a system shall also distinguish between a negated and an affirmed occurrence. Similarly, a patient might be excluded from a cohort if its record exhibits a condition that does actually concern a relative (e.g., parents). For this reason, researchers have proposed several methods to detect the context of -already annotated-clinical conditions, especially for English medical texts [START_REF] Chapman | A simple algorithm for identifying negated findings and diseases in discharge summaries[END_REF][START_REF] Huang | A novel hybrid approach to automated negation detection in clinical radiology reports[END_REF][START_REF] Rokach | Negation recognition in medical narrative reports[END_REF][START_REF] Harkema | ConText: an algorithm for determining negation, experiencer, and temporal status from clinical reports[END_REF]. In this work, we have two objectives: (i) to propose an efficient equivalent system for French clinical text data (ii) to make it easily accessible and usable by the French medical community without any natural-language-processing expertise.

NegEx was, in 2001, one of the first reported systems to detect the context of clinical conditions [START_REF] Chapman | A simple algorithm for identifying negated findings and diseases in discharge summaries[END_REF]. It was originally developed to identify negated conditions in English discharge summaries and radiology reports. It uses a simple regular expression algorithm based on lexical cues (trigger terms, pseudo-trigger terms, and termination terms). 1 The system by default considers a condition affirmed, and marks it negated if it appears that allows fast execution of lexicon-based systems. FastContext has outperformed previous implementations of ConText. The n-trie-based engine of FastContext, implemented in Java, 2 consistently leads to gains in accuracy as the rule-set increases in size. Another important aspect of FastContext is its explicit externalized rules feature (i.e., the rules can be defined in a file separate from the implementation) that allows faster adaptation and reusability.

Regarding semantic annotation workflows to annotate French biomedical data with terminologies or ontologies, there are no open and public solutions available, despite of some research tools developed by Rouen University Hospital and since transferred to private companies (e. g., [START_REF] Pereira | Using multi-terminology indexing for the assignment of MeSH descriptors to health resources in a French online catalogue[END_REF]). In the context of the Semantic Indexing of French biomedical Resources (SIFR) project, our group develops the SIFR Annotator (http://bioportal.lirmm.fr/annotator) to address the lack of off-the-shelf openly and easily accessible semantic annotation systems for French [START_REF] Jonquet | SIFR BioPortal: Un portail ouvert et générique d'ontologies et de terminologies biomédicales françaises au service de l'annotation sémantique[END_REF][START_REF] Tchechmedjiev | ICD10 coding of death certificates with the NCBO and SIFR Annotator(s) at CLEF eHealth 2017 Task 1[END_REF][START_REF] Tchechmedjiev | SIFR annotator: ontology-based semantic annotation of French biomedical text and clinical notes[END_REF]. This service was significantly enhanced and customized for French, 3 but is originally based on the National Center for Biomedical Ontology (NCBO) Annotator (http://bioportal.bioontology.org/annotat or) [START_REF] Jonquet | The open biomedical annotator[END_REF]: a web service allowing to use available biomedical ontologies for annotating datasets automatically. The annotator service processes raw textual descriptions, tags them with relevant biomedical ontology concepts and returns the annotations to the users in several formats such as JSON-LD, RDF or BRAT. The SIFR Annotator uses 30 standard terminologies and ontologies collected in the SIFR BioPortal, a local instantiation of the NCBO technology [START_REF] Noy | BioPortal: ontologies and integrated data resources at the click of a mouse[END_REF][START_REF] Whetzel | NCBO Technology: Powering semantically aware applications[END_REF] dedicated to French. 4 With the objective of proposing a complete ConText-capable semantic annotation workflow for French clinical notes, we have integrated French FastContext within the SIFR Annotator workflow as will be explained later. In this paper, we will focus solely on evaluating the context detection performance on a set of pre-identified entity annotations and not the performance of named entity recognition of SIFR Annotator, which has been evaluated thoroughly [START_REF] Tchechmedjiev | SIFR annotator: ontology-based semantic annotation of French biomedical text and clinical notes[END_REF].

The SIFR Annotator not only identifies entities but also performs entity linking (normalisation) by associating explicit ontology classes to entities. Dalloux et al. also offer an online demonstrator or their system [START_REF] Dalloux | Détection de la négation: corpus français et apprentissage supervisé[END_REF], however documentation is lacking, and the examples provided are non-functional, contrarily to our production-ready system. There have been more complex systems for the fine grained detection of experiencer [START_REF] Lumbreras | Automatic role detection in online forums[END_REF][START_REF] Pertin | User profile detection in health online Fora[END_REF] and time expressions [START_REF] Tapi Nzali | Automatic extraction of time expressions across domains in French narratives[END_REF][START_REF] Kessler | Extraction de dates saillantes pour la construction de chronologies thématiques[END_REF][START_REF] Hamon | Tuning HeidelTime for identifying time expressions in clinical texts in English and French[END_REF], however their scope, objectives and use-cases are much broader than the type of detection ConText performs: they identify precise time expressions, dates and temporal relations, while ConText provides a very rough classification. The main use-case for ConText annotation is clearly for document indexing and classification rather than more advanced tasks such as de-identification of clinical text. There are in fact clinical deployments of our system that are used alongside HeidelTime for complementary purposes [START_REF] Moriceau | French resources for extraction and normalization of temporal expressions with heideltime[END_REF].

The evaluation of French FastContext was challenging due to the lack of a French gold standard and to the difficulty of accessing clinical data in general. If a few gold standard datasets have been produced for negation detection in English [START_REF] Vincze | The BioScope corpus: biomedical texts annotated for uncertainty, negation and their scopes[END_REF] and Spanish [START_REF] Marimon | Annotation of negation in the IULA Spanish Clinical Record Corpus[END_REF], there are no similar corpora for the French language. The sentences annotated in [START_REF] Chapman | Extending the NegEx lexicon for multiple languages[END_REF] and [START_REF] Garcelon | Improving a full-text search engine: the importance of negation detection and family history context to identify cases in a biomedical data warehouse[END_REF] are of restricted access, inaccessible to us for privacy-related restrictions. Therefore, with the collaboration of the HEGP hospital and agreement of the INSERM CépiDC department, we manually annotated the context of thousands of medical conditions in French clinical narratives. Wu et al have proved that negation detection performance suffers when there is no in-domain development [START_REF] Wu | Negation's not solved: generalizability versus optimizability in clinical natural language processing[END_REF]: a system performing 2 The java implementation of FastContext is available in https://github. com/jianlins/FastContext . 3 A paper detailing the implementation and evaluation of the SIFR Annotator is currently under preparation. The reader can nevertheless refer to [START_REF] Jonquet | SIFR BioPortal: Un portail ouvert et générique d'ontologies et de terminologies biomédicales françaises au service de l'annotation sémantique[END_REF], [START_REF] Tchechmedjiev | ICD10 coding of death certificates with the NCBO and SIFR Annotator(s) at CLEF eHealth 2017 Task 1[END_REF]. 4 Since 2019, the generic NCBO BioPortal technology is branded as the OntoPortal technology and jointly developed by the OntoPortal Alliance (http s://ontoportal.org), under the guidance of Stanford University.

under the scope of a modifier (e.g., "no sign of", "absence of", "is ruled out"). Besides its simplicity, this algorithm is fast and effective. Subsequent research adopted two main types of negation detection methods for health narratives: Methods in the first category followed NegEx's idea using lexical cues [START_REF] Elkin | A controlled trial of automated classification of negation from clinical notes[END_REF], developed syntactic techniques based on part-of-speech tags and dependency trees [START_REF] Cotik | Syntactic methods for negation detection in radiology reports in Spanish[END_REF], or combined both lexical cues and manually constructed grammar rules [START_REF] Huang | A novel hybrid approach to automated negation detection in clinical radiology reports[END_REF]. Methods in the second category used machine learning techniques such as Decision Trees [START_REF] Rokach | Negation recognition in medical narrative reports[END_REF], Conditional Random Fields or Support Vector Machines [START_REF] Morante | A metalearning approach to processing the scope of negation[END_REF]. Machine Learning methods need annotated training data, which are usually difficult to get in clinical or medical environments. Furthermore, a comparative study has evaluated NegEx and two machine learning-based systems on the same dataset and concluded NegEx was more effective [START_REF] Goryachev | Implementation and evaluation of four different methods of negation detection[END_REF]. Wu et al reported that both categories are highly dependent on the clinical texts being evaluated [START_REF] Wu | Negation's not solved: generalizability versus optimizability in clinical natural language processing[END_REF]. Therefore, one may often prefer rule-based systems since they may be easily adapted to different corpora. Due to its simplicity and effectiveness, NegEx has been adapted to at least four other European languages: Swedish [START_REF] Skeppstedt | Negation detection in Swedish clinical text: An adaption of NegEx to Swedish[END_REF], Spanish [START_REF] Costumero | An approach to detect negation on medical documents in Spanish[END_REF], French [START_REF] Deléger | Detecting negation of medical problems in French clinical notes[END_REF] and German [START_REF] Chapman | Extending the NegEx lexicon for multiple languages[END_REF][START_REF] Cotik | Negation detection in clinical reports written in German[END_REF]. Porting NegEx to these languages consisted mainly in translating its English lexical cues. In 2009, NegEx's successful approach was extended to detect temporality and experiencer of clinical conditions (always in English texts) with the development of the ConText [START_REF] Harkema | ConText: an algorithm for determining negation, experiencer, and temporal status from clinical reports[END_REF] system. It offers new lexical cues to detect whether a condition is historical, hypothetical or experienced by someone other than the patient. At the same time, the authors improved negation detection with new lexical cues. The ConText system has been also ported to Swedish [START_REF] Velupillai | Cue-based assertion classification for Swedish clinical text-Developing a lexicon for pyConTextSwe[END_REF] and Dutch [START_REF] Afzal | ContextD: an algorithm to identify contextual properties of medical terms in a Dutch clinical corpus[END_REF] but not to French. Moreover, NegEx/ConText has sometime been connected to English annotation systems so that they may both automatically identify the conditions and their contexts e.g., [START_REF] Chapman | Document-level classification of CT pulmonary angiography reports based on an extension of the ConText algorithm[END_REF], however, we do not know any such integration for the French language, especially within a publicly accessible platform.

Regarding the French language, the previous NegEx adaptation obtained performance results comparable to the English version [START_REF] Deléger | Detecting negation of medical problems in French clinical notes[END_REF]. The authors' list of French lexical cues is available to the community, we therefore used it as a baseline in our development. However, this list contains a limited number of terms (2 7 0) and indeed, concerned only one context-negation-and did not cover temporality and experiencer. More recently, Garcelon et al. proposed another system to detect the context of clinical conditions in their systematic indexing/search of the Paris Necker Hospital's data warehouse [START_REF] Garcelon | Improving a full-text search engine: the importance of negation detection and family history context to identify cases in a biomedical data warehouse[END_REF]. In addition to negation, the authors compiled French lexical cues to detect family-related conditions. Their system is quite specific as it filters out negated and familyrelated conditions only in the context of the hospital's full-text search engine. Still, we used their released lexical cues to enrich our systems. A first version of our system, called French ConText, porting the entire ConText algorithm to French was released at the end of 2017 [START_REF] Abdaoui | French ConText: Détecter la négation, la temporalité et le sujet dans les textes cliniques Français[END_REF]; however this was an experimental prototype which was relying on an older (now deprecated) and less performant implementation. Beyond approaches to French context detection based on lexical cues, there is a significant body of work of context detection with more sophisticated linguistic approaches or supervised machine learning. Although cuebased approaches are very efficient for morphologically poor languages such as English, their ability to generalize their detection to morphological variations in more morphologically diverse languages like French is poorer (short of enumerating all possible variations of trigger terms). Dalloux et al. [START_REF] Dalloux | Détection de la négation: corpus français et apprentissage supervisé[END_REF] propose a negation detection system based on a supervised approach (BiLSTM), which offers joint entity and negation detection performance of up to 76%.

In 2018, FastContext [START_REF] Shi | Trie-based rule processing for clinical NLP: A use-case study of n-Trie, making the ConText algorithm more efficient and scalable[END_REF], a new implementation of ConText, was introduced. This implementation benefits from revised n-trie structures

Materials and methods

In this section, we first present the original ConText algorithm. Then, we describe its adaptation to the French language and its integration within the SIFR Annotator. Finally, we present the preparation and annotation of the gold standard corpora.

The ConText algorithm and FastContext implementation

We have used FastContext [START_REF] Shi | Trie-based rule processing for clinical NLP: A use-case study of n-Trie, making the ConText algorithm more efficient and scalable[END_REF], a state-of-the-art implementation of the ConText algorithm, which is based on an n-trie engine which runs two orders of magnitude faster and is far less sensitive to rule set size compared to other implementations [START_REF] Harkema | ConText: an algorithm for determining negation, experiencer, and temporal status from clinical reports[END_REF]. FastContext supports externalized rules that can be modified explicitly without any need for further code-level changes. In the domain of clinical information extraction, we typically deal with three or four different types of contextual cues. The Java implementation of FastContext includes a comprehensive set of 1322 rules refined from the original ConText rule set, supplemented by rules contributed from other resources [START_REF] Shi | Trie-based rule processing for clinical NLP: A use-case study of n-Trie, making the ConText algorithm more efficient and scalable[END_REF], as well as rules designed by the FastContext developers. These rules cover four types of contextual cues: negation, certainty, temporality and experiencer. For each type of context, the cues may be one of (default values are presented in italic):

-Negation: affirmed or negated; -Certainty: certain or uncertain; -Temporality: recent, historical or hypothetical; -Experiencer: patient or non-patient.

By default, a medical condition is considered as affirmed, certain, recent and patient. However, the contextual values may change if the condition falls within the scope of a modifier (also called a trigger term). For instance, in the sentence "the patient has no sign of melanoma," the underlined condition will be negated by ConText since it follows the modifier "no sign of". For each non-default value, the ConText system maintains a separate list of modifiers. For instance, the term "denies" triggers the value negated, the term "history of" triggers the value historical, while the term "mother's" triggers the value non-patient. Velupillai et al. [START_REF] Velupillai | Cue-based assertion classification for Swedish clinical text-Developing a lexicon for pyConTextSwe[END_REF] proposed a version of ConText considering even more complex contextual values. 5 In this work, initially in 2017, we started from the original version of ConText [START_REF] Harkema | ConText: an algorithm for determining negation, experiencer, and temporal status from clinical reports[END_REF] for its simplicity and availability of a Java implementation. In 2019, we moved to FastContext [START_REF] Shi | Trie-based rule processing for clinical NLP: A use-case study of n-Trie, making the ConText algorithm more efficient and scalable[END_REF] as an implementation that has increased speed and accuracy. 6The scope of each modifier is pre-defined as either forward (e.g., "denies") or backward (e.g., "is ruled out"). This scope ends by default either at the end of the sentence (full stop) or by setting an explicit window size configuration i.e., the number of tokens that come after a concept. However, some terms can override this default termination and act as termination terms. For instance, the word "but" ends the scope of negation modifiers such as in the sentence: "no sign of melanoma but multiple common moles". Finally, some expressions contain trigger terms but do not modify the context. For instance, the expression "no increase" contains a negation trigger term which is "no" but does not act as a modifier. In order to avoid false positives, the expression "no increase" will be added to a list of pseudo-modifiers which will not change the default contextual values. In conclusion, the FastContext system is based on three categories of lexical cues:

-Trigger terms: trigger a non-default contextual value of conditions falling within their scope; -Pseudo-trigger terms: contain modifiers and do not change the context; -Termination terms: end the scope of modifiers.

Adapting FastContext to the French language consisted in compiling an equivalent French list of these lexical cues (as described Section 2.2) and adapting some of the regular expressions to French. Table 1 presents some examples of English lexical cues and their French counterparts as used in our French rule set: "term, scope/category, context(s)."

Compilation of French lexical cues

Our list of French lexical cues has been obtained through automatic translation, manual validation and enrichment with previously existing alternate French lists. We decided to combine both machine translation and human expertise in order to create a comprehensive list of French lexical cues. Indeed, if human expertise should lead to good precision, machine translation allows us to assist humans in finding new terms that they may not think of. From the beginning of the project, we have pursued two different strategies in creation of French lexical cues that we detail below, followed by a merging process at the end.

Machine translation

Phase I: In this phase, our plan was to translate 356 terms of the English version of ConText into French. English online machine translation services were used to translate all the terms. Firstly, six dictionary-based automatic translators were queried: Babla, Sensagent, CNRS-ISC, Colins, Linguee, Wordreference. 7 Only the translated cues returned by at least three translators were kept. A prior study evaluated these translators for creating a sentiment lexicon and showed that a majority vote gives high-quality translation [START_REF] Abdaoui | FEEL: a French Expanded Emotion Lexicon, Language Resources and Evaluation[END_REF]. However, dictionarybased translators fail to handle compound terms (with multiple words). Therefore, a second list of French lexical cues was compiled using Google Translate. When several translations are proposed by Google Translate, we select only the first one which is the one with the

Table 1

Examples of English lexical cues and their French counterparts.

English French

Trigger terms "absence of , pre, neg" "is ruled out , post, neg" "history of , pre, hist" "mom , pre, exp"

"absence de , pre ,neg" "a été écarté , post, neg" "antécédents de , pre, hist" "mère , pre, exp" Pseudo-trigger terms "without difficulty , pseudo, neg" "no history of , pseudo, hist"

"sans difficulté , pseudo, neg" "pas d'antécédents de , pseudo, hist" Termination terms "although , termin, neg" "complains , termin, histexp"

"cependant , termin, neg" "se plaint , termin, histexp"

-S => Adj pour Verb -Adj => suffisant | satisfaisant -Verb => écarter | rejeter | éliminer
In which S, Adj and Verb are variables and synonyms are terminals. We grouped relevant French rules together and for each group we assigned several CFGs. After this semi-automatic processing, we obtained 737 CFGs that generate 10,147 French lexical cues from the 1322 initial English terms.

Manual validation

All the automatic translations have been checked, corrected and enriched manually by at least one bilingual biomedical text mining expert (among the authors). For instance, the English term "is ruled out" has been translated automatically to the French term "est écarté". We validated this translation but also added a new one: "est éliminé". Manual curation also consisted in adding different inflected forms from the automatically obtained translations (feminine/masculine, singular/ plural). For instance, the term "is ruled out" may be used either for a masculine or a feminine occurrence, which is not the case in French (masculine: "est écarté"/"sont écartés", feminine: "est écartée"/"sont écartées").

For translations alternatives generated from phase I, we implemented a dedicated web-based application to check (validate or delete) each automatic translation and generated alternative, as well as to add new translations or new corrected forms. At the end of this step, we automatically removed duplicates and obtained 574 manually validated French lexical cues.

For translations generated from phase II, we set-up a Jupyter Notebook to allow for the manual validation of generated translation alternatives -mainly deletion, and some additions or modifications of the CFGs. The CFG-based representation enabled the validator to perform quick corrections by directly modifying the rules and by applying changes to multiple rules simultaneously. 8 After the validation step, we were left with 402 validated CFGs that generate 8,981 French lexical cues.

Enrichment

After manual validation of French lexical cues in phase I, our list of cues was enriched with the two previously available French lists cited in introduction [START_REF] Deléger | Detecting negation of medical problems in French clinical notes[END_REF][START_REF] Garcelon | Improving a full-text search engine: the importance of negation detection and family history context to identify cases in a biomedical data warehouse[END_REF]. We first, automatically compared our list with the two previous lists. We found that most of the terms from these two lists were already present in our own (with the same category and context). We then manually verified all the remaining cues that we did not already have. This process allowed us to enrich our list with new terms (such as: "élimine") and new forms (such as the apostrophe: "aucun signe d'"). Our final phase I list contained 710 entries (negation: 470, possible: 134, experiencer: 72, historical: 42, hypothetical: 22). 9 The outputs of the phase I enrichment were directly merged to the outputs of phase II. Only 229 lexical cues were left and not already in phase II's list. Because the format of the lists were not exactly the same (phase I was in ConText's format were as phase II was in FastContext's format) we had to:

• Transform the possible cues into uncertain cues;

• Include default scope for each new added cues.

The final version of the French lexical cues consists of 10,147 French lexical cues (negation: 7668, non-patient: 528, uncertain: 1234, historical: 628, conditional: 89) after removing duplicated terms in the merging phase. This final list is publicly available for reuse by the community at https://github.com/practikpharma/FrenchFastContext . 10

Integration within the SIFR Annotator

The US National Center for Biomedical Ontology offers a web service for text annotation with ontology concept [START_REF] Jonquet | The open biomedical annotator[END_REF]. This service originally designed for biomedical data was not very suitable for clinical text annotation. In order to add new functionalities to the NCBO Annotator, we have designed a proxy architecture that enables seamless extensions of any NCBO-like annotator service by pre-processing of the input text and parameters, and post processing of the annotations [START_REF] Tchechmedjiev | Enhanced functionalities for annotating and indexing clinical text with the NCBO Annotator+[END_REF]. This proxy architecture has enabled us to integrate new features to both the SIFR and NCBO Annotator including contextualization, scoring, new output formats and coarse-grained semantic annotation (with UMLS Semantic Groups). For contextualization of recognized concepts, we have integrated ConText [START_REF] Harkema | ConText: an algorithm for determining negation, experiencer, and temporal status from clinical reports[END_REF] for English in the NCBO Annotator+, and French FastContext, presented here, in the SIFR Annotator [START_REF] Tchechmedjiev | SIFR annotator: ontology-based semantic annotation of French biomedical text and clinical notes[END_REF]. 11 The SIFR Annotator is to the best of our knowledge the only openly available web service enabling both recognition and contextualization of concepts from 30 medical terminologies and ontologies in text. The incorporation of FastContext into the NCBO Annotator for English clinical text, much expected by BioPortal's users, was a critical addition especially for hospitals installing the NCBO virtual appliance to locally process clinical text. 12 Automatic named entity recognition or semantic annotation (entity linking) of text is a prerequisite to the identification of clinical context, as modifiers are bound to particular concept mentions. Since the performance of SIFR Annotator has been extensively evaluated [START_REF] Tchechmedjiev | SIFR annotator: ontology-based semantic annotation of French biomedical text and clinical notes[END_REF] on currently available French clinical notes corpora i.e., Quaero [START_REF] Névéol | The QUAERO French Medical Corpus: a ressource for medical entity recognition and normalization[END_REF] and 8 The Jupyter Notebooks we used to semi-automate the generation of the French lexical cues for FrenchContext are publicly available and documented for reproduction here: https://github.com/practikpharma/FrenchFastConte xt-CuesGeneration 9 For archiving, this list is publicly available inside the French ConText code (see file ConTextFrench.java) : https://github.com/practikpharma/FrenchCon Text 10 The list is versioned to keep track of its evolution: the version presented in the paper and used for evaluation in Section 3 is v1. 11 Respectively accessible at http://bioportal.lirmm.fr/ncbo_annotatorplus and http://bioportal.lirmm.fr/annotator. 12 Our contribution is also currently being integrated by our partner at Stanford's BMIR developing the original NCBO Annotator inside the NCBO Bio-Portal (http://bioportal.bioontology.org/annotatorplus).

highest likelihood of success. At the end of this step, we automatically obtained a first list of 809 French lexical cues. This list was used in the first version of our work, French ConText released in 2017 [START_REF] Abdaoui | French ConText: Détecter la négation, la temporalité et le sujet dans les textes cliniques Français[END_REF].

Phase II: In this phase, our plan was to translate the 1322 existing English terms available in the FastContext implementation. We started with a semi-automatic translation of all the English terms to French with help of Google Translate. This provided our first seed term translations. The number of tokens for each term varied between one to eight. A list of relevant synonyms was assigned for maximum 3 tokens of each term. We obtained the synonyms from different sources such as: (i) synonym relations in Rezo-JDM [START_REF] Lafourcade | Making people play for Lexical Acquisition with the JeuxDeMots prototype[END_REF], a French lexical-semantic network; (ii) French WordNet [START_REF] Benoît | Building a free French wordnet from multilingual resources[END_REF]; (iii) other available online synonym dictionaries, namely: Cnrtl (http://cnrtl.fr), synonymo (http://synonymo.fr), Crisco (http: //crisco.unicaen.fr) and DicSyn (www.dictionnaire-synonymes.com). We manually curated the translation and removed the unrelated synonyms from the initial automatic generated lists. This simple strategy increased the possible number of translated terms. For instance, as for English term "adequate to rule out" we can have different valid French translations such as "suffisant pour écarter", "suffisant pour rejeter" and "suffisant pour éliminer", "satisfaisant pour écarter", "satisfaisant pour rejeter" and "satisfaisant pour éliminer". For the purpose of simplicity, we designed a compact Context-Free Grammar (CFG) based representation for the generation of translation variants. For example:

CéPIDC [START_REF] Névéol | CLEF eHealth 2017 Multilingual Information Extraction task overview: ICD10 coding of death certificates in English and French[END_REF] (the latter in the context of the participation of SIFR Annotator in the CLEF eHealth 2017 challenge [START_REF] Tchechmedjiev | ICD10 coding of death certificates with the NCBO and SIFR Annotator(s) at CLEF eHealth 2017 Task 1[END_REF]) 13 . In this paper, we focus on the evaluation of the context identification performance of FastContext alone (P/R/F1) on concepts already identified by SIFR Annotator.

The SIFR Annotator workflow is composed of several steps: dictionary creation from ontologies/terminologies, concept recognition, semantic expansion (with concept-to-concept mappings and is-a hierarchy), and post-treatment of annotations. Since FastContext needs pre-annotated conditions, the contextual features have been added in the post-treatment step. Once the user text has been annotated, the new component splits the text into several sentences using the full stop, then applies French FastContext to each annotation with the sentence that contains this annotation as a parameter. Finally, the obtained contextual features are added to each annotation and formatted in the user's requested outputs.

Fig. 1 shows the SIFR Annotator user interface and the results obtained on a concrete example. The input text is written in French, it can be translated as the following: "the patient has no sign of melanoma, even if his father had a history of skin cancer". The results table shows the first annotation (melanoma) is negated, recent, and concerns the patient, while the second one (skin cancer) is affirmed, historical, and does not concern the patient. To reproduce this example with the web service use the following REST call: The SIFR Annotator user interface is mostly used as a demonstrator or by novice users. Indeed, the service is conceived to be called automatically using a web service application programming interface and can be plugged within data curation and annotations workflows. In addition, because access to clinical data is often restricted to hospital information systems only, we have designed a Docker-based implementation (https: //github.com/sifrproject/docker-compose-bioportal) of the whole system that can be easily deployed locally; such as when used by the University European Hospital Georges Pompidou (HEGP).

Evaluation method

In order to assess the quality of French FastContext, we compiled a gold standard that associates each pre-tagged medical condition with its manually annotated contextual value.

Data sources

Since the type of the evaluation corpus has a huge influence of the context detection performance [START_REF] Wu | Negation's not solved: generalizability versus optimizability in clinical natural language processing[END_REF], we decided to evaluate French FastContext on two different types of health narratives:

-Death certificates obtained from the CépiDC causes of death corpus made available to the participants of CLEF eHealth 2017 task 1 [START_REF] Névéol | CLEF eHealth 2017 Multilingual Information Extraction task overview: ICD10 coding of death certificates in English and French[END_REF]. This dataset contains 31,690 causes of death certificates as free-text descriptions, in French, reported by physicians using ICD-10 codes. Each document describes the death of only one person and is composed of a list of short sentences. On average, each sentence contains a little more than 8 words. -Electronic health records (EHRs) obtained from the HEGP hospital describing patients' conditions and clinical reasoning. Data were confined inside the hospital and accessed only by authorized experts.

The data in question contains around 4 million documents of various medical sub-fields. The large number of documents allowed us to extract more candidate sentences compared to the death certificates, especially for the experiencer evaluation. The sentences extracted from EHRs were also longer than those extracted from the death certificates. On average, each sentence contains a little more than 16 words.

Data preparation

For each data source, we semi-automatically created three test sets to evaluate each of the considered contexts (negation, certainty, temporality and experiencer). A first exploration of the data showed that most of the medical conditions were affirmed, recent and concerned the patient. Finding conditions with non-default contextual values was difficult due to their scarcity, which made the annotation time consuming. In order to augment the number of conditions with non-default contextual values, we adopted the following method:

-First, we selected candidate sentences 15 containing trigger terms and the same number of sentences not containing any trigger terms. This process allows us to improve the chance of finding negated, uncertain, historical, hypothetical and non-patient related conditions in the candidate sentences, while still being able to find new forms that were not included in our trigger terms list. The authors of the Swedish adaptation of NegEx [START_REF] Skeppstedt | Negation detection in Swedish clinical text: An adaption of NegEx to Swedish[END_REF] reported a similar method. -Then, we used the SIFR Annotator to automatically annotate medical conditions in the candidate sentences. We restricted the annotation to keep only conditions tagged with a UMLS Semantic Type from the Semantic Group "Disorders (DISO)" [START_REF] Mccray | Aggregating UMLS semantic types for reducing conceptual complexity[END_REF] but we did not use any specific ontologies. For simplicity reasons, we kept only one condition per sentence -the first one appearing in the sentence- 16 and removed sentences without any annotated condition. The possible impact of this choice on the evaluation results are discussed Section 4.

Manual annotation

We manually annotated the context of each pre-tagged medical condition using the BRAT annotation tool (http://brat.nlplab.org). Each corpus was annotated by three human annotators. It is important to mention that the manual annotation only concerned the context of the automatically pre-tagged clinical conditions. Similarly, since the aim is only to evaluate French FastContext, the lexical cues that change the context of the medical conditions ('no sign of', 'history of', etc.) have not 13 During the CLEF eHealth 2017 campaign, the SIFR Annotator obtained median results compared to the rest of the competitors; ahead of other knowledge-based systems but behind specifically tailored supervised learning systems. It is encouraging especially considering that we have not customized in any way the service to process these specific data. 14 This web service call can be used "as this" for demo purposes. But for additional use of the SIFR Annotator we request users to register and use their own APIkey. See documentation here: http://data.bioportal.lirmm.fr/docu mentation and in [START_REF] Tchechmedjiev | SIFR annotator: ontology-based semantic annotation of French biomedical text and clinical notes[END_REF]. 15 The sentence segmentation was performed simply using full stops or newlines. 16 The first that has been detected by the SIFR Annotator which is not necessarily the real first appearing condition in the sentence. been annotated either. For more details about the annotation process, please visit the annotation guidelines that have been made publicly available. 17 The whole process (data preparation and annotation) took a couple of weeks in order to compile a gold standard for both death certificates and EHRs. Additionally, the manual annotations of EHR data had to be done in-house on HEGP's premises for data access security and privacy reasons.

The annotators were asked to choose the appropriate contextual value for each pre-tagged medical condition. However, they observed that possible and hypothetical conditions are very rare in the annotated clinical narratives. Indeed, only 6 conditions were annotated as possible, while zero conditions were annotated as hypothetical. We decided to perform a bi-class evaluation only for each context (negated/affirmed, historical/recent, non-patient/patient) as previously conducted when evaluating NegEx/ConText-like systems [START_REF] Skeppstedt | Negation detection in Swedish clinical text: An adaption of NegEx to Swedish[END_REF][START_REF] Deléger | Detecting negation of medical problems in French clinical notes[END_REF]. Therefore, due to corpus limitations, we do not evaluate the performance of French FastContext in detecting uncertain and hypothetical conditions, even though the system is implemented to detect them.

Table 2 presents the number of manually contextualized sentences within each test set. Each sentence contains only one medical condition detected automatically by the SIFR Annotator. We also present the Fleiss kappa [START_REF] Fleiss | Measuring nominal scale agreement among many raters[END_REF] agreement observed for each dataset.

Results

Using the manually annotated test sets presented above as gold standards, we have evaluated French FastContext. In this section, we Fig. 1. SIFR Annotator user interface integrating the new contextual features. In this example, the target terminology is the French version of the Medical Subject Headings (MSHFRE) and the annotations are filtered to the 'Disorders' semantic group [START_REF] Mccray | Aggregating UMLS semantic types for reducing conceptual complexity[END_REF]. The semantic expansion (hierarchy and mapping) is not activated and only longest matches are kept.

Table 2

Number and repartition of the annotated sentences between the different contextual values, as well as the average number of words in each sentence. The number of sentences is equal to the number of conditions.

Discussion

Here, we discuss the main limitations of this study, justify our choice of the ConText algorithm as a starting point, provide an error analysis of French FastContext implementation and present future extensions.

Evaluation: Even if the evaluation corpus considered two different types of clinical narratives, there are other specifications that may also influence the generalization of the presented results [START_REF] Wu | Negation's not solved: generalizability versus optimizability in clinical natural language processing[END_REF]. Hence, it is important to mention a few limitations regarding the evaluation corpus used in this work. First, our French FastContext system has been evaluated on only one type of medical entities (disorders). However, the SIFR Annotator is able to detect much more entities such as medications, procedures, anatomical components, etc. The choice of evaluating "disorders" has been motivated by the number of papers about clinical context detection that considered this type of medical entities (alone or among others) in their evaluation corpora [START_REF] Harkema | ConText: an algorithm for determining negation, experiencer, and temporal status from clinical reports[END_REF][START_REF] Wu | Negation's not solved: generalizability versus optimizability in clinical natural language processing[END_REF][START_REF] Chapman | Extending the NegEx lexicon for multiple languages[END_REF][START_REF] Velupillai | Cue-based assertion classification for Swedish clinical text-Developing a lexicon for pyConTextSwe[END_REF], including the original version of ConText that has been evaluated only for symptoms and disorders. In addition, detecting disorders and conditions was actually the driving use case of our project with HEGP hospital, that have motivated this work: extracting pharmacogenomics knowledge from French EHRs to compare them to state-of-the-art knowledge published in scientific articles and references databases [START_REF] Monnin | PGxO and PGxLOD: a reconciliation of pharmacogenomic knowledge of various provenances, enabling further comparison[END_REF]. Therefore, we have evaluated French FastContext for the most appropriate medical category (disorders) but significant additional work would be required to evaluate the applicability of our system to contextualize other types of medical entities e.g., drugs ("the patient is not treated by drug X yet").

Second, we have selected the candidate sentences in such a way as to have a balanced corpus where half of the selected candidate sentences should contain trigger terms and half of them should not. This willing selection made the class distribution of the evaluation corpus different from the class distribution in the original data -which might result in better performance measures. Indeed, the proportion of conditions having default contextual values (for example affirmed) is certainly higher in the original data. Therefore, the repartition of the annotated sentences between the different contextual values presented in Table 2 concerns the evaluation corpus and is not representative of the source corpora used to generate it. The results presented in Tables 3, 4 and 5 are also influenced by the corpus development choices, but they still consider sentences that do not contain any of our trigger terms. Moreover, as explained Section 2.4.2, the annotation protocol only considers the first annotated concept in each sentence for the FastContext evaluation, which may limit the relevance of the evaluation with regard to the quality of the termination terms: in complex sentences, we may miss errors that would occur on conditions mentioned later in the sentence due to a missing or incorrect termination term -but only when another condition explicitly recognized by the SIFR annotator would be in the sentence before. Plus, by picking up only one condition per sentence, our evaluation qualifies the capacity of the system to contextualize "conditions" and not mixed "condition sentences".

Finally, we could not find uncertain or hypothetical conditions in the corpora we used. Therefore, we could not evaluate French FastContext in detecting uncertain and hypothetical conditions. HEGP hospital's corpus of EHRs constantly grows with time as more data are anonymized and extracted from the medical information system [START_REF] Jannot | The diagnosis-wide landscape of hospital-acquired AKI[END_REF]. We hope that a later evaluation would include sufficient amounts of uncertainty and hypothetical modifiers to enable this evaluation.

Lexical cues: Third, despite our efforts to come with a generic list of lexical cues as good as possible, our experiments have shown that customization of the list is often needed for a specific use case. For example, despite a few exceptions (e.g., 'mère' or 'mere' (for mother)), we have present results obtained in terms of precision, recall and F1-measure for each evaluated context (negation, temporality and experiencer).

Negation

Table 3 presents the results obtained by French FastContext and the previous adaptation to French of NegEx [START_REF] Deléger | Detecting negation of medical problems in French clinical notes[END_REF] on the same annotated sentences (obtained by using Déléger and al.'s trigger term list). French FastContext system obtains better F1-measures on both types of clinical narratives. Mainly, our system obtains better recall for the prediction of the negated class which means that it allows to find more negated conditions. This observation is clearly explained by the expanded list of lexical cues that we have compiled and used as described in Section 2.2. Furthermore, our results show slightly better performance than the English and Swedish versions of ConText one evaluated on different corpora. Indeed, these systems obtained between 0.80 and 0.82 F1measures for the prediction of the negated class [START_REF] Skeppstedt | Negation detection in Swedish clinical text: An adaption of NegEx to Swedish[END_REF].

Temporality

Table 4 presents the results obtained by French FastContext on the annotated temporality sentences. Between 0.81 and 0.92 F1-measure is very good results for a first implementation for French. Indeed, the original English ConText algorithm obtained around 0.76 F1-measure for the prediction of the historical class [START_REF] Harkema | ConText: an algorithm for determining negation, experiencer, and temporal status from clinical reports[END_REF].

Experiencer

Table 5 presents the results obtained by French FastContext on the annotated experiencer sentences. The reported F1-measures (between 0.79 and 0.98) can be considered good results for a first implementation for French. In comparison, the original English ConText algorithm obtained an F1-measure of 1.0 for the prediction of the non-patient class, but using a test set composed of only five conditions that have been annotated as experienced by someone other than the patient [START_REF] Harkema | ConText: an algorithm for determining negation, experiencer, and temporal status from clinical reports[END_REF]. In our case, we have identified 360 conditions that are experienced by someone other than the patient. same segmentation tool used to evaluate the original ConText to make the comparison more accurate.

Superimposed errors: We are presenting here the evaluation method for the performance of FastContext alone, independently from the concept recognition performance of SIFR Annotator, since we want an evaluation that is comparable to the original evaluation of FastContext. Because errors compound geometrically on superimposed annotation tasks (i.e., first recognizing concepts and then contextualizing them) means that any true or false positive in the concept identification automatically results in a true or false positive in the context detection evaluation. Consequently, the joint recognition performance is roughly equal to the product of the performance ratios (i.e., in percentage points of P, R or F1). In our previous extensive evaluation efforts of SIFR Annotator for concept identification [START_REF] Tchechmedjiev | SIFR annotator: ontology-based semantic annotation of French biomedical text and clinical notes[END_REF], the concept recognition performance varies between 50% F1 and almost 70% F1. For instance, if we then have a negation recognition performance of say 80% F1, we will get a combined performance of roughly 40% in the worst case and 56% in the best case. This fact must be kept in mind when assessing the results of the subsequent evaluation of French FastContext.

Extensions: In this paper, we restricted our evaluation to medical annotations considered as disorders. It will be interesting to evaluate the ability of French FastContext to contextualize other annotations and to see if the current list of lexical cues can be generalized to other types of biomedical annotations. On another hand, some annotations do not have to be contextualized. For instance, medical devices or anatomy parts. Plus, some terminologies natively include some trigger terms (e.g., "aucun signe de" in SNOMED International v3.5) which makes no sense to contextualize. Even if these cases may be easily ignored, in the future, we will implement a way to remove them. Finally, we have been working on the development of a new entity recognition module based on the Unitex toolkit (http://unitexgramlab.org/). We are considering implementing FastContext in the form of Unitex graph patterns that will allow us to capture more intricate and precise contextual clinical information.

Conclusion

In this paper, we presented an adaptation and enrichment of Fast-Context to the French language. The proposed system allows to detect negation, temporality and experiencer of already annotated clinical conditions (and technically speaking, certainty too). The system has been evaluated on two types of clinical narratives and obtained comparable results to the English and the Swedish versions of ConText. When compared on the same datasets, French FastContext outperforms the currently available adaptation of NegEx to the French language due its extended list of French lexical cues. Furthermore, our system has been integrated in the SIFR Annotator in order to make it easily and publicly accessible for the biomedical community. This service can be accessed manually using a web user interface and automatically using a web service API. In addition, the SIFR Annotator can be deployed locally to process sensitive data in-house (thanks to Docker packaging). Our implementation has also been generalized to English with the annotations produced by the NCBO Annotator. In both French and English, we believe we significantly enhanced the functionalities of the original annotators especially for annotating clinical data. Our team is collaborating with the HEGP Hospital in Paris and the French INSERM (National Institute of Health and Medical Research) at Nancy university hospital to exploit the SIFR Annotator in concrete medical research environments. In both cases, a local installation of the SIFR Annotator (including French FastContext) has been set up because of data access restrictions. In addition to medical annotation, our system will be able to filter out negated conditions and those experienced by someone other than the patient, track the patient history of medical events, therefore helping the medical experts analyze their clinical data. not taken care of spelling mistakes in the list of cues. This will be a future improvement. For now, users will need to rely on an external spelling corrector when preprocessing the text to annotate. As another example, the scope of lexical cues might need to be customized too. We found a small change in the scopes of frequent lexical cues can have a significant impact on performance. We believe the externalization of the rules provided by FastContext and thus the SIFR Annotator (possibly locally installed) made such customizations easily doable.

Choice of ConText algorithm: Despite recently confirmed high performance obtained by state-of-the-art deep learning systems, in 2016, but still today, the choice of ConText to contextualize clinical annotations within the SIFR Annotator was also strongly justified by the fact that it can be easily plugged in the existing workflow. The persentence approach and the regular expression methodology of NegEx/ ConText/FastContext were quite relevant for the SIFR Annotator. The additional processing can be included in the post-treatment step in order to add contextual features to the concepts annotated in previous steps (either direct annotations or semantically expanded ones). For instance, the SIFR Annotator can generate a negated annotation with the concept 'cancer' (D009369) using MeSH hierarchy when the given text is "no sign of melanoma" because the concept 'melanoma' (D008545) has been directly identified in the text, then expanded with MeSH hierarchy and then negated. Another reason for that choice was the possibility to generalize the implementation done for the SIFR Annotator, to any NCBO-like annotator using a web service proxy architecture offering new functionalities (e.g., scoring [START_REF] Melzi | Scoring semantic annotations returned by the NCBO Annotator[END_REF]) by pre-processing of the input text and post-processing of the original results. Consequently, as presented in [START_REF] Tchechmedjiev | Enhanced functionalities for annotating and indexing clinical text with the NCBO Annotator+[END_REF], the SIFR BioPortal now offers the possibility of querying the original English-text-based NCBO Annotator and contextualizes its annotations. The NCBO Annotator+ (http://bioportal.lirmm.fr/ncbo _annotatorplus) offers the same parameters, user interface and results but in the backend, relies on the original NCBO Annotator and its compiled dictionary from +800 English biomedical ontologies and terminologies. 18Error analysis: We evaluated French FastContext and compared it with another available system for negation detection thanks to manually annotated death certificates and EHRs. Experimental evaluation shows that French FastContext obtains better results on both types of clinical narratives due to its extended list of lexical cues. However, error analysis conducted by comparing the gold standard corpus and the French FastContext results allowed us to identify 72 new trigger terms that were not present in our list of lexical cues. Obviously, these new trigger terms were not integrated in the version of French FastContext evaluated here but were later included within the available web service. All these new terms have equivalents in English that are not present in the original FastContext list of lexical cues. For example, the term "non identifie ´" was not present in our list because its direct English translation "unidentified" was not present in the original FastContext list. Therefore, we may also enrich the original English version of FastContext by translating these new terms. However, we believe that adding more trigger terms should have a limited impact on the results (except for another kind of data). Indeed, it has been demonstrated that only few terms occur a large number of times while many terms occur a small number of times [START_REF] Chapman | Extending the NegEx lexicon for multiple languages[END_REF]. Finally, as all ConText-based systems, the performance of French FastContext depends on the quality of the text segmentation into sentences. In our evaluation, this segmentation was currently based on the presence of a full stop or a newline. However, we have observed this is not always the case in clinical narratives. Therefore, in the future, we are planning to use more developed sentence segmentation tools [START_REF] Bird | NLTK: the natural language toolkit[END_REF] and plug them in into the SIFR Annotator workflow. 19 We could also use the

  14 http://services.bioportal.lirmm.fr/annotator/? text = Le%20patient%20n%27a%20aucun%20signe%20de%20 m%C3%A9lanome, %20bien%20que%20son%20p%C3%A8re%20a%20des%20ant%C3%A9c%C3% A9dents%20de%20cancer%20de%20la%20peau. &ontologies = MSHFRE &longest_only = true &exclude_numbers = false &whole_word_only = true &exclude_synonyms = false &expand_mappings = false &fast_context = true &score_threshold = 0 &confidence_threshold = 0 &lemmatize = false &semantic_groups = DISO &display_links = false&display_context = false &apikey = 1de0a270-29c5-4dda-b043-7c3580628cd5

Table 3

 3 Comparative evaluation results between previous performance of French NegEx and our French FastContext system on both types of clinical narratives.

				Precision	Recall	F1
	Death Certificates	French NegEx	Negated	1	0.675	0.806
			Affirmed	0.987	1	0.993
		French	Negated	0.923	0.900	0.911
		FastContext	Affirmed	0.996	0.997	0.996
	Electronic Health	French NegEx	Negated	0.989	0.648	0.783
	Records		Affirmed	0.901	0.999	0.947
		French	Negated	0.916	0.759	0.830
		FastContext	Affirmed	0.956	0.987	0.971

Table 4

 4 Evaluation results of the temporality detection on both types of clinical narratives.

	Precision	Recall	F1

Table 5

 5 Evaluation results of the experiencer detection on both types of clinical narratives.

	Precision	Recall	F1

For instance, the negation context accepts more values, such as: definite existence, definite negated, uncertain, probable existence, probable negated.

We originally (2017) adapted an older Java version of ConText[START_REF] Harkema | ConText: an algorithm for determining negation, experiencer, and temporal status from clinical reports[END_REF] (available at https://github.com/Blulab-Utah/ConText), and experienced numerous implementation issues, fixed later by FastContext.

Respectively available at the following URLs: http://fr.bab.la/dictionnaire, http://dictionnaire.sensagent.leparisien.fr, http://dico.isc.cnrs.fr/, http s://www.collinsdictionary.com, http://www.linguee.fr.http://www.wordrefe rence.com well on a specific corpus may lead to poor results when applied to another corpus. Therefore, we decided to evaluate French FastContext on two different types of health narratives: (i) death certificates and (ii) clinical notes from EHRs.The remainder of this paper presents and discusses the adaptation and enrichment of FastContext to the French language, the integration of French FastContext within the SIFR Annotator workflow and its evaluation on the chosen types of clinical narratives.

Note that in 2019, Stanford has integrated the NCBO Annotator + in the original NCBO BioPortal (http://bioportal.bioontology.org/annotatorplus).

We are currently working to include a StanfordNLP developed sentence segmentation component.

Acknowledgements

This work was achieved within the Semantic Indexing of French biomedical Resources (SIFRwww.lirmm.fr/sifr) and PractiKPharma project (http://practikpharma.loria.fr) that received funding from the French National Research Agency (grant ANR-12-JS02-01001 and ANR-15-CE23-0028) as well as by the European H2020 Marie Skłodowska-Curie action (agreement No 701771), the University of Montpellier and the CNRS. We would also like to show our gratitude to Maxime Wack, Rihab Khemiri, Marie-Charlotte Simon, Phan Hoang Ngoc Minh, Bastien Rance, David Baudoin, Hector Countouris, Sandrine Boulet, Antoine Barbieri, Eric Zapletal and Abdel-Ali Boussadi for helping us with the manual annotations. We also thank the US National Center for Biomedical Ontology (Stanford University) for their assistance with the NCBO Annotator, the CépiDC and CLEF eHealth 2017 organizers for their authorization to use the corpus, the HEGP hospital for accessing their EHRs. Finally, we thank the BLULab (University of Utah) for their information and code about NegEx/ConText and Louise Déléger and Nicola Garcelon for their list of French trigger terms.

Declaration of Competing Interest

The authors declare that they have no known competing financial interests or personal relationships that could have appeared to influence the work reported in this paper.

Author Contributions

MM and AA compiled the trigger term list, drove the evaluation and wrote together most of the manuscript. AT offered expertise in natural language processing and helped with the evaluation and writing. AA and AT jointly implemented the system. MM created phase II CFG-based group of the rules. WD helped with the evaluation and access to EHR data. SB helped with the supervision and driving of the project. CJ conceived the project, provided the scientific directions and extensively edited this manuscript. All authors declare the absence of any conflicts of interest and approve the final manuscript.