# RTACompensator: Leveraging AraBERT and XGBoost for Automated Road Accident Compensation
## 2 Background
* **Congenital mutilation:** The doctor assesses whether the victim suffers from a congenital mutilation or not, and whether or not it has adverse effects on the victim's career, then categorizes it as quite important, important, or very important. * **Permanent physical incapacity:** For working individuals, determine whether the victim will face accelerated retirement, lose promotion eligibility, or be denied additional professional work. For students, determine whether the victim will face permanent or semi-permanent suspension of studies. Once the report is prepared, the doctor sends it to the judge via the clerk's office. The judge then notifies the victim's lawyer to receive a copy of the medical expertise report. Now that all the information is complete, the judge and the victim's lawyer proceed to calculate the amount of compensation. As Figure 2 shows, the first step in the process consists of determining the amount of the reference capital according to the law on compensation for those injured in accidents caused by land motor vehicles (Dahir Sharif No. 1.84.177 of 6 Muharram 1405 (2 October 1984)), the victim's birth certificate, and proof of wages or professional earnings. Article 5 of the law stipulates that the amount of reference capital is derived from the table attached to the Dahir (Figure 3). This table assigns a specific capital amount based on an employee's age and wage. If the victim is a student, the wage to be used is the value of the first wage listed in the table, as specified in Article 8 of the law. The next step involves calculating the initial compensation, which depends on the victim's condition. For a non-deceased victim, the judge assesses compensation for each type of damage suffered, guided by the medical expert's report and Article 9 of the law (Step 2 in Figure 2). According to this article, compensation for each type of damage is determined by multiplying the reference capital amount by the percentage of disability caused by this damage. To establish the percentage of disability for each type of damage, the judge refers to Article 10, which assigns specific percentages to each type (Table 1). Figure 3: Extract from the capital reference table presented in the law on compensation for people injured in accidents caused by land motor vehicles, with amounts specified in Moroccan dirahams (MAD). Figure 2: The process of calculating compensation for traffic accident victims. For example, if the medical expert's report indicates that physical pain is categorized as important, Article 10 assigns a disability percentage of 7%. Consequently, the compensation amount for physical pain is calculated by multiplying the reference capital by 7%. The total initial compensation is the sum of the amounts calculated for all types of damages (Equation (1)). \[IC=\sum_{k=1}^{K}Ref\_Cap*Dis\_Per\_Dam(k) \tag{1}\]  
where the following are used:  
* \(IC\) is the initial compensation, expressed in Moroccan Dirhams (MAD). * \(K\) is the number of damages sustained by the victim. * \(Ref\_Cap\) is the reference capital, expressed in Moroccan Dirhams (MAD). * \(Dis\_Per\_Dam(k)\) is the disability percentage for the damage k.  
Figure 4 outlines the process for calculating initial compensation in the event of the victim's death (Step 3 in Figure 2). According to the law, each right holder is entitled to two types of compensation: moral and material. The process begins with identifying those eligible for compensation for the loss of resources due to the victim's death. The judge calculates moral compensation using Equation (2) and Article 4 of the law. Rights holders receive the following:  
* **Spouse:** Twice the minimum wage or professional income. * **Ascendants or Descendants:** 1.5 times the minimum wage or professional income. \[Moral\_Comp(i)=Min\_wage*Coeificient(i)\] (2) where the following are used:
* \(Moral\_Comp(i)\) is the moral compensation for a right holder (i), expressed in Moroccan Dirhams (MAD).