Showing posts with label CNL. Show all posts
Showing posts with label CNL. Show all posts

Wednesday, 21 October 2015

Ask Data Anything - NYPD Motor vehicle accidents

In modern organizations, data management is a major issue and at the same time a major resource. In our experience, the first challenge a business that wants to use its data is facing how to have a unified view of their data. Generally data inside organizations is stored in different databases that have often proprietary API making it difficult to move from one database to the other. Furthermore, also when the technology used to store data is the same, there are still semantic problems like different terminologies, languages etc.


The bigger the company is, the lower the possibility to standardize the procedures are, so that these kind of situations will not happen. This happens because we are human and we naturally tend to interpret data using our own experience and knowledge. Thus we cannot expect the technical team to call all pieces of a car using the exact same terminology as the logistic department. This is why, our solution aims at giving the possibility to standardize the way in which the end user interact with the data without actually changing the source of the data.

Ask your Data Anything (ADA), allows companies to add a semantical layer on top of the data without the need of copying data. The product is managing term disambiguation, aggregation of data using hierarchies defined in ontologies, data integration between different data sources.

Friday, 9 October 2015

Using RDF Data Cube Vocabulary to model sales data with Fluent Editor - Example.

RDF Data Cube Vocabulary is a way to represent data in popular format with link data paradigms. Linked data is an approach to publishing data on a web and this vocabulary makes it possible. There are numerous benefits to linked data. The individual observations, and groups of observations, become (web) addressable. This allows publishers ad third parties to annotate and link to this data. For example a report can reference the specific figures it is based on allowing for fine grained provenance trace-back. Representing any data set with these benefits is now possible with Controlled Natural Language in Fluent Editor and it has never been so easy.

Thursday, 10 September 2015

Medical Clinic Ontology - Example

Diseases of affluence, an aging population and many other reasons cause doctors to be overworked and tired. Many of them complain, that bureaucracy consumes a large amount of time, which could be otherwise spend on curing patients. Cognitum meets the expectation of medical workers and provides tools that can spare precious time by adding semantic layer to patients' records and doctors' medical knowledge. Cognitum's Fluent Editor can be used to quickly access patient's medical history, suggest a medicament for specific illness and even predict patient's disease based on signs and symptoms.



Wednesday, 22 April 2015

Using Active Rules on Fluent Editor

Active rules is the mechanism Fluent Editor provides for executing custom imperative code in C# upon meeting certain criteria described as SWRL rules. Considering that standard SWRL rule axioms consist of two parts, an antecedent (body) and consequent (head), the body part of active rules exactly follows the standard format of SWRL rules. The difference from standard SWRL lies on the head part, on which you can add your custom C# code as a set of execution commands. We provide some mechanism to deal with the nature of distributed environments through a set of core built-ins. Available functions to use in active rules are as follows:
 
  • KnowledgeInsert(string knowledge) : Inserts knowledge into your ontology.
  • KnowledgeDelete(string knowledge) : Deletes knowledge into your ontology.
  • WriteMessage(string msg) : Prints msg on Active Rules Output window. 

Monday, 6 April 2015

Visualization of Ontology Contents - with Ontology Diagram and SWRL Debugger

From the latest release version, Fluent Editor includes a few new features that enhance visualization of ontology, which can help you navigate through the structure of your ontology more intuitively. Possibility of drawing a diagram of ontology is one of such features. Ontology diagrams graphically express relations between concepts and instances - also the materialized ones. 
Another new feature to be introduced is SWRL debugger. SWRL debugger shows binding of rules that took place during the reasoning process over your ontology. It is presented as a list of all the SWRL rules and bound instances. By running SWRL debugger, you can check how SWRL rules work on your ontology.

In this post, we will look through these two features further.

Sunday, 15 February 2015

Collaborative ontology editing with the use of Fluent Editor and the Ontorion Server

In the latest release of Fluent Editor, we have implemented a simple and intuitive way for multiple users to edit the same ontology at the same time. This is possible by using the functionalities of both Fluent Editor and Cognitum's scalable knowledge management system Ontorion. In this article we will try to give you a general understanding of how this concurrent editing of ontologies is working.

