THE USE OF ICT TOOLS IN GAINING KNOWLEDGE ABOUT LAW IN JUDICIAL DECISIONS

Summary: The use of modern ICT solutions of business intelligence is becoming more and more common, and are also increasingly used in the field of legal regulations, and above all in legal information management, advanced ICT solutions. The purpose of this article is to indicate the possibility of implementing modern ICT tools in order to obtain the knowledge contained in the judicial decisions. Court decisions, as one of the areas of creating and applying law, are a source of information resources for numerous groups of stakeholders. Therefore, the creation and use of IT tools to support the processes of gaining knowledge about law from court decisions is a legitimate direction in the development of legal informatics. The article is the result of literature research dedicated to the applications of ICT solutions in the area of creating and distributing legal information.


Introduction
Court case law is a valuable resource for legal professionals (i.e. solicitors and barristers) to understand how the law is applied. It is also the basis for ordinary citizens when the legal status is not clear. It should be noted that case law is not a source of law, as for example in American or English law, which are governed by the common law system. In continental law (applicable in Europe), case law is of an auxiliary nature. According to Art. 87 of the Constitution of the Republic of Poland, the sources of law in the Republic of Poland are the Constitution, statutes, ratified international agreements and regulations, as well as local law that is in force in the authority that established them. More than once, one can observe court decisions of an incidental nature, i.e. the factual and legal status is analysed for the first time, and the decision has not been known in other cases so far. Such decisions are known as "case-law".
The review of a large number of judicial decisions is problematic due to their number, therefore the use of IT solutions is most desirable. Nowadays, there are advanced legal information systems (such as the Legal Information System LEX 1 and the Legal Information System Legalis 2 ), as well as portals that allow to view court decisions issued by a given court [Internet 2].
In law, there is a field called 'legal informatics' "that studies all problems arising from the relationship between law and computer science, and therefore also includes issues related to the so-called IT law" [Petzel 2017, p. 30;Wierczyński, Wiewiórowski 2016, pp. 21-36]. The structure of legal informatics is discussed later.
This article aims to indicate the possibilities of using available ICT solutions, such as Artificial Intelligence or Machine Learning, in discovering knowledge from databases of judicial decisions.
The research methods used in the article were a critical analysis of the literature in the field of judicial decisions, and trends in the use of modern solutions in the area of business intelligence.

