This work presents a case study of obtaining a UML class diagram from a syntactical analysis of a text using SBVR as an intermediate layer. We show how it is possible, with the help of model engineering, to realize two transformations: from a syntactical model into a SBVR model, and from a SBVR model into a UML model. This work has been done in collaboration between the ATLANMOD team in Nantes and the ILOG company.
In this usecase, we present a scenario for producing conceptual schemas in UML class diagrams out of a syntactically analyzed english text. The usecase chains two transformations and uses three metamodels (two of them from existing OMG's specifications). The first transformation produces SBVR models from Syntax models, where Syntax is an originally proposed metamodel for capturing syntax, grammatical dependencies and semantics of english sentences. The second transformation produces UML models from SBVR models. Each transformation can be used separately or chained depending on the scenario. These transformations have been successfully used in an application that first generates a syntax model from plain english text using constraint-based parsing techniques. The automatic syntactical analysis is however outside the scope of this usecase. The Syntax models can be either created manually or obtained using any language parsing technique. The packaged Eclipse project contains the three metamodels in KM3 and ECORE format, the two transformations in ATL format, and example models in XMI format.
In the following, we present an overview of the three metamodels, as well as a scenario example through terminal models corresponding to the sentence "Each company sells at least one product". This example is one of the scenarios included in the packaged Eclipse project.
Figure 1 presents an excerpt of the Syntax metamodel. The main class is "Cat", which represents a syntactical category. Categories can be either terminal (i.e with an associated word), or non-terminal (i.e containing other categories, a group of words). The main non-terminal categories are "SentenceCat" (sentences), "NPCat" (noun phrases), "VPCat" (verb phrases). The main terminal categories are "NCat" (nouns), "VCat" (verbs), "DCat" (determiners). Categories are related by grammatical dependencies, such as "subject" from verbs to noun phrases. Categories may also express an SBVR semantic through the "expresses" optional association.
Figure 2 presents a fragment of a Syntax model for the sentence "Each company sells at least one product".
Figures 3 and 4 present an excerpt of the SBVR metamodel, mainly the taxonomy of concepts "Representation", "Meaning" and "LogicalFormulation".
Figure 5 presents a fragment of the SBVR model obtained with the transformation "Syntax2SBVR" from the previously shown Syntax model.
Figure 6 presents a fragment of the UML model obtained with the transformation "SBVR2UML" from the previously shown SBVR model.
None at the current time.
Packaged Eclipse project
|The packaged Eclipse project, available in the ATL transformation zoo (with source files), contains the three metamodels in KM3 and ECORE format, the two ATL transformations, and a set of model samples as XMI files.|
Back to the top