As a comment we would like to stress that the component that we will show you has been implemented in C# using the Ontorion API (that is part of the Ontorion Server). If thus have access to the Ontorion API and Ontorion Server, you can implement all functionalities that you see in this article in your custom program. For more information about Ontorion Server and the Ontorion API you can contact us here.

First of all open Fluent Editor, click File, Open&Import , Ontorion Server and then Connect to Ontorion.

Friday, 6 February 2015

Reasoning about ontologies - fast vs. complete answers


In this article you will gain more intuition about:
- how to query your ontology
- the difference between reasoner and materialized graph
- what is materialization mode OWL-DL and materialization mode OWL-RL+
- when you can use faster OWL RL+ reasoning mode safely

You will see two example ontologies:
- about books (using data types, cardinality restriction, data type restrictions)
- about political preferences (SWRL rules, defining concepts by enumeration)

You can reproduce the steps by downloading the ontologies:
- my_books.encnl
- political_parties.encnl
and opening it with FluentEditor on your computer.

About reasoners and materialized graph





With recent FluentEditor releases the user has three tools to query the ontology:
  • reasoner of choice (in this example Hermit reasoner is used)
  • materialized graph (we can use either OWL-DL or OWL-RL+ materialization mode)
  • SPARQL queries

Friday, 16 January 2015

Using the rOntorion package in R / RStudio and Fluent Editor

The rOntorion package is the port of Cognitum's Semantic Technologies to R. R has become an important tool among Statisticians and Data Scientists and we are proud to provide this community with an enhanced Linked-Data manipulation experience that will allow them to edit, store and reason over structured data (in the supported formats ocnl, rdf and owl); henceforth discovering new horizons in Data Analysis. rOntorion allows to extend Fluent Editor in R and in turn provides the users with the capability of creating their own custom functionality.

rOntorion in R

To demonstrate the use of rOntorion directly from R, let us go through a minimal example. In this example we are going to reason over a set of dummy sentences and infer a single logical conclusion by querying the semantic engine with a question expressed in ocnl format. First we need to install rOntorion: to do so, issue the following command in an R Console:

Monday, 8 December 2014

Fluent Editor 2014 R2 available for download - SPARQL, annotations, R language and more...

Second Release of the Fluent Editor 2014, a comprehensive ontology editor, is available for download now!


What’s new in this release:

  • Embedded SPARQL engine
  • Materialized Graph insight
  • OWL2-RL validation
  • OWL Annotations and SKOS
  • Protégé interoperability
  • R language package
  • R language plugins
  • Collaborative ontology management with Ontorion
  • Custom Reasoners
  • Performance improvements

Wednesday, 8 October 2014

Ontorion SPARQL Tools for Excel


We have just released a SPARQL addin for Excel. This Addin has been developed by Cognitum as part of its semantic technology framework: Ontorion Server and Fluent Editor. Ontorion SPARQL Tools for Excel is a free Addin to MS Excel 2010 and 2013 and can be downloaded here. This addin has been designed to help people in the Knowledge Management business or people interested in the data available from SPARQL endpoints to easily import data from a SPARQL endpoint and/or an Ontorion Server. With the number of SPARQL endpoint growing year after year, this seems as a very important feature that was lacking in Excel until the present day. As you will see with our adding it is possible to do all of this with few single clicks.

 


Tuesday, 2 September 2014

Oncology App - Clinical Decision Support System

Hi, this is Ola form Cognitum. Today I will show you yet another problem which can be solved efficiently by CNL semantic technology.


The problem

Nowadays the medical knowledge is greater than ever. There are official medical guidelines that every doctor is obliged to follow. There are plenty of study cases and a lot of statistical data which help evaluate the probability of successful treatment. Every patient should have right to take advantage of most recent medical research. However, it is hard to do on daily basis. How can the doctor analyze all the books with medical data during patient's visit?

Our solution

Our Oncology Application guides the doctor throughout the patient’s visit. It suggests next steps of the therapy in accordance with up to date medical standards.
When the physician enters the essential information into the application, the system analyzes the clinical situation and tries to generate recommendations for the given condition. The recommendations are in accordance with European Society for Medical Oncology standards. It is the doctor who is still the most important in the decision making process but now he is aided with a professional tool analyzing the wealth of in-depth knowledge amassed in the field of medical oncology.

