Elamur Research

Comparing the Template-Based Approach to GF: the case of Afrikaans

Paper · 2016 · Lauren Sanby, Ion Todd and Maria C. Keet

Summary

An ontology can make the rules of a subject explicit while leaving the people who know that subject with a difficult document to read. The paper studies how to turn an ontology written in OWL into sentences in Afrikaans so that a domain expert can inspect what it says. The authors build two systems for this kind of text generation. One fills in Afrikaans sentence templates selected according to the kind of statement in OWL. The other uses Grammatical Framework, or GF, to represent the statement in an abstract grammar and express it through an Afrikaans grammar. Afrikaans already had a GF library, but the authors had to extend it for this task and build the software that connects it to OWL.

Both approaches produced readable Afrikaans, with different demands on developers and users. The template system takes its vocabulary from the ontology, so someone must supply Afrikaans terms when the ontology uses another language. The GF system can translate those terms automatically. Templates also let their developer shape individual sentence patterns directly. The authors spent part of the time saved on development improving details such as the capitalization and spacing of property names. The GF implementation used some of its development time on automatic translation, file generation and the connection between the grammar and the ontology.

Across the test ontologies, the template system averaged 96.8% axiom coverage and 12.7 milliseconds per sentence. The GF system averaged 93.3% coverage and 18.3 milliseconds per sentence. The ordering varied by ontology, and the timings include work specific to each implementation. An Afrikaans-speaking domain expert gave the template outputs a mean comprehensibility rating of 4.4 on a scale with a maximum of 5. The GF outputs averaged 3.5. The authors’ statistical comparison reported p = 0.12852, so the ratings establish a descriptive advantage for this set of outputs, with uncertainty about how consistently that advantage would recur.

The examples show why readability, coverage and fidelity to OWL need separate attention. Both systems can express that classes are disjoint, while both misstate the direction of a property hierarchy in the example discussed. Templates express some constraints more precisely and support data properties in this implementation. GF contributes automatic vocabulary translation and an architecture designed to accommodate multiple natural languages. The authors conclude that both approaches are feasible. Afrikaans makes templates relatively easy to refine and extend, while GF requires more initial development and offers a reason to make that investment when multilingual generation matters.

Deep dive: Comparing the Template-Based Approach to GF: the case of Afrikaans

The study compares Afrikaans templates with Grammatical Framework for turning OWL ontologies into sentences, measuring coverage, speed and readability. · about 33 minutes to read

The problem and its context

An ontology has to be read as well as processed

An ontology records distinctions and relationships that matter in a domain. In the paper’s wine examples, it can say which kind of wine belongs to a broader category, which flavours are allowed, and how properties such as being made from grapes relate to other properties. OWL lets an author state these relationships formally. A single axiom, the term the paper uses for a statement in an ontology, can combine categories, properties and restrictions in a way that a program can process. A domain expert may understand the subject well and still need help reading the OWL expression well enough to check it.

The paper places that difficulty within the knowledge acquisition bottleneck. The person who can judge whether a claim is appropriate for the domain and the person who can inspect its formal encoding may have different expertise. An Afrikaans sentence gives an Afrikaans-speaking reviewer a way to read the claim in familiar terms. The sentence still has a technical job to do. It has to carry the meaning of the axiom through the change in representation, including such details as which class is narrower or whether a property restriction concerns permitted values.

There is a difference between recognizing the vocabulary and understanding what the axiom asserts. For example, a reader could recognize terms for sugar and wine and still come away with the wrong rule if a conditional places its premise and conclusion in reverse order. A fluent sentence can make that mistake especially consequential because the reader has little reason to question its form. Conversely, a sentence with an awkward article or a compressed property name can preserve the underlying relation while making the reviewer work harder to see it. The paper’s comparison follows both dimensions through concrete examples.

The units of the task are statements already present in the ontology. A system has to recognize a statement’s form, pick out its parts and express their connection. A class hierarchy calls for language that makes inclusion clear. A relation with an inverse calls for a way to state what happens when the participants exchange positions. A declaration that several individuals are distinct calls for a sentence about all of them. These jobs share a source format, yet they place different demands on the Afrikaans sentence.

That distinction also explains the value of studying generation for a language new to this application. A design can look simple when a developer already has good ways to express its axiom types and a lexicon that fits those expressions. Starting with Afrikaans required the authors to make those decisions visible. They needed to decide how the axiom’s terms would enter the sentence, who would translate them, and which grammatical details would be handled by a local sentence pattern or by a more general grammar.

Approaches the authors had to choose between

The paper describes natural language interfaces as an established avenue of work in the Semantic Web. It points to surveys of that intersection and to systems that already used templates to generate text from OWL. In this setting, a template is a sentence pattern with places reserved for the parts that change from one axiom to another. A developer can prepare a pattern for class disjointness, for instance, then reuse it with different class names. The reusable words express the relation, and the supplied names identify its participants.