Literature research
The decisions issued by the courts are the result of applying the law. In legal theory there are two takes on the concept of "application of the law": 1. In the strict sense -"legal actions (acts) qualifying specific individual situations (facts, relations) according to the legal norm" [Rot 1994, p. 107]. These include court decisions and administrative decisions, in this case dealing with an individual case that is subject to resolution by a competent authority.
2. In the broader sense -" the implementation of law, meaning all activities of state bodies, institutions, offices, social organizations and citizens based on legal provisions. In this sense, it can be said that law-making is also the application of law, i.e. the application of legal norms of a correspondingly higher order (e.g. by issuing a regulation, we implement the law" [Rot 1994, p. 107]. The judicature itself consists of judgments issued by common courts (district, regional and appellate courts, the Supreme Court), military courts, administrative courts (provincial administrative courts and the Supreme Administrative Court) and Tribunals (Constitutional Tribunal and State Tribunal). According to Art. 174 of the Constitution, courts and tribunals issue judgments on behalf of the Republic of Poland; they are an expression of the rule of law.
The court, when receiving a statement of claim or indictment (in criminal proceedings), first analyses the case, then checks during the trial that the indicated legal norm (or legal norms) has been violated. For this purpose, it must interpret the law, i.e. determine the meaning of a legal text or a specific legal provision. At this point, the process of reconstructing a legal norm from a legal provision takes place, i.e. it is "a group of activities that make up the process of building a linguistic statement shaped like a legal norm. A standard is understood here as a linguistic product resulting from the establishment and completion of legal provisions that will contain all the elements provided for in the adopted concept of the structure of a legal norm. The starting point for the reconstruction process should be the determination of: the addressee of the standard, the class of the situation in which the standard will be applied (the scope of the standard's application), the normative operator and the class of behaviour prescribed or prohibited by the standard (the scope of the standard's application, looking for such provisions that will correspond to all the elements required by the adopted concept of building a standard" [Bator (red.) 2016, p. 238].
"Each judgment is based on a specific factual situation, which is constantly analysed and confronted with a specific norm of substantive law corresponding to it. As a result of the procedure, this standard is to be specified in relation to an individually designated addressee" [Zimmermann 1981, p. 11].
The main goal of judicial decisions is the implementation of the Latin principle of res judicata (the dignity of the judgment). This principle means that once the matter is resolved between the parties, it cannot be re-considered. This is to protect the parties from overly suing each other for the same reason.
Another important feature of court judgments is that each court has to respect the court decisions issued in other proceedings; it is about both the respect by courts of the same order (e.g. District Court -District Court) and higher level courts (the situations when the Supreme Court adopts a resolution in a panel of seven judges, is respected not only by itself, but also by courts of appeal, district courts and district courts) -respecting 'top down' judgments.
As noted in the legal literature, "often careful analysis of judicial decisions allows the conclusion that in some cases courts seem to replace the legislator, in fact introducing legal norms into the legal system that would be difficult to interpret from the legal texts (regulations) themselves. This happens when these provisions are unclear or raise doubts of a praxeological or axiological nature. In the latter case, the rational legislator's paradigm is challenged, which suggests the need to interpret the provisions in a way that deviates from their direct linguistic meaning. Courts are then inclined to >>correct the legislator<<, and in the case of identified gaps or ambiguities -even replace it, facing the need to issue a judgment in an individual and specific case " [Bąkowski, Grajewski, Warylewski 2008, pp. 79-80].
The court decision itself consists of two parts, namely the thesis of the decision in which the decision is contained and the justification, where the court states the facts, the legal status and the premise of why the decision is the way it is. The importance of the justification is important because: • allows to determine what behaviour is consistent with the standard of conduct and what is not; • determining the evidence that was taken into account in examining the case; • evidence that has been denied probative value and why; • it allows to submit an appeal to a higher-level body and indicate the failings of a lower-level body. "In practice (legal provisions are silent on this subject), two constructional elements are basically distinguished: the so-called historical part and the legal part. The first includes a description of the history of the case and -against this background -the actual state of affairs, while the second includes legal considerations (in some way this reflects the activities related to the determination of the legal status). Sometimes the section devoted to the presentation and evaluation of evidence is also distinguished -as a separate element of the justification or a component of the historical or the legal part. The use of strategies and techniques for preparing justification is observed for both essential parts of the reasoning (with the exception that a more natural space for the use of techniques is rather a legal part, because it is characterized by a greater freedom as to its content than the historical part, which is determined by the statements of the parties and other entities, the circumstances of the case, etc.)" (more: [Rzucidło-Grochowska 2017, pp. 60 etc.]).
At the start, it is necessary to define the very concept of knowledge and its role in law. Regarding the concept of knowledge, there is no single definition, it can be understood as cumulative information that was created on the basis of an appropriate interpretation of the data set. Data included in the case files are processed into information about the case based on their logical connection. As a result, the judge has an initial picture which is validated during the trial if necessary. During the hearing, the judge obtains additional information, e.g. how the participant in the proceedings (witness, defendant, plaintiff, defendant, prosecutor) behaves during the questioning or in the courtroom itself. Such additional information can change the previously acquired knowledge from the analysis of case files, as well as affect the final result of the decision.

Methodology
In the primary research method, the authors focused on: the literature review centred on bibliographic studies, analysis of the available IT solutions offered on the market and creating a prototype of the system, performing test searches and the analysis of the results.
The first point to explain are the basic concepts, which are the 'method' and 'technique'. A 'method' -according to the dictionary -means "consciously used way of conduct aimed at achieving the intended goal" [Internet 4], and 'technique' -"1. knowledge of the practical application of scientific achievements in industry, transport, medicine, etc. ; 2. method; 3. learnt and practiced ability to perform certain activities" [Internet 5].
The legal informatics currently deals with the following issues [Petzel 2017, p. 39]: • related to the creation of computer systems for retrieving legal information, • related to the creation of automatic resolution systems, • related to the creation of factual systems.
Based on the structure of legal informatics outlined in this way, one can also add the issue related to knowledge management, both by creating methods of acquiring knowledge, evaluating and managing knowledge about the law as a whole.
In fact, when analysing court decisions, one is looking for solutions that fit the case in order to know how to behave. Additionally, case law is able to provide us with much more than is needed. The legal literature indicates that "in assessing the significance of the Supreme Court's jurisprudence for the formation of specific institutions in the Polish legal system, it is essential to be aware of the constitutional location of this court, its functions and specificity in the entire justice system" [Bąkowski, Grajewski, Warylewski 2008, p. 75].
Judicial decisions are simply not uniform. It may turn out that the court does not apply the established jurisprudence path, but issues a different decision. In fact, such a situation may disturb the functioning of the well-established judicial path in a specific case. This could be viewed positively. Such a change may take place when the legal provisions obviously change, i.e. the fundamental content of a legal provision changes, which, by way of interpretation, changes the content of a standard of conduct or the provision is repealed (i.e. ceases to apply). Other cases of departing from the uniformity of jurisprudence -indicated by Syryt [2015, p. 34] -include, for example, a change in socio-economic relations, technological development, and a change in the approach to certain values. Departure from uniformity may help to avoid -as pointed out by Łętowska -"schematization of the adjudication and disregard for development of hard cases. On the other hand, the excessive avoidance -in the name of uniformity -of the opportunity for interpretative innovation is a collision of the requirement that between the »adjudication« and »the administration of justice« there is no tension detrimental to the latter, and that the schematic technique of adjudication does not eliminate the judge's reflection" [Łętowska 2015, p. 5].
Therefore • what are the relations between the authorities and the citizen and vice versa.
In this area, modern methods and techniques of knowledge discovery can find wide application.