A Semantic Asset Managemet Application - Sample application with Ontorion™ Server

Hello, here's Jerzy from Cognitum. I would like to present you Corporate Asset Management - the sample web application co-working with Ontorion that we've just prepared. Ontorion gives us possibility to easily ask about knowledge described in Controlled Natural Language (CNL), modify knowledge or even get auto-complete, which makes it excellent development tool for semantic technologies. Using Silverlight we created user-friendly web application fluently communicating with Ontorion.

Let's start with Corporate Asset Management.

After logging in, you can see the Home page of the application. At first, it is only the Install button that is visible. Here is the very first application's contact with Ontorion. Ontorion is asked if the needed database is existing and of course gives a respond. So click Install. Now we are creating a database and writing knowledge into it. All the buttons become visible. Do not be afraid of Install. After clicking it one more time the application will ask Ontorion if the database exists and nothing wrong will be done. For this moment everything is looking like this.

Tuesday, 13 May 2014

How to build an ontology model for inferencing a best offer - a Telecom Company example.

The Business problem

In a modern rapidly changing business environment companies need to quickly respond to these changes to gain operational excellence. Typical Corporation has a central business analysts’ team that is constantly moni-toring overall business performance, benchmarking the market and adjust-ing up-to-date business strategy and sales tactics. This tactics needs further to be deployed and executed by the army of sales people widely spread geographically.
The Telecommunication Company that is referenced in this article has more than 1200 POS (point of sale) in the whole country. Sales process per-formed at each of them shall be coordinated on a daily basis with the recent company sales strategy in accordance to the customer needs, up-to-date product and service portfolio, technical assessment, and various locally available sales-promotions.
With CNL those issues could be addressed in a convenient way both for the human (business analysts) and computer (to run application assessing cus-tomer needs and automatically generate the best offer proposal) perspec-tives. CNL approach allows to 1) describe corporate offer (products and services) in a convenient but readable by the computer form, 2) describe business rules on how Customer needs shall be assessed at POS, 3) de-scribe rules to select the best offer in regard of Customer needs, company sales strategy and feasible to be delivered products and services.
This article refers to the real business case and real telecommunication company. However, due to trade secrets, its name is not disclosed here.


The CNL model

We present the construction process of a model of knowledge, which is the central part of the application, in Fluent Editor (Cognitum, Fluent Editor - Comprehensive tool for editing and manipulating ontologies with CNL, 2014). Fluent Editor is an ontology editor developed at Cognitum. It is a comprehensive tool for editing and manipulating complex knowledge bases and makes usage of a version of Controlled Natural Language first introduced in (Kapłański, 2011) as a specific CNL/OWL interface. By design, this version is compatible with OWL2 ontology standard (OWL- Web Ontology Language, 2014) and the grammar was inspired mainly by the Attempto Controlled English grammar (Kaljurand, 2008) .
We consider here a Telecom Company that sells “complete offers” to various types of customers. A complete offer is “a telephone offer” that will address a certain type of customer (Already-Customer, New-Customer...). Furthermore, the complete offer will include “gadgets” (e.g. a smart phone) and “packages” (e.g. 0.5 monthly GB usage for free) and many more characteristics. In the CNL supported by Fluent Editor it has the following form:

Every complete-offer address-customer a customer-type.
Every complete-offer has-contract-type a general-contract-type.
Every complete-offer has-price a price-per-month.
Every complete-offer includes a package.
Every complete-offer includes a gadget.
Every complete-offer serves a general-service-type.

Using this definition concrete instances of a complete-offer are defined as:

Mobile-Offer-Subscription-Already-Customer-05-Gb is a complete-offer.
Mobile-Offer-Subscription-Already-Customer-05-Gb address-customer Already-Customer.
Mobile-Offer-Subscription-Already-Customer-05-Gb serves Mobile.
Mobile-Offer-Subscription-Already-Customer-05-Gb has-contract-type Subscription.
Mobile-Offer-Subscription-Already-Customer-05-Gb includes Mobile-Package-05-Gb.
Mobile-Offer-Subscription-Already-Customer-05-Gb includes Phone-No-Gadget.
Mobile-Offer-Subscription-Already-Customer-05-Gb has-monthly-pln-price equal-to 20.