The authors also mention pattern-based verbalisation and grammars for controlled natural languages. A controlled natural language restricts the available expressions so that the form of a sentence can help make its interpretation predictable. The paper cites work on isiZulu as an example of using patterns to verbalise logical statements. Its later discussion returns to that language because the effort of making a pattern produce the correct surface form depends on the language’s grammar. The difference matters when a sentence frame has to accommodate several words that change with the expressions inserted into it.

GF represents a different route into the same problem. It provides a functional programming language for grammars and distinguishes the abstract structure of an expression from its concrete rendering. The abstract grammar gives the verbaliser a way to represent the structure that will be expressed. The concrete grammar describes how that structure is assembled in a particular language. The paper discusses GF in connection with translation and cites earlier use of it for verbalising ontologies in controlled Baltic languages. The comparison therefore brings together two approaches already used in related work and asks how they fare when developers build substantial Afrikaans support for the same input task.

The difference in architecture is easier to understand through an operation both approaches need. To verbalise disjointness, each must recognize that the input connects classes, select the names of those classes, and convey their exclusion. An Afrikaans template can put the names straight into a frame whose fixed words already express exclusion. In GF, a function in the grammar receives the corresponding arguments, and the Afrikaans concrete definition tells GF how to render them with the required words. For this simple relation, the sentences can have almost identical structure. The approaches differ more in where the rule lives, what can be reused elsewhere, and what work is needed to get from an OWL file to the arguments of the rule. These are choices about syntax and grammar formalisms.

A grammar with an abstract layer is especially relevant when the same input should eventually be expressed in multiple languages. A concrete language module can encode how its own sentences work while taking the abstract representation as its starting point. That benefit depends on the application’s requirements. A developer building an Afrikaans verbaliser has immediate work to do on the Afrikaans concrete grammar and on the software that supplies it with the right input. A template implementation has an immediate advantage where a recurring axiom shape can be expressed accurately in a straightforward Afrikaans frame.

What the Afrikaans comparison was designed to establish

The authors wanted to know what it would take to develop either kind of verbaliser for a language that lacked one for the task. They describe the development as a fairly controlled comparison. The developers had similar computer science backgrounds and worked within the same time frame. Both implementations were supposed to take OWL files and produce Afrikaans sentences. The template work included a formal correctness specification and a proof-of-concept implementation. The GF work required extending the available Afrikaans grammar resources and building the connections that allowed GF and OWL files to work together.

The common task makes it possible to ask comparable questions. How much of an ontology does each program handle? How long does each take to produce its output? Can a domain expert read the result comfortably? Individual axioms then give more precise questions about the sentence design. Does the result tell the reader which class is included in another? Is a restriction on allowable values visible as a restriction? Can a reader identify what follows from a property assertion? In this paper, feasibility involves both the mechanics of getting a sentence and the care required to make the sentence worth reading.

Afrikaans also makes the comparison informative about the role of the target language. The authors describe it as having relatively few complications from morphology, the way word forms vary, and a less elaborate agreement system than the isiZulu example they discuss. A developer can frequently retain an ontology’s property phrase and put it into an Afrikaans frame without having to derive several forms of it. At the same time, the paper’s focus on articles, negation, word order and words marking restrictions shows that even a language amenable to templates still requires explicit choices about how to realise formal meaning in a sentence.

The method, step by step

Start with what the axiom says

Both systems take an ontology file as their starting point. A verbaliser needs the kind of axiom and the expressions that fill its roles. If the axiom places a named class under a broader class, those roles are the narrower and broader categories. If the axiom specifies disjointness, the class names occupy the places on either side of the exclusion. For a restriction involving a property and a set of possible values, the property, the values and the kind of restriction all have to survive the move into Afrikaans.

An ontology name can carry enough meaning for the intended reader once it is presented in the right form. The same reader may find a property name easier to interpret when the spaces between words are restored and the capitals follow ordinary sentence usage. Names also introduce a separate language problem. If a system keeps ontology terms as supplied, the person preparing the ontology must provide Afrikaans terms where needed. If it translates them, the translation has to fit the role the names play in the Afrikaans sentence. The paper’s implementations assign this work differently.

From an OWL axiom to an Afrikaans sentence

The steps in order.

From an OWL axiom to an Afrikaans sentenceStep 1: Read the ontology file1. Read the ontology fileStep 2: Identify the axiom type and its arguments2. Identify the axiom type and its argumentsStep 3: Obtain Afrikaans names for the terms3. Obtain Afrikaans names for the termsStep 4: Select the template or build the GF expression4. Select the template or build the GF expressionStep 5: Assemble the words in Afrikaans order5. Assemble the words in Afrikaans orderStep 6: Write the verbalised sentence6. Write the verbalised sentence

