Showing posts with label knowledge engineering. Show all posts
Showing posts with label knowledge engineering. Show all posts

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.

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. 

Thursday, 19 March 2015

How to explore SPARQL endpoint?


In this article you will learn:
- how to explore SPARQL endpoint with Ontorion™ SPARQL Tools for Excel
- about SPARQL autocomplete tool from Cognitum
Ontorion™ SPARQL Tools for Excel latest release offers two new features enriching the SPARQL experience. First one is Explore SPARQL endpoint tool, which enables to get a quick overview of the data content of the endpoint. Second is SPARQL autocomplete tool, which guides user throughout writing the query with intelligent autocomplete hints.

Motivation

A growing amount of data is made public via SPARQL endpoints. You can explore the data by asking SPARQL queries. One of the most famous SPARQL endpoints is DBpedia - a semantic version of Wikipedia. Many public institutions expose some of their data in such an open way as well. A good example is The Environment Agency of England and Wales, which publishes data about bathing water quality .
The basic building block of SPARQL data set is a triple. It is a statement of the form subject-predicate-object. Apart from that, the structure of the data can be quite loosely defined. Thus it may sometimes be difficult to explore a new SPARQL endpoint for the first time.

Monday, 16 February 2015

Using OWL Annotation in Fluent Editor

OWL Annotations together with SKOS and DcTerms form a widely used Thesaurus standard that help the ontology modeler to give meaningful names to elements of the ontology or to relates elements in various ontology. In the latest release of Fluent Editor, we have introduced the possibility to add, remove and modify OWL annotations with full support for SKOS and DcTerms. As always this has been implemented thinking of the usability over everything. 

All actions related to the annotations are reachable from the Annotation tab that was added in the right column of the Fluent Editor window. To see how to use annotations in Fluent Editor,you can open the Book Reference template. To see the template, click on File -> New  and then Book Reference.

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:

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.

Wednesday, 31 July 2013

Now Fluent Editor matches not only your needs! Regular expressions.

Since version 2.3.17 Fluent Editor has new feature: regular expressions matcher.
This functionality allows to specify not only one, particular string as attribute, but also a whole set (or class) of strings defined by regular expression.



Regular expressions

Regular expressions have strong theoretical background in computer science and mathematical linguistics. These items are connected with Chomsky hierarchy of languages, and are equivalent to regular language (see Chomsky hierarchy).
About regular expressions and theirs syntax you can learn e.g. here.
Broadly speaking, thanks to regular expressions, you can specify pattern that matches one, many or even infinite number of strings. This is the easy way to validate for example e-mail addresses and phone numbers.

Regular expressions in Fluent Editor

Since Fluent Editor version 2.3.17 there is an ability to define string attributes as regular expression patterns. Both in ontology and questions. It is possible with new keyword:



that-matches-pattern


This keyword may appear insted of "equal-to" keyword. You can attach such patterned attribute to instance or concept or use it in a question.
Now it is the time for really quick "Hello World" to regular expressions in Fluent Editor.
Lets create ontology:



Tom has-name equal-to 'Tommy'.
Jerry has-name equal-to 'Jerry'.
Every-single-thing that has-name that-matches-pattern '.*rry' is a mouse.
Every cat has-name that-matches-pattern '(T|J)o(n|m){1,2}y'.
Max is a cat.
Max has-name equal-to 'Max'.


 In above ontology there are 2 regular expressions. First one ('.*rry') describes all strings that finish with 'rry'. So it matches 'Jerry' as well as 'blabla23424rry'.
The second one ('(T|J)o(n|m){1,2}y') fits to any string that starts with either 'T' or 'J', then has 'o', the next character is either 'n' or 'm' repeated 1 or 2 times, and then it finishes with 'y'. So all and only strings that are matched by this regular expression are the following: Tony, Tonny, Tomy, Tommy, Jony, Jonny, Jomy and Jommy.
Lets ask some questions. First one to warm up:


Who-Or-What has-name that-matches-pattern '.*ry'?

It returns only 'Jerry'. Why not 'mouse'? Because '.*ry' matches e.g. 'Kery', which is not matched by '.*rry', so Kery is not necessarily a mouse (but it can be a mouse).
The second question (is the first one slightly modified):

Who-Or-What has-name that-matches-pattern '.*erry'?

Now it returns 'Jerry' and 'mouse'.'Jerry' as a result is obvious. 'mouse' is obvious too, because every string that is matched by '.*erry' (finishes with 'erry') is matched by '.*ry' (finishes with 'ry').
The third question:

Who-Or-What has-name that-matches-pattern '[A-Z]+[a-z]*'?

The regular expression used above matches all strings that start with one or more big letters and then contains zero or more small letters.
This query returns 'Tom', 'Jerry' and 'Max' (which are obvious) and 'cat' (because if name satisfies '(T|J)o(n|m){1,2}y' it also matches '[A-Z]+[a-z]*').

Now it is a time for the tricky question:

Who-Or-What has-name that-matches-pattern '[TJonm]*y?'?
The regular expression '[TJonm]*y?' matches the string that contains zero or more 'T', 'J', 'o', 'n' or 'm' letters and may finish with 'y' ('?' indicates that there are zero or one occurrences of 'y'). So this regular expression matches such strings as: 'Tommy' or 'omnomnom'. It matches also all string generated by '(T|J)o(n|m){1,2}y'. So there is no surprise that 'Tom' and 'cat' are returned after execution of this query.
But why this query returned 'Max'? Admittedly, Max has name that do not match regular expression in the question, but the true is that all cats fits the query and Max is a cat. Because of Open World Assumption (see OWA), Max has another unknown name that matches regular expression in the query.

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.