Where the name has been chosen to directly reflect the characteristics of the offer. So for example an offer Xx-Offer-Yy-Zz-Kk will serve Xxx, have-contract-type Yyyy, address-customer Zzzz and include Xxx-Package-Kkkk. Going further; we can define another offer like:

Mobile-Offer-Sim-Card-New-Customer-2-Gb is a complete-offer.
Mobile-Offer-Sim-Card-New-Customer-2-Gb address-customer New-Customer.
Mobile-Offer-Sim-Card-New-Customer-2-Gb address-customer Other-Operator-Customer.
Mobile-Offer-Sim-Card-New-Customer-2-Gb serves Mobile.
Mobile-Offer-Sim-Card-New-Customer-2-Gb has-contract-type Sim-Card.
Mobile-Offer-Sim-Card-New-Customer-2-Gb includes Mobile-Package-2-Gb.
Mobile-Offer-Sim-Card-New-Customer-2-Gb includes Phone-Camera-Touch-Screen.
Mobile-Offer-Sim-Card-New-Customer-2-Gb has-monthly-pln-price equal-to 60.

A package can have various characteristics, for example a mobile package will have a certain internet speed:

Every mobile-package is a package.

Mobile-Package-05-Gb is a mobile-package.
Mobile-Package-05-Gb has-internet-package-size The-"0.5 GB".

Where concrete names are chosen to reflect the characteristics of the package. Next we define a gadget as:

Phone-Camera-Touch-Screen is a gadget.
Phone-Camera-Touch-Screen has-type Phone.
Phone-Camera-Touch-Screen has-feature Camera.
Phone-Camera-Touch-Screen has-feature Touch-Screen.

The knowledge presented until now is typically specified by the Telecom Company and constitutes the base model, while the knowledge in the fol-lowing will be produced by the end-user of the application (a salesman for example). The end-user will generate this knowledge using Fluent Editor via a dialog and then it will run real-time queries over this same knowledge. Hence in the following we will call this knowledge the configuration as it configures the application.
To define the configuration, it is only needed to define Customer instances as for example:


Customer-1 is a customer.
Customer-1 has-name equal-to 'John'.
Customer-1 has-surname equal-to 'Doe'.
Customer-1 want-service Mobile.
Customer-1 want-internet-package-size The-"2 GB".
Customer-1 want-contract-type Sim-Card.
Customer-1 has-customer-type Already-Customer.
Customer-1 want-gadget-type Tablet.
Customer-1 want-gadget-feature Touch-Screen.

Rules and real time reasoning

Fluent Editor has a built-in OWL-reasoner (the current version of Fluent Editor uses HermiT reasoner (Boris Motik, 2009)), thus when all the base model and the configuration are written together, it is possible to make queries in CNL.
In order to generate the output for the end-user using the built-in reason-er, some business rules need to be added to the base model. This is possi-ble by using CNL rules that are compatible with SWRL rules (SWRL: A Semantic Web Rule Language, 2014), hence giving broad expressivity.
For example a simple set of business rules that relate the best offer for each client could be:


1) If a customer want-service a thing and a complete-offer serves the thing then the complete-offer has-service-wanted-by the customer.

2)  If a customer want-contract-type a thing and a complete-offer has-contract-type the thing then the complete-offer has-contract-wanted-by the customer.

3) If a customer have-customer-type a thing and a complete-offer address-customer the thing then the complete-offer address-customer-type-of the customer.

Where three new properties are defined: has-service-wanted-by, has-contract-wanted-by and address-customer-type-of.
With help of these rules, the end-user can “ask” the reasoner using ques-tions like:

Who-Or-What has-contract-wanted-by Customer-1 ?

In this case the reasoner will use rule 2 to decide which offer has the con-tract wanted by the customer (Sim-Card) and we will get back all Mobile-Offer-Sim-Card-Xxx that we defined.