This flow describes the shared work at the level of an axiom. The template implementation supplies Afrikaans terms from the ontology vocabulary and matches the input against a pattern. The GF route includes preprocessing, vocabulary translation and the construction of material that its grammar can use. The coverage of axiom types determines which statements can reach the final step in either program. How well the sentence preserves the axiom depends on the rule selected and on the way the rule is written.

Design a sentence frame around the logical relation

The template work began with surface realisation, the choice of actual wording and sentence structure for a given input. The authors illustrate this with a statement that puts every branch in the class of things that are part of a tree.

Tak ⊑ ∃is deel van.Boom

Tak names the class of branches and Boom the class of trees. The sign ⊑ means that everything belonging to the expression on its left also belongs to the class described on its right. ∃ introduces an existential restriction. is deel van names the relation of being part of something. The dot separates the relation from Boom, the class that supplies the possible related objects. Together, the symbols say that for every branch there is a tree of which that branch is a part.

The authors consider a phrasing built around obligation and one that keeps the relation in place and makes existence explicit with ten minste een, meaning at least one. Both can communicate the intended relationship to a reader. The obligation wording requires rearranging parts of the verb phrase. A frame that uses the relation directly can insert the property name where it would normally appear and add the wording about existence next to the related class. This makes the range of usable ontology names part of the sentence design. A pattern that requires a property to be taken apart places more demands on the software or the person preparing the vocabulary.

The contrast is concrete even for a newcomer to OWL. A reviewer reading the branch sentence needs to understand that the restriction applies to every branch and says that there is a tree involved. The template designer has to decide which words make those pieces explicit. If the fixed frame does that work, the same design can accommodate different named classes and properties of the same structural kind. The choice of wording thus affects both how the reviewer reads the rule and how much text manipulation the implementation must perform.

The authors formalised the intended correspondence between the OWL statements and the template encodings and developed a proof-of-concept program. The paper distinguishes that specification work from writing executable templates and generating output from files. This matters because the intended correspondence can be stated at the level of the rule, where the class and property roles are clear. The executed sentence also depends on how those roles are filled and ordered. The examples evaluated later let the reader inspect what the implementation actually does with particular axioms.

Put reusable words and replaceable terms in the template

The templates are specified in XML. For class disjointness, the paper shows a constraint declaration for the axiom type, literal text fragments, and indexed objects standing for the classes. The template places an indefinite article before the first class name, supplies the words that connect it to the second class in a negative statement, and completes the Afrikaans negation after the second name. With the names Dier and Plant, the sentence says that an animal cannot be a plant. The same arrangement supports other class pairs selected from OWL axioms of that type.

The indexed objects are what make the frame reusable. The words expressing the relation are stored in the template, while the actual class names come from the input. This is a relatively direct design for disjointness because a short Afrikaans sentence can express exclusion in a consistent order. It is equally important for the more difficult cases that the software bind each placeholder to the intended part of the statement. A conditional with an antecedent and a consequent, for instance, needs the terms in the roles determined by the direction of the axiom.

The distinction between fixed text and inserted text gives the developer several kinds of control. A word such as net, meaning only in the example involving flavour, can be made part of the sentence pattern so readers see the restriction without reading the name of the property as a constraint. Articles and negative particles can be included as required by the frame. Edited vocabulary can make the variable part read as ordinary Afrikaans. These changes address different parts of the sentence, even though a reader encounters them in a single line.

The program matches OWL input against its XML templates. Its vocabulary depends on the labels available to it, so manual translation is necessary when Afrikaans names have yet to be supplied. The authors also refined the presentation of names, including changing a property expressed as a run of capitalized words into a readable Afrikaans phrase. That development work belongs to the pipeline just as much as choosing the position of the words surrounding the property. A frame can preserve the shape of the axiom while a hard-to-read label still interrupts comprehension.

Give GF an abstract structure and an Afrikaans rendering

GF divides grammar work between an abstract grammar and a concrete grammar. The abstract part defines the structures available for representing expressions. The concrete part says how a structure is rendered for a particular language. The authors used this distinction to connect parts of OWL statements to Afrikaans sentences. A class disjointness function, for example, can receive a pair of expressions representing the classes, and its Afrikaans definition can combine their string forms with articles and the words that express negation.

In the disjointness example, the GF definition performs the same visible sentence operation as the XML template. It joins fixed Afrikaans text to the strings supplied by its arguments in the appropriate order. The relationship it expresses is part of the grammar function’s role, while the concrete definition determines the words the reader sees. The similarity is instructive. It is possible for an XML frame and a function in a grammar to use essentially the same wording. The practical comparison therefore includes the parts that prepare the inputs, manage the vocabulary and support other axiom constructions.

