# Building a Taiwan Law Ontology Based on Automatic Legal Definition Extraction
## 3 System Architecture
### Ontology Data Model  
The Taiwan law ontology we built consists of the following components: class, instance, relation, and attributes. In this topology, classes are concepts or categories. Specifically, each legal keyword extracted automatically from the statutes/articles is defined as a class. Furthermore, the classifications from the Taiwan Six Codes structure are also defined as classes. Each class may have the following attributes: \(<\mathit{hassource}>\), \(<\mathit{hasdefinition}>\), \(<\mathit{hasinstance}>\). The attribute \(<\mathit{hassource}>\) describes from which statute and article number the class was extracted. The attribute \(<\mathit{hasdefinition}>\) is the key contribution of this paper which gives the automatic extracted legal definition for the class by using the aforementioned definition pattern. Figure 9 shows a basic class with its attributes \(<\mathit{hassource}>\) and \(<\mathit{hasdefinition}>\).The attribute \(<\mathit{hasinstance}>\) is used to describe a concrete object of the class. Notably, since each legal keyword may appear in more than one statute and has more than one legal definition, each of these source statutes and definitions is described by separate attributes. In other words, each class may have multiple \(<\mathit{hassource}>\), \(<\mathit{hasdefinition}>\), or \(<\mathit{hasinstance}>\) attributes. Let us examine an example which shows the need for multiple \(<\mathit{hasinstance}>\) attributes. Figure 10 shows Article 6 in the Consumer Protection Law [D3]SDOC. The phrase \"competent authorities\" is identified as a legal keyword by our system. The article also matches one of the legal definition patterns. However, with the ICTCLAS tool, the auto extraction system is able to identify that the definition part consists of three sub-sentences, each of which defines a different level of administrative authority, namely, central government level, municipal level and county/city level. Consequently, the \"competent authorities\" class will be constructed with attributes as shown in Figure 11. The \(<\mathit{hassource}>\) attribute indicates that its source article is \"Article 6 in the Consumer Protection Law\". We give the \(<\mathit{hasinstance}>\) an additional tag to differentiate which level of the instance. Specifically, \(<\mathit{hasinstance}:\mathit{county}-\mathit{city}>\), \(<\mathit{hasinstance}:\mathit{municipal}>\), \(<\mathit{hasinstance}:\mathit{central}>\) indicates the administrative authority at the county/city, municipal, and central level, respectively. In addition, in order to distinguish different components in the ontology graph, different colors and symbols are used to represent different components. The classes and attributes are represented by yellow circles and the instances are illustrated by purple diamonds. Figure 10: The sample statutes. Figure 9: The general class model. There are six types of relations between two classes: \(<kind-of>\), \(<associated>\), \(<same-origin>\), \(<sub-class>\), \(<is-Classified-As>\), and \(<has-Source>\). First, the \(<kind-of>\) relation, denoted by a pointed arrow between two classes describes that the origin class is the superclass of the pointed class. It is also often referred to as \(<is-a-superclass-of>\). Second, the \(<associated>\) relation means that the pointed class appears in the legal definition of the origin class of the pointed arrow. This relation is a specially designed relation for the purpose of this topology. Third, the \(<same-origin>\) relation between two classes means that they share the same source statute. Fourth, the \(<sub-class>\) relation, which is also denoted by a pointed arrow between two classes indicates that the origin class can be divided into the pointed classes. Each pointed class is a part of the origin class. The origin class might have multiple \(<sub-class>\) relations with multiple pointed classes. All the pointed classes constitute the definition of the origin class.