Having defined some more involved rule like:


If a complete-offer has-service-wanted-by a customer and the complete-offer has-contract-wanted-by the customer and the complete-offer has-internet-speed-wanted-by the customer and the complete-offer address-customer-type-of the customer then the complete-offer has-characteristics-wanted-by the customer.

And asking (via the reasoner)

Who-Or-What has-characteristics-wanted-by Customer-1 ?

We will get back a single offer: Mobile-Offer-Sim-Card-Already-Customer-2-Gb because Customer-1 :

  • want-service Mobile.
  • want-internet-package-size The-"2 GB"
  • want-contract-type Sim-Card
  • has-customer-type Already-Customer

It is worth mentioning that the reasoner can also answer questions like:


Who-Or-What has-characteristics-wanted-by a customer that has-name equal-to 'John' and has-surname equal-to 'Doe' ?

Getting back the same answer as before.

Implementation

The application as presented until now, can be executed inside Fluent Edi-tor. As we can see in this Figure.


We chose to present the application like this because we think it is more intuitive. The CNL used in this image, can be downloaded here.
Nevertheless, the final application has been developed using ASP.NET MVC and Ontorion which is a scalable cloud based application that we developed at Cognitum (Cognitum, Ontorion™ - a distributed knowledge management system, 2014). Using Ontorion it is possible to use the same functionality of Fluent Editor in a programmatic way allowing us to build all kind of applica-tions.
In this case, we developed an application that is generating a form automat-ically based on the informations present in the base model. When the form is filled and submitted, it generates the configuration. Finally using this con-figuration and the rules (similar to the one presented in the last part), we were able to ask for the packages corresponding to the customer ad-dressed in the form.

The final stage of this application is presented in Figure 2 where we have the generated form on the left and the results of the rules on the right.



Conclusions

In this article we showed how it is possible to model a typical business prob-lem of a Telecom Company using Fluent Editor and its CNL. We showed that not only the modeling process is simple but that it is also possible to add logical rules to automatically match the suitable offer for each customer. Furthermore we saw that using the reasoning mechanism embedded in Fluent Editor, it is possible to ask for questions immediately and get back answers depending on the ontology model used.
In conclusion, the CNL we are using coupled with the simplicity of Fluent Editor, gives a way to simply create and modify complex ontologies. In our point of view, the most interesting part is that the whole CNL is compatible with known standards as OWL and SWRL thus files in these formats can be easily imported in Fluent Editor. Furthermore we have showed that, using the same logic, we were able to build a scalable web application using Ontorion.

It is possible to download the CNL example presented in this article here. This file can be opened with Fluent Editor (if you still haven't downloaded it you can do it here).


Bibliography
  • Boris Motik, R. S. (2009). Hypertableau Reasoning for Description Logics. Journal of Artificial Intelligence Research, 36:165-228.
  • Cognitum. (2014). Fluent Editor - Comprehensive tool for editing and manipulating ontologies with CNL. Retrieved from Cognitum: http://cognitum.eu/semantics/FluentEditor2/Default.aspx
  • Cognitum. (2014). Ontorion™ - a distributed knowledge management system. Retrieved from Cognitum: http://cognitum.eu/semantics/Ontorion/
  • Kaljurand, K. (2008). ACE View --- an Ontology and Rule Editor based on Attempto Controlled English. In OWLED - CEUR Workshop Proceedings (p. volume 432). Dolbear, Catherine and Ruttenberg, Alan and Sattler, Ulrike.
  • KapÅ‚aÅ„ski, P. (2011). Controlled English Interface for Knowledge Bases. Studia Informatica, 84.
  • OWL- Web Ontology Language. (2014). Retrieved from http://www.w3.org/TR/owl-features/
  • SWRL: A Semantic Web Rule Language. (2014). Retrieved from http://www.w3.org/Submission/SWRL/



If you want to learn more about Fluent Editor CNL-EN grammar, visit this link.

*) FluentEditor 2, ontology editor, is a comprehensive tool for editing and manipulating complex ontologies that uses Controlled Natural Language. Fluent editor provides one with a more suitable for human users alternative to XML-based OWL editors. It's main feature is the usage of Controlled English as a knowledge modeling language. Supported via Predictive Editor, it prohibits one from entering any sentence that is grammatically or morphologically incorrect and actively helps the user during sentence writing. The Controlled English is a subset of Standard English with restricted grammar and vocabulary in order to reduce the ambiguity and complexity inherent in full English.

