Showing posts with label ontology. Show all posts
Showing posts with label ontology. Show all posts

Wednesday, 28 October 2015

Ask Data Anything - Election results example

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 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.

Thursday, 16 July 2015

Fluent Editor 2014 R4 – SWRL Built-ins, Auto-recovery Functionality, OWL2 EL++/OWL-RL Validation, and New Features in Ontology Graph.

A new Fluent Editor 2014  R4 is now available which will present you a few new powerful features. With the new Fluent Editor you will be able to utilize core SWRL built-ins, various OWL2 profiles, visualize your ontology file more effectively, and more to benefit while editing and exploring ontology files. Such new feather are as follows :
  • SWRL built-ins
  • Auto-recovery functionality
  • OWL2-EL++ / OWL-RL validation
  • New features in ontology diagram
  • Various performance improvements

Tuesday, 19 May 2015

Ask Data Anything

Ask Data Anything is Cognitum's approach to exploring data by using a subset of natural language which articulates concepts and instances modeled in ontologies to provide a meaningful quering experience. Ask Data Anything seizes on regularities of language to provide a natural interpretation of queries being asked; its semantics are provided via R and rOntorion (alternatively  F# and Ontorion).

Technically, Ask Data Anything is capable of performing projection, sub-setting, grouping and aggregation operations, providing answers for queries involving the following information:
  • What? Any of the columns of your data table are considered a quantitative field over which to perform queries,
  • How? How the output is to be shown. The results of the query can be retrieved on either a table, histogram or a map,
  • Where? (Optional) The "in" preposition allows to restrict the search to an specific named group of items  as happens for instance with continents which can be seeing as a group of countries,
  • Of? (Optional) The "of" preposition allows to dive into the data, restricting the desired results to a certain set of types (concepts in the Fluent Editor sense) by searching the data in a certain column for instances (in Fluent Editor sense) of those types; we call this material sub-setting,
  • By? (Optional) By which type (in Fluent Editor sense) you would like to group the results for aggregation purposes.
  • When? (Optional) Queries can contain time constraints.

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

Monday, 2 February 2015

Fluent Editor's Interoperability with Protégé

Protégé is a great tool for editing ontologies allowing deep insight into the structure of the OWL ontology. Fluent Editor allows user to focus on actual meaning of the ontology (taxonomy, vocabulary, rule set, etc) being edited.
From the R2 release, Fluent Editor enables you to view and build ontology with both applications synchronously, through which you can enjoy those great features of both applications at the same time. This is supported by two related functionalities. -  exporting ontology from one window to the other, or importing ontology from the opened window to your current window. In this post we will look through how you can utilize this feature.


Initial Settings
By default, this interoperability with Protégé is disabled. In order to enable it, first you need to edit settings of the Protégé plug-in on Tab > Options as shown below. Set "Yes" for enabling the plug-in and enter your Protégé path on the bottom.


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:

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

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.