The existing Afrikaans GF library supplied a starting point. The authors extended it to produce the specific grammars required for verbalising OWL 2 DL ontologies. The language-specific work included expressing constructions involving classes, properties and their restrictions through Afrikaans wording. The integration work connected those constructions to the contents of an ontology file. The program also generated GF files dynamically. Accordingly, running the GF system involves more than asking the completed Afrikaans grammar to express a ready-made input.

The architecture description emphasizes preprocessing that normalizes names from different ontologies. The paper illustrates the problem with a property whose words may be separated by punctuation in one ontology and joined through capitalization in another. The formats encode the name differently even when they convey the same relationship to a human reader. Preprocessing makes names more suitable for later steps, while translation supplies the Afrikaans vocabulary. The grammar’s job is then to use terms in the places appropriate to the expression it has been given.

The result is a division of work among the software that reads OWL and handles names, the abstract structures that represent expressions, and the concrete rules that turn those structures into sentences. That division accounts for both the initial effort and the portability envisaged by the design. An additional target language calls for a concrete grammar appropriate to it. Afrikaans itself calls for enough knowledge of the target sentence forms to make each supported OWL construction clear. The quality of the final line still depends on identifying which pieces to combine and on realizing them in the intended order.

Follow the arguments through other axiom types

A simple class hierarchy offers a compact test of whether the input roles make it into the sentence.

Chianti ⊑ ItalianWine

Chianti stands for the class of Chianti wines and ItalianWine for the class of Italian wines. ⊑ is class inclusion, with the narrower class to its left and the broader class to its right. The axiom places every member of Chianti in ItalianWine. A sentence can carry that inclusion by describing each Chianti as an Italian wine. The article before the broader class is relevant to the quality of the Afrikaans rendering, while the direction of inclusion comes from the positions of the class expressions.

The flavour example asks the implementation to convey a more elaborate restriction.

Zinfandel ⊑ ∀hasFlavor.{Strong, Moderate}

Zinfandel names the class being restricted, and ⊑ includes its members in the class described on the right. ∀ introduces a universal restriction. hasFlavor names the property being restricted, and the dot separates it from the set of allowed values. The braces enclose the individuals Strong and Moderate, with the comma separating them. The restriction says that any value for that property on a Zinfandel belongs to the indicated set. A sentence can express the choices with a word meaning or and signal the restriction on values with a word meaning only. The property still needs a position in the sentence that clearly connects the wine to those choices.

An exclusion can also be expressed through inclusion in a complement, as in the paper’s harvest example.

LateHarvest ⊑ ¬EarlyHarvest

LateHarvest and EarlyHarvest name classes. ⊑ again places every member of the class on the left in the expression on the right. ¬ forms the complement of EarlyHarvest, the class of things outside it. The intended sentence must therefore rule out membership in EarlyHarvest for a member of LateHarvest. Fixed negative wording can carry this meaning when the class names occupy the correct places.

These expressions illustrate why a verbaliser needs the structure of the input alongside the terminology. The same verb phrase could occur in a statement about an allowed value, a requirement to have a value, or the interpretation of an inverse. The sentence has to differentiate those uses through the words around the property and the relative positions of the arguments. The authors specified templates and GF concrete grammar for much of OWL 2 DL, with different coverage in the programs used in the evaluation. The differences are visible in the results for features such as data properties and in the specific sentences the paper prints.

Develop rules and then apply them to test ontologies

The paper describes hand-built rules, grammar extensions and preprocessing software. The data procedure was to supply OWL ontologies to the programs and inspect the resulting Afrikaans output. The same ontology can contain a broad assortment of statement forms, allowing the study to look at how a complete file is covered and to inspect the linguistic choices for particular forms. There are no learned sentence patterns or data splits in this procedure. Development effort instead went into the choice of wording, formal correspondence, handling of names and connection between components.

The authors made the tools and source available with the XML template specification, GF file, test data, generated sentences and additional design and evaluation material. The paper presents the comparison through a selection of sentences and two kinds of evaluation. The examples expose what the rules do when supplied with real ontology terms. The measurements show how much of each input the systems reached, what they wrote, how much time they took, and how their outputs were received in a human comprehensibility assessment.

Experiments and results

What the evaluations counted

The authors ran both proof-of-concept programs on the same collection of OWL ontologies. Their first evaluation counted the axioms in an input file, the axioms verbalised and the sentences written, and measured elapsed time. The second used a human evaluation of comprehensibility. The programs are one another’s comparators. The experiment asks what the complete Afrikaans implementations produce when given the same inputs, with the division of work in each implementation carried through to the measurements.

The test collection comprises six ontologies. It includes Pizza and African Wildlife, with Computer Science and Wine providing other examples of the domains represented. University and Stuff complete the collection. The article draws its detailed examples from wine because the authors consider it a relevant field in the Western Cape, a region where many people speak Afrikaans. The sample sentences are useful alongside aggregate results because several kinds of defect, including a missing article and an incorrectly directed conditional, can still leave a program able to count an axiom as verbalised.