Simple form design (and more…) using Fluent Editor.

At Cognitum we are developing innovative business applications making use of semantic technologies that can dramatically improve company productivity. Today we would like to present a method using our technologies with which it is possible to build a complex C#-Silverlight business application using a combination of Fluent Editor and Ontorion. We will start by a simple example to better explain the potential of our approach. Then we will present a more realistic example presenting how this approach can be applied to solve common business problems.

Simple form design (and more...) using Fluent Editor.



Let’s imagine we want to make a Customer form containing a customer section with compulsory fields First-Name and Surname.  First of all we code the characteristics of the form using our Controlled Natural Language editor: Fluent Editor, obtaining the code:

Every form is a thing.
Every customer-form is a form.

Every customer-form must concern a customer.

Every customer must have-first-name (some-string-value).
Every customer must have-surname (some-string-value).

our C# application will then render the form as:


As we can see the name of the form is taken from (name)-form, the name of the section is the element concerning the form and the name of the field is taken from have-(name). Moreover as the fields have been declared in the CNL file with the must keyword, submitting the form without specifying these fields will result in an error.
Using this schema it is possible to construct all type of form fields. For example the code

Every customer must have-customer-type a customer-type.
Something is a customer-type if-and-only-if-it is either Already-Client or New-Client.


Will result in a field of type select


It is also possible to have optional checkbox fields using can or additional requirements if a certain choice is made. For example by adding the CNL code

Something is a already-client-customer if-and-only-if-it has-customer-type Already-Client.
Every already-client-customer must have-phone-number (some-integer-value).

Then after choosing the Already-Client option in the form, we will be asked for the phone-number of the customer.
Clearly using such method if we will in the future decide that a field, a field type or a field name have to be changed we can do this immediately by changing the content of the CNL file.
Another interesting consequence of using a CNL file to render the form is that after submitting the form we can easily obtain a CNL-compliant result. For example by filling out the form presented before and submitting it we will obtain a CNL code of the type

Customer-Form-0 is a customer-form.
Customer-1 is a customer.
Customer-1 is a already-client-customer.
Customer-1 has-first-name equal-to 'John'.
Customer-1 has-surname equal-to 'Dow'.
Customer-1 has-customer-type Already-Client.
Customer-1 has-phone-number equal-to '394829388'.
Customer-Form-0 concerns Customer-1.


Going yet one step further we can add to the model some simple rules that we would like the elements of the form to satisfy

Every package is-for a customer-type.
 
If a customer have-customer-type a thing and a package is-for the thing then the package is-package-for the customer.

And a simple instance of the package type:

Already-Client-Package is a package.
Already-Client-Package is-for Already-Client.

Then using Ontorion reasoner inside Fluent Editor, it is possible to ask questions like :  ‘’Who or What is-package-for Customer-1?” and the answer will be: Already-Client-Package. This can also be done automatically by the C# application using the MicroOntorion API. At this point the full potential of this method is unveiled. We will show in the next part how using this kind of approach it is possible to make a complex business application powered by Cognitum’s semantic technologies with a simple user interface intuitive to use.


If you want to learn more about Fluent Editor CNL-EN grammar, visit this link.

*) FluentEditor 2, ontology editor, is a comprehensive tool for editing and manipulating complex ontologies that uses Controlled Natural Language. Fluent editor provides one with a more suitable for human users alternative to XML-based OWL editors. It's main feature is the usage of Controlled English as a knowledge modeling language. Supported via Predictive Editor, it prohibits one from entering any sentence that is grammatically or morphologically incorrect and actively helps the user during sentence writing. The Controlled English is a subset of Standard English with restricted grammar and vocabulary in order to reduce the ambiguity and complexity inherent in full English.