Results
The original method of discovering knowledge from court decisions was to manually browse through them and read their content. Reviewing them was time consuming and it was not always possible to find the necessary decision quickly. The advancement of information technology has in a way helped to solve this problem by creating databases of the statements that offered a simple user interface to browse through them by indexing their content. Responses from such a database were shown based on the indicated string of characters. Depending on the level of advancement of this solution, the entered words were either inflected based on a defined dictionary, thanks to which the search was more precise, or it gave a negative result due to the lack of matching of the words.
In the Legal Information Systems LEX and Legalis, there is a separate section where court decisions are located. This enables all of them to be searched based on the words entered that match their occurrences 'one by one' (pattern matching), or occur independently of each other, while another convenience of their solutions is the assignment of the concluded judgments to specific articles of a legal text. This makes it possible to review only those judgments that relate to a specific article. In this way, the user has the opportunity to freely familiarize themselves with their content, as well as pre-filter the information.
Another technique that can be use is text mining which helps to extract the required information from the large amount of unstructured fields. "Text mining discovers new pieces of information from textual data which is earlier unidentified or secret information by extracting it using different techniques" [Dang, Ahmad 2014, p. 22]. The authors identified the basic text-mining techniques which are: information Retrieval, Information Extraction, Categorisation, Clustering, Summarization [Dang, Ahmad 2014, p. 23]. The source can be a flat files (like simple text files, sv, pdf, excel, etc), databases (relational and no-sql type), websites, Operating Systems / applications log files / event journal. Using text mining it is possible to create a script/program (using Python, Java, C#, etc), which will search through the sample and extract the specific patterns, like accepted evidence, evidence which was rejected, specific judges' comments etc. The extract can be then further processed in order to produce input for the further possibilities described below.
"Business Intelligence (BI) is a combination of technology and the recognition of the appropriate perspective of analyses and decision paths (…) BI systems consist of three basic elements (layers), which are HD (data warehouses), advanced analytical techniques and data visualization techniques (corporate portals))" [Nycz 2012, p. 55]. Creating an appropriate database on which it will be possible to base all the analytics using the methods and techniques described below will allow for quick answers to specific questions, including knowledge generation and evaluation.
There is also a dedicated algorithm used to build expertise systems, like PRISM [Cendrowska 1987, pp. 349-370] The prototype was created using Prolog programming language, and based on the database containing facts and rules, and the 'interpreter' which allows to validate the database.
The interpreter is based on the free version SWI-Prolog [Internet 12] software. The database was created using on the entries entered by the user in the single flat file. Is worth mentioning that each modification of the database will cause another compilation of the file, which can show if any errors were discovered in the syntax. If so, the error message will point the place.
Once the database is filled with the facts and rules (if needed) presented in Figure 1, then using the interpreter other users can perform the validation by asking the questions (in specific format) presented in Figure 2: Based on the PRISM and C4.5 algorithms, it is possible to create rules on which then the expert system will then be filled and tested. PRISM algorithm allows to quickly extract the rules based on the learning sample. Algorithm C4.5 enables to detect rules by building decision tree. Then based on the created tree, additional rules can be extracted and further processed. The evaluation of the obtained rules can be based on the entropy calculation, precision calculation, classification, accuracy, etc. Another possible technique is the use of an ontology. "Currently, ontologies are the subject of research in various research facilities, including information systems engineering, knowledge engineering, natural language engineering, and knowledge management theory. The first practical applications in computer science are derived from artificial intelligence; they were used there to facilitate the sharing and reuse of the accumulated knowledge (…) knowledge representation technologies are designed to model and represent knowledge structures in a way that is readable for both human and machine. Considering interpersonal communication as a point of reference, we are thinking about creating an autonomous system that classifies and categorizes concepts that are, in a way, metalanguage. Knowledge engineering assumes that ontologies should be easily processed by machines and humans" [Grzelak 2013, p. 160]. "In the case of the semantic web, the development of ontologies is to enable machines to understand data available on the web or to convert data to such a form. The semantic web technology created on the basis of ontologies is to enable the effective management of the huge amount of information that is shared on the web. In this case, ontologies are used to unambiguously define the meaning of information, and in conjunction with a semantic tag of information, they are to enable the structuring of documents allowing for their more precise search, automatic integration and information exchange, and at least to some extent -the automation of conclusions" [Cyrul, Duda, Opił, Pełech-Plichowski 2014, pp. 155-156].
Another technique is to use temporal knowledge bases. "By temporal intelligent system we mean an artificial intelligence system that explicitly and directly carries out temporal inference. For an intelligent system to be considered temporal, explicit temporal references must be at least in the representation and inference layers. At the same time, temporal reasoning is inference in which time is the basic dimension " [ Mach-Król 2015, p. 29], who in one of her publications analysed the possibility of using the VTKB method in the analysis of legal acts on the example of regulations on economic activity. As there were three governing acts used in the example, each of them carried different rules for starting, running and terminating a business". These aspects can be briefly characterized as follows: a) "time in law -temporal units and relationships in legal texts, b) law over time -law changes over time, just like legal knowledge, i.e. knowledge of law, c) transitional law -when the law changes, not only the new regulations apply. Sometimes it is necessary to apply the previous (old) rules, and sometimes -both of them " [Mach 2006, p. 94].
Therefore the proposed flow of the activities could be as shown in Figure 3:

