controlled natural language for user interfaces on the semantic web
TRANSCRIPT
Controlled Natural Language forUser Interfaces on the Semantic Web
Tobias Kuhn
http://www.tkuhn.ch
@txkuhn
ETH Zurich
Protege Research MeetingStanford Center for Biomedical Informatics Research
20 March 2015
Imagine ...
... that Wikipedia can check consistency and answerquestions about the contained knowledge, and
... that all content is instantly available in alllanguages!
Tobias Kuhn, ETH Zurich Controlled Natural Language for User Interfaces on the Semantic Web 2 / 24
• AceWiki is a semantic wiki
• Articles are written in Attempto Controlled English (ACE), aControlled Natural Language (CNL)
• These sentences are internally translated into the Semantic Weblanguage OWL
• An OWL reasoner is built in to answer questions and detectinconsistencies
• Special editor for writing ACE statements
• Extended to support multilinguality
Kuhn. AceWiki: A Natural and Expressive Semantic Wiki. Semantic Web User Interaction. 2009.
Tobias Kuhn, ETH Zurich Controlled Natural Language for User Interfaces on the Semantic Web 3 / 24
Attempto Controlled English (ACE):a Natural and Intuitive Semantic Web Language
OWL (∼ Manchester syntax) Attempto Controlled English (ACE)
Bob HasType developer Bob is a developer.developer SubTypeOf professional Every developer is a professional.developer SubTypeOf owns some cup Every developer owns a cupBob HasType owns some (not cup) Bob owns something that is not a cup.loves SubRelationOf likes If X loves Y then X likes Y.
Tools:
• AceWiki (semantic wiki)
• ACE View (Protege plugin)
• ACE-in-GF (multilingual grammar for ACE)
• and more...
Fuchs, Kaljurand, Kuhn. Attempto Controlled English for Knowledge Representation. Reasoning Web. 2008.
Tobias Kuhn, ETH Zurich Controlled Natural Language for User Interfaces on the Semantic Web 4 / 24
Attempto Controlled English (ACE)
Subset of natural English:
• Disjunction, negation, if-then, nested expressions, ...
• Anaphoric references: pronouns, definite noun phrases, variables
• Quantifiers: every, no, at least 3, ...
• Content words: proper names, nouns, verbs, adjectives, ...
Grammar is fixed, but users can change content words.
Deterministic ambiguity handling:
• Anaphora resolution (France borders Spain and it bordersPortugal.)
• Quantifier scope (Every country includes a city.)
• Attachment (Every therapy treats a disease with a drug.)
Well-defined translations to and from first-order logic, OWL, ...
Fuchs, Kaljurand, Kuhn. Attempto Controlled English for Knowledge Representation. Reasoning Web. 2008.
Tobias Kuhn, ETH Zurich Controlled Natural Language for User Interfaces on the Semantic Web 5 / 24
AceWiki: A Wiki that Understands its Content
Kuhn. AceWiki: A Natural and Expressive Semantic Wiki. Semantic Web User Interaction. 2009.
Tobias Kuhn, ETH Zurich Controlled Natural Language for User Interfaces on the Semantic Web 6 / 24
Consistency Checking and Question Answeringin AceWiki
Kuhn. How Controlled English Can Improve Semantic Wikis. Semantic Wikis, 2009.
Tobias Kuhn, ETH Zurich Controlled Natural Language for User Interfaces on the Semantic Web 7 / 24
How can we reliably evaluate theunderstandability of CNLs?
Kuhn. The Understandability of OWL Statements in Controlled English. Semantic Web 4(1). 2013.
Tobias Kuhn, ETH Zurich Controlled Natural Language for User Interfaces on the Semantic Web 8 / 24
How can we reliably evaluate theunderstandability of CNLs?
Kuhn. The Understandability of OWL Statements in Controlled English. Semantic Web 4(1). 2013.
Tobias Kuhn, ETH Zurich Controlled Natural Language for User Interfaces on the Semantic Web 9 / 24
CNLs are Easier and Faster to Understand
objective understandability (score on task):
91.4%ACE
86.3%OWL (Manchester)
50% 60% 70% 80% 90% 100%
90%ACE
61%SOUL
71%Prolog
50% 60% 70% 80% 90% 100%
subjective understandability (questionnaire):
2.59ACE
1.92OWL (Manchester)
0 1 2 3
2.65ACE
1.30SOUL
1.50Prolog
0 1 2 3
needed effort (time in seconds):
13.72ACE
18.42OWL (Manchester)
0 5 10 15 20
548ACE
712SOUL
719Prolog
0 200 400 600 800
Kuhn. The Understandability of OWL Statements in Controlled English. Semantic Web 4(1). 2013. / Kuhn, Bergel.Verifiable source code documentation in controlled natural language. Science of Computer Programming 96. 2014.
Tobias Kuhn, ETH Zurich Controlled Natural Language for User Interfaces on the Semantic Web 10 / 24
Writing in CNL: Predictive Editor
Kuhn. A Principled Approach to Grammars for Controlled Natural Languages and Predictive Editors. Journal of Logic,Language and Information 22(1). 2013.
Tobias Kuhn, ETH Zurich Controlled Natural Language for User Interfaces on the Semantic Web 11 / 24
Determining Possible Anaphoric References ina Predictive Editor
s ∼
vp
vp ∼
np
ref
...
v
tv
destroy
aux
does not
conj
and
vp
pp
np
>n
enemy
det
every
prep
from
np
n
house
det
a
v
tv
protects
np
n
man
det
Every
∼
�
�
�
( ( ()
>
>
<
1Kuhn. A Principled Approach to Grammars for Controlled Natural Languages and Predictive Editors. Journal of Logic,
Language and Information, 22(1), 2013.
Tobias Kuhn, ETH Zurich Controlled Natural Language for User Interfaces on the Semantic Web 12 / 24
CNLs are Easier and Faster to Write
objective usability (score):
64%CNL
33%non-CNL
0% 20% 40% 60% 80% 100%
subjective usability (questionnaire):
2.33CNL
1.42non-CNL
0 1 2 3
needed effort (time in seconds):
86CNL
108non-CNL
0 30 60 90 120
Kuhn, Hofler. Coral: Corpus Access in Controlled Language. Corpora 7(2). 2012.
Tobias Kuhn, ETH Zurich Controlled Natural Language for User Interfaces on the Semantic Web 13 / 24
Multilingual AceWiki: AceWiki-GF
• Making wiki content available in different languages• Automatically translated content using high-quality rule-based
machine translation: Grammatical Framework (GF)• Language switching like in Wikipedia• Localization of the user interface
Kaljurand, Kuhn. A Multilingual Semantic Wiki Based on Attempto Controlled English and Grammatical Framework.ESWC 2013. / Kaljurand, Kuhn, Canedo. Collaborative multilingual knowledge management based on controllednatural language. Semantic Web. 2015.
Tobias Kuhn, ETH Zurich Controlled Natural Language for User Interfaces on the Semantic Web 14 / 24
Grammatical Framework (GF)
GF is a framework for multilingual grammar engineering:
• Rule-based
• Functional programming language (based on Haskell) optimizedto handle natural language
• Modular architecture for problem-specific languages
• Resource Grammar Library implementing common morphologicaland syntactic structures
• Mildly context sensitive
• Bidirectional translations: concrete languages ⇔ abstract syntax
http://www.grammaticalframework.org/
Tobias Kuhn, ETH Zurich Controlled Natural Language for User Interfaces on the Semantic Web 15 / 24
Multilingual AceWiki
Tobias Kuhn, ETH Zurich Controlled Natural Language for User Interfaces on the Semantic Web 16 / 24
Evaluation of AceWiki-GF:(Almost) Nothing is Lost in Translation
• 30 participants created in total 316 sentences in differentlanguages and tagged them as true or false.
• They then had to classify sentences others had written as true orfalse.
Results:
82.2%without translation
84.0%with translation
0% 25% 50% 75% 100%
agreement level
Kaljurand, Kuhn. A Multilingual Semantic Wiki Based on Attempto Controlled English and Grammatical Framework.ESWC 2013. / Kaljurand, Kuhn, Canedo. Collaborative multilingual knowledge management based on controllednatural language. Semantic Web. 2015.
Tobias Kuhn, ETH Zurich Controlled Natural Language for User Interfaces on the Semantic Web 17 / 24
There are Many Other Kinds ofControlled Natural Language (CNL)
CNLs have been used for: knowledge representation, query interfaces,mathematical texts, technical specifications, technical documentation,international communication, government documents, business/policyrules, personal scripts, emergency instructions, ...
• Goal: comprehensibility / translation / formal representation
• Written / spoken
• Domain-specific / general-purpose
• Origin: academia / industry / government
Kuhn. A Survey and Classification of Controlled Natural Languages. Computational Linguistics 40(1). 2014.
Tobias Kuhn, ETH Zurich Controlled Natural Language for User Interfaces on the Semantic Web 18 / 24
CNLs for the Semantic Web
Languages:
• Ginseng’s Guided English
• AIDA
• ClearTalk
• Controlled Language forOntology Editing(CLOnE)
• Rabbit
• OWL ACE (used in ACEView)
• OWL Simplified English
• and several others
Kuhn. A Survey and Classification of Controlled Natural Languages. Computational Linguistics 40(1). 2014.
Tobias Kuhn, ETH Zurich Controlled Natural Language for User Interfaces on the Semantic Web 19 / 24
AECMA Simplified English AIDA Airbus Warning Language ALCOGRAM ASD Simplified TechnicalEnglish Atomate Language Attempto Controlled English Avaya Controlled English Basic EnglishBioQuery-CNL Boeing Technical English Bull Global English CAA Phraseology Caterpillar Fun-damental English Caterpillar Technical English Clear And Simple English ClearTalk CLEF QueryLanguage COGRAM Common Logic Controlled English Computer Processable English ComputerProcessable Language Controlled Automotive Service Language Controlled English at Clark Con-trolled English at Douglas Controlled English at IBM Controlled English at Rockwell ControlledEnglish to Logic Translation Controlled Language for Crisis Management Controlled Language forInference Purposes Controlled Language for Ontology Editing Controlled Language Optimized forUniform Translation Controlled Language of Mathematics Coral’s Controlled English Diebold Con-trolled English DL-English Drafter Language E-Prime E2V IBM’s EasyEnglish Wycliffe Associates’EasyEnglish Ericsson English FAA Air Traffic Control Phraseology First Order English Formalized-English ForTheL Gellish English General Motors Global English Gherkin GINO’s Guided English Gin-seng’s Guided English Hyster Easy Language Program ICAO Phraseology ICONOCLAST LanguageiHelp Controlled English iLastic Controlled English International Language of Service and Mainte-nance ITA Controlled English KANT Controlled English Kodak International Service Language LiteNatural Language Massachusetts Legislative Drafting Language MILE Query Language Multina-tional Customized English Nortel Standard English Naproche CNL NCR Fundamental English OceControlled English OWL ACE OWLPath’s Guided English OWL Simplified English PathOnt CNLPENG PENG-D PENG Light Perkins Approved Clear English PERMIS Controlled Natural LanguagePILLS Language Plain Language PoliceSpeak PROSPER Controlled English Pseudo Natural Lan-guage Quelo Controlled English Rabbit Restricted English for Constructing Ontologies RestrictedNatural Language Statements RuleSpeak SBVR Structured English SEASPEAK SMART ControlledEnglish SMART Plain English Sowa’s syllogisms Special English SQUALL Standard Language SunProof Sydney OWL Syntax Template Based Natural Language Specification ucsCNL Voice Actions
Kuhn. A Survey and Classification of Controlled Natural Languages. Computational Linguistics 40(1). 2014.
Tobias Kuhn, ETH Zurich Controlled Natural Language for User Interfaces on the Semantic Web 20 / 24
Survey of 100 CNLs for English
1930 1940 1950 1960 1970 1980 1990 2000 2010
FAA Air Traffic Control Phraseology →Basic English
Caterpillar Fundamental English (CFE) →
ASD Simplified Technical English (ASD-STE) →
SBVR Structured English →AIDA →
Drafter Language →
Attempto Controlled English (ACE) →
E2V →
Sowa’s Syllogisms →
1
Kuhn. A Survey and Classification of Controlled Natural Languages. Computational Linguistics 40(1). 2014.Tobias Kuhn, ETH Zurich Controlled Natural Language for User Interfaces on the Semantic Web 21 / 24
Classification Scheme for CNLs: PENS
Four dimensions (PENS):
• Precision: from very imprecise (e.g. English) to maximallyprecise (e.g. propositional logic)
• Expressiveness: from very inexpressive (e.g. propositional logic)to maximally expressive (e.g. English)
• Naturalness: from very unnatural (e.g. propositional logic) tofully natural (e.g. English)
• Simplicity: from extremely complex (e.g. English) to very simple(e.g. propositional logic)
Kuhn. A Survey and Classification of Controlled Natural Languages. Computational Linguistics 40(1). 2014.
Tobias Kuhn, ETH Zurich Controlled Natural Language for User Interfaces on the Semantic Web 22 / 24
CNLs: Between Natural and Formal Languages
PENS classes of CNLs (blue) in comparison to natural (white) andformal (black) languages:
Precision1 2 3 4 5
Expressiveness
1
2
3
4
5
1
Naturalness1 2 3 4 5
Sim
plicity
1
2
3
4
5
1Kuhn. A Survey and Classification of Controlled Natural Languages. Computational Linguistics 40(1). 2014.
Tobias Kuhn, ETH Zurich Controlled Natural Language for User Interfaces on the Semantic Web 23 / 24
Thank you for your attention!
Questions?
Some links:
• AceWiki: http://attempto.ifi.uzh.ch/acewiki/
• AceWiki-GF: http://attempto.ifi.uzh.ch/acewiki-gf/
• Attempto project: http://attempto.ifi.uzh.ch/
• CNL community: http://www.sigcnl.org/
• Grammatical Framework: http://www.grammaticalframework.org/
Tobias Kuhn, ETH Zurich Controlled Natural Language for User Interfaces on the Semantic Web 24 / 24