The quantitative measures follow different stages of processing. The proportion of axioms verbalised uses ontology statements as its units. Sentences written counts the textual units produced, which can differ from the number of statements reached. Elapsed time concerns the processing of the ontology by the program, and time per sentence expresses processing cost in terms of the output written. With these measures, two systems can be close on how much formal material they cover and differ in the length or arrangement of the resulting text. They can also be close in total time while writing different amounts of text.

Coverage is best understood as a measure of what the implementation reached. The authors give examples of generated text with errors of meaning, so the percentage of axioms verbalised is a distinct measurement from semantic correctness. Likewise, an axiom may produce more output than a single sentence in some settings. The sentence count therefore describes production and does not by itself rank the systems on either faithfulness or readability.

Coverage varied by ontology

Average axiom coverage across the six OWL test ontologies

Templates verbalised a larger share of axioms on average, while the ordering varied by ontology.

Average axiom coverage across the six OWL test ontologiesGrammatical Framework: 93.3Grammatical Framework93.3Templates (this paper): 96.8Templates (this paper)96.8
The numbers
System or settingaxioms verbalised %
Grammatical Framework93.3
Templates (this paper)96.8

The averages summarize collections of input that vary greatly in size. Pizza contained 712 axioms. Templates verbalised 707 of them, reported as 99.3%, and GF verbalised 711, reported as 99.9%. In African Wildlife, the template program verbalised 55 of the 56 axioms, for 98.2%. GF reached 56, for 100.0%. These are cases in which GF’s coverage exceeded that of the template implementation, even though templates had the higher coverage average across the collection.

Wine contained 657 axioms. The template program verbalised 635, corresponding to 96.7%, while GF verbalised 628, corresponding to 95.6%. University had 95 axioms. Templates reached 91, reported as 95.8%, and GF reached 94, reported as 99.0%. The direction of the coverage difference for University thus follows Pizza and African Wildlife. The comparison is sensitive to the types of statements a particular ontology contains and to which of those types the implemented rules can handle.

Stuff shows a substantial difference in the other direction. The ontology contained 136 axioms. The template program verbalised 134, reported as 98.5%, and GF verbalised 110, reported as 80.9%. For Computer Science the reported percentages were 92.3% for templates and 84.6% for GF. The coverage average captures the overall result across the collection, while the per-ontology values show why a reader considering a particular ontology would want to know which features it uses.

The authors report that templates fell short of 100% coverage on every tested ontology. They attribute the omissions to constructs that the implementation was designed to skip, including datatypes, keys, and the universal class and property. They separately identify the absence of data property support in the GF implementation as one contributor to the difference between systems. This separates a decision to omit certain features from the general capacity of a sentence generation approach to express them. The observed coverage follows what was supported in each program and which constructs appeared in the files.

Sentence counts further clarify the units. For African Wildlife, both programs wrote 57 sentences even though the number of axioms verbalised differed. For Stuff, the template system wrote 175 sentences while reaching 134 axioms. GF wrote 110 sentences for that ontology and reached 110 axioms. For Wine, the template and GF sentence counts were 635 and 628 respectively. These examples show how a count of sentences can respond both to the scope of coverage and to the decision about how to express the supported input.

Timing includes the work each program does

Average time per sentence across the six OWL test ontologies

The template implementation took less time per sentence on average.

Average time per sentence across the six OWL test ontologiesGrammatical Framework: 18.3Grammatical Framework18.3Templates (this paper): 12.7Templates (this paper)12.7
The numbers
System or settingmilliseconds per sentence
Grammatical Framework18.3
Templates (this paper)12.7

The reported average elapsed times per ontology were 2.0 seconds for templates and 2.3 seconds for GF. The time per sentence measures describe another aspect of the results because output size varied. For Pizza, elapsed time was 1.7 seconds for templates and 2.1 seconds for GF. The corresponding times per sentence were 2.4 and 3.0 milliseconds. For African Wildlife, templates took 1.3 seconds and GF took 1.7 seconds. The reported times per sentence for that ontology were 23.2 milliseconds for templates and 30.9 milliseconds for GF.

Wine is a useful check on the overall ordering. Templates took 5.6 seconds to process it and GF took 5.5 seconds. Their reported times per sentence were 8.8 milliseconds and 8.7 milliseconds respectively. Wine took the longest to verbalise in either implementation among the reported tests. The paper uses this case to discuss the effect a wait could have in a setting that calls for sentences during use. It gives an observed elapsed time for a test file. The consequences for larger input and for applications with different timing needs remain considerations raised by the authors.

The elapsed times are measurements of working programs with different components. GF performs vocabulary translation during processing and generates the GF files it needs dynamically. The template program matches the OWL input against the XML patterns and relies on vocabulary prepared in advance. Preparing the labels is part of using the template approach when the ontology lacks Afrikaans terms, while the reported program timings concern the step that produces sentences from the input as supplied. In this respect, the runtime comparison and the comparison of deployment effort answer different questions.

The authors identify dynamic translation and file generation as reasons to interpret the timings in the context of the software design. The reported measurements are at program level. They show what a user experienced for these files under the two implementations, alongside information about the jobs each program handled. A timing of grammar application alone would answer a narrower question than the one the paper measured.

A domain expert judged how well the output could be understood

An Afrikaans mother tongue speaker with domain expertise rated the verbalised material on a 5-point Likert scale. The paper describes the levels in terms of intelligibility and visible faults. A score of 1 indicated that the text could not be understood. At 2, almost all of it remained unclear. A score of 3 marked partial understanding. At 4, the reader could understand the text and identify obvious errors. A score of 5 indicated that it was easy to understand and had no obvious errors. This is a reader’s assessment of the output as a set of sentences for an ontology.

Average expert comprehensibility rating across the six OWL test ontologies

The Afrikaans-speaking expert gave the template outputs the higher average rating.

Average expert comprehensibility rating across the six OWL test ontologiesGrammatical Framework: 3.5Grammatical Framework3.5Templates (this paper): 4.4Templates (this paper)4.4
The numbers
System or settingexpert rating on the 5-point scale
Grammatical Framework3.5
Templates (this paper)4.4

For African Wildlife the expert assigned templates 5 and GF 4. For Pizza the ratings were 5 and 3. The largest separation in the table occurs for Stuff, with 4 for templates and 2 for GF. The expert gave both systems 4 for Computer Science and gave both 4 for University. Wine also received 4 under each approach. Several sets of sentences therefore fell in the same comprehensibility category even when the paper could point to different linguistic or logical details in individual outputs.

The authors report a Mann–Whitney comparison with p = 0.12852 and describe the average advantage for templates as statistically nonsignificant. The averages give the direction of the difference in this evaluation. The statistical comparison supplies the paper’s qualification on how strongly those ratings support a broader claim. The repeated rating of 4 also has a specific meaning here. It reflects material the expert could understand while still seeing errors, a description compatible with substantial variation among the sentences in a set.

The rating provides information the program counts cannot. If the software reaches an axiom but presents its property name as an awkward string, the count of verbalised axioms can stay the same while the reader’s experience changes. If a polished conditional reverses the original rule, the reader can understand the sentence while being given the wrong account of the ontology. The expert ratings and the examples help reveal different aspects of those outcomes. The article’s detailed comparisons are therefore essential to understanding what a higher average rating might reflect.

What the ablations show

The paper reports no component-removal ablations. Its analyses compare complete implementations on the same ontologies and, more closely, align Afrikaans outputs for particular axiom types. These comparisons show where the programs agree, where the wording changes the meaning a reader can recover, and where their coverage differs. They also give concrete evidence for interpreting the ratings and timings without treating either aggregate as an explanation of its own.

Wording affects how readily a statement can be read

In the Chianti hierarchy example, the template sentence supplies the indefinite article ’n before the broader category. The GF output leaves it out. Both position Chianti as the narrower class, but the missing article makes the GF expression less idiomatic as a sentence about what kind of wine Chianti is. The defect is localized. A reader can see which part of the Afrikaans wording needs attention without having to reconsider the direction of class inclusion.

The disjointness comparison offers a case where both programs make the important choices successfully. In the example concerning late and early harvest, both use Afrikaans negation to express the exclusion, with an indefinite article in the appropriate part of the sentence. This matches the earlier design example involving the classes for animals and plants. The output gives the reader a direct statement that membership in the first class excludes membership in the second. It also illustrates why a simple relation expressed through fixed wording can work equally well under the two architectures.

The assertion that several named individuals are different is another useful example. Here the statements concern individuals, the part of the ontology the paper calls the ABox. The intended meaning is that the named sweetness categories are all distinct. The paper describes both outputs as correct, while preferring the template wording almal for the complete group. When the sentence names several individuals, wording that refers naturally to the group makes the assertion easier to take in. The choice affects the reader’s experience even when both programs have captured the distinction the axiom is meant to express.

Property names contribute to the same issue. In the inverse-property example, the paper credits the template output with a more readable expression. It uses teenoorgestelde to identify the inverse relationship and shows how the direction changes between the two participants. GF presents the relationship with conditionals for each direction. The authors accept both forms. A reader who has to follow the conditional wording must keep track of which participant occurs in which position and of how that position changes. An explicit word naming the relationship gives the reader another way to understand the pair of properties.

The inverse comparison is also a case where ordinary Afrikaans spelling and spacing make formal content more accessible. The template developer had time to turn an ontology-style string into a phrase recognizable as ordinary wording. When names remain bracketed or retain their file-style capitalization, the reader has to decode them while following the sentence. The authors connect this kind of refinement to the time available after implementing the template mechanism. The example supports that account by showing the kind of visible change the additional refinement can produce.