Discussion
The use of artificial intelligence, or the narrower field of machine learning, may facilitate the initial data processing, based on an additional algorithm that will be defined at the stage of creating the IT system. One such example is the solution from Lex Machina. Since this solution concerns American law (common law), which is different from the law in force in Europe (continental law), it is worth presenting how the provisions of American law are 'processed'. The system acquires the data from the following external systems: PARCER 3 , USPTO 4 , EDIS 5 and state courts. Then the data are filtered and brought to a common form 6 , which are then processed through implemented algorithms and further analytical processes to provide users with refined high-value data. According to the company, the system can be used by judges and courts, law firms and lawyers, and others. This solution is to facilitate the resolution of cases, as well as to check whether similar cases have taken place at any one time and to confront them with the existing settlements. The implementation of this solution in Polish law (implementation in 1:1) would not be possible due to differences of the law itself. However, the knowledge of how the solution was implemented, meaning which technology, algorithms, manner of its implementation, could help in the creation of the solution in Poland.
The current legal information systems are not able to provide an exact answer to the legal question, but rather provides a set of information which then has to be interpreted by people. The information processing must be planned and develop standards for gathering, processing and using them. In this area, studies from information management field would also be helpful to prepare the dedicated legal solutions.

Conclusion
When creating a solution, it is important to define how the data will be obtained from the sources. Currently, it is possible to connect directly to a given database or use a dedicated API (Application Programming Interface) or web service to obtain the desired data. In the case of court judgments, it is possible to use the web scraping technique, which consists in downloading specific content from a website by selecting specific tags in the HTML code. Then the data can be saved in a dedicated database, or in appropriate flat files. This would be the starting point for further analysis.
The implementation of a full IT solution aimed at acquiring full knowledge about the applicable law requires joint work between representatives of IT specialists, linguists and lawyers. Since the IT and legal languages are different from the Polish (natural) language, a 'bridge' between them is required.
IT specialists would be able to write/select appropriate software with the use of appropriate algorithms and implement them using programming languages, while lawyers could indicate how these algorithms are to generate full information about the applicable law, which can then be used to create a prototype of an automatic system settling. Linguists would provide information as to what extent words should be processed, including help in building dictionaries and indications of grammatical rules that will be able to generate understandable and correct verbal messages. Before such a system appears, additional research must be carried out in this area (regarding the facts and rules -how to extract them from legal acts and judgement decisions), not only in the selection of appropriate tools (what kind of algorithm and which method of implementation will be appropriate), but also in establishing the relationship between the acquired knowledge and the applicable legal status (the use of BI solutions and/or Big Data). Therefore, the authors will undertake further research to present the proposals for the use of the solutions mentioned previously by analysing them and preparing preliminary UML and BPMN diagrams, as well as creating a concept for the functioning of the future system.