A sentence can change the force or direction of an axiom

The Zinfandel example makes the force of a restriction easy to inspect. The template output uses net to signal that the listed flavours are the permitted ones. GF presents the choices too, but its placement of the term for the flavour property makes the relation harder to read, and its wording conveys the universal restriction less precisely. In this case the value of the template word is semantic as well as stylistic. It tells the reader to interpret the list as limiting the values of a property.

The conjunction used to define sweet wine brings out a different issue. Both systems attempt to combine membership in the wine class with a condition involving sugar and the value sweet. The template supplies language about at least one, while the GF version uses the property and value more tersely. The authors flag the ontology’s use of value as ambiguous for deciding whether the template’s wording is the best expression. The analysis therefore stops short of treating extra explicitness as an automatic improvement. A reviewer has to ask which interpretation the additional words convey and whether the ontology supports it.

The paper also accepts different ways of expressing an object property’s range. A range declaration concerns the things that occur as targets of the property. The template rendering approaches the meaning as a constraint on sugar values, while GF expresses it by referring to the things associated with the property and then classifying them. These different sentence forms can serve the same purpose. Comparing them invites a reader to check which entities the sentence classifies and how that classification follows from use of the property. A surface difference alone gives little reason to judge either rendering incorrect.

The clearest shared error occurs in the object subproperty example. The underlying relationship is directional. Whenever the more specific sugar property applies, the broader wine-descriptor property should apply as well. GF expresses the axiom as though it concerned symmetry, a relation involving reversal of participants. The template produces a conditional whose verbalised parts occur in the wrong order, so the claim it makes runs from the broader relation to the narrower one. These are different departures from the same source relation, and each would give a reviewer a mistaken view of the ontology.

The template sentence in that example nonetheless illustrates a functioning local feature. It uses dit, the Afrikaans pronoun for it, to refer back to the entity already introduced. The pronoun lets the sentence avoid reintroducing the entity in the second part. Its success is independent of whether the conditional goes in the right direction. An evaluation devoted to referring expressions could approve that choice, while inspection of the implication would still expose the error. This is one reason the paper’s side-by-side examples are more informative than a single quality label for the sentence.

Coverage and time reflect implementation decisions

A functional property constrains how many values a subject can have for that property. In the colour example, the template wording expresses the at-most condition more clearly, while the GF line is described as understandable. The authors observe that the generated sentences leave out the declared domain, wine. This exposes a possible gap between expressing a property characteristic and using relevant declarations elsewhere in the ontology to make the sentence more informative. It also helps explain why a verbaliser can support a category of statement and still leave important domain information implicit.

The authors find better coverage of some object property characteristics in templates. The transitivity example is telling because transitivity has an implication that connects property statements. GF’s verbalisation misses that implication, while the template uses the Afrikaans term for transitive. The evaluated GF implementation also lacks a verbalisation for symmetry. A missed implication and an unsupported feature have different effects. One can leave a sentence present with incomplete meaning, while the other leaves no rendering for that axiom type. These effects belong in the interpretation of qualitative examples and coverage counts respectively.

Data properties furnish another coverage difference. Templates include them, whereas GF’s implementation leaves them outside its supported set. The paper identifies this choice as one contributor to the differences in the amount of output. A comparison of coverage therefore has a specific explanatory lead in documented feature support. It does not establish how both programs would perform if developed to identical feature scope. The observations concern the choices the developers made and the programs that resulted within the study’s time frame.

Likewise, the explanation for timing includes jobs that only one program performs as it runs. Vocabulary translation and dynamic file generation are present in the GF pipeline. The template program receives the vocabulary in the form it will use. The study compares those pipelines end to end and points to the likely cost of GF’s additional processing. No separate measurement assigns a share of the elapsed time to each operation. The most precise inference is that the tested template program was faster on average under its own input conditions, with individual results such as Wine showing how close the implementations could be.

The development account also bears on the higher comprehensibility ratings for templates. The authors had more opportunity to polish their Afrikaans wording after finishing the core template work. The GF developer had to use part of the available time on the link between the ontology and GF. The detailed outputs provide examples of changes that extra polish can buy, including articles, a more natural reference to a group, and property labels that read as phrases. The study measured the deliverables from that allocation of time. The information about development explains why the authors relate readability to available refinement time as well as to the underlying formalism.

Limitations

Limits the authors identify

The authors treat both systems as feasible and qualify their comparison by the way they were built. GF involved more initial work to connect the grammar to OWL and to generate the necessary files during processing. It also included automatic translation of terms. The template program reused the input vocabulary and was quicker to develop, leaving more time to refine its output. The measured sentence quality and runtime belong to systems with these different responsibilities and different opportunities for refinement.

The authors report a higher average comprehensibility rating for templates and explicitly qualify it with their statistical result. A higher descriptive average can coexist with uncertainty about the strength of an advantage. The examples make it possible to identify specific improvements in the tested template output, including better article use and a clearer indication of a value restriction. The statistical comparison concerns the ratings across the sets of sentences. It cannot settle the merits of a particular sentence choice on its own.

The paper also identifies Afrikaans as a favourable case for templates. Its comparatively modest demands on word forms and agreement made it practical to use ontology names in manually prepared frames. In their discussion of isiZulu, the authors point to a language where agreement poses a more complex problem. That contrast supplies a reason to limit the scope of the findings. An Afrikaans frame that permits direct insertion of a property expression illustrates a design opportunity for this language. The amount of processing required to apply a comparable strategy elsewhere depends on the grammar of the language in question.

Application requirements also affect the authors’ conclusion. They consider templates easier to understand, refine and extend when multilingual generation is outside the requirements. GF separates abstract representations from language-specific rules, providing a basis for reuse when several target languages are required. The implementation comparison covers Afrikaans. The authors’ remarks about multilingual use concern the architectural tradeoff that could motivate the extra initial effort.

The timing discussion raises the prospect of a delay becoming burdensome for larger ontologies or for generation during use. The paper grounds this concern in processing times such as those reported for Wine. It gives the reader a concrete sense of the wait for a tested file. The extent to which elapsed time grows with ontology size, statement mix or amount of translation remains outside the demonstrated results.

Limits visible in the experimental design

The common time frame and similar developer backgrounds improve the comparability of the effort. The design still compares a specific implementation of each approach. Choices about the order of work, supported axiom types, division of responsibilities and degree of polishing enter the result. A controlled comparison of the formalisms with the same implemented features and equally refined output would address a different question. The paper instead provides evidence about building and evaluating working versions from the starting points the authors describe.

The same distinction applies to vocabulary quality. Manual preparation moves translation work outside the measured sentence generation run, while automatic translation makes it part of the running system. This offers evidence about the programs as deployed in the study. The evaluation provides no separate judgment of how accurate the automatically translated terms are across the ontologies or how much work manual translation requires. As a result, each vocabulary strategy contributes to the comparison through the outputs and the reported implementation account, with its cost and accuracy only partly characterized.

Coverage provides a useful account of supported input, particularly when read with the examples of omitted constructs. Its evidential scope is narrower than the number of axioms a reviewer could understand correctly. A program can verbalise a statement and put the conditional in reverse order, as both approaches fail to convey the property hierarchy in the example. The template correctness work describes an intended correspondence, while the implemented behaviour also has to be checked. The printed examples give evidence of semantic accuracy and error by construction, with no exhaustive accuracy rate for the collection.

The human evaluation captures the judgment of a single Afrikaans-speaking domain expert. Having a reader who knows the language and the subject suits the task the authors set. The unit of judgment is a set of generated sentences, rated on a scale that combines comprehensibility with the visibility of errors. Another study could distinguish linguistic acceptability from logical fidelity through judgments on individual statements. The ratings in this paper supply evidence of how readable the sets were to the expert, with the examples supplying much of the detail about the nature of the errors.

Finally, the ontology selection and the detailed use of Wine make the experiments concrete. They also leave open how an input with a different balance of class expressions, property characteristics and names would behave. The per-ontology differences already show that coverage ordering can change with the file. The most defensible generalization is that both approaches can verbalise substantial portions of the tested OWL ontologies in Afrikaans. The observed advantage in readability and speed belongs to the template implementation built for that task, alongside the translation capability and multilingual design that distinguish the GF approach.

What came after

No later citing studies are documented for this comparison. The paper leaves the multilingual question open. It demonstrates Afrikaans verbalisation with both approaches and identifies the additional investment needed for GF. Whether that investment pays off across several target languages remains outside the experiments it reports.

Cite

Cite as Lauren Sanby, Ion Todd and Maria C. Keet. 2016. Comparing the Template-Based Approach to GF: the case of Afrikaans. Proceedings of the 2nd International Workshop on Natural Language Generation and the Semantic Web (WebNLG 2016).

The paper itself, not this page. BibTeX from the library's record of the work.

@inproceedings{sanby2016comparing,
  title = {{Comparing the Template-Based Approach to GF: the case of Afrikaans}},
  author = {Lauren Sanby, Ion Todd and Maria C. Keet},
  booktitle = {Proceedings of the 2nd International Workshop on Natural Language Generation and the Semantic Web (WebNLG 2016)},
  year = {2016},
  doi = {10.18653/v1/w16-3510},
  url = {https://doi.org/10.18653/v1/w16-3510}
}

↑ back to top

This page in Markdown https://md.research.elamur.ai/free/en/papers/sanby-2016-comparing-template-based-approach-gf/