I am working with basic OWL, and it's quite easy to represent some simple sentence like "Songoku is a lecturer, he teaches Maths".
E.g.:
<owl:Class rdf:ID="Lecturer"></owl:Class>
<owl:Class rdf:ID="Subject"></owl:Class>
<owl:Property rdf:ID="teach">
<rdfs:domain rdf:resource="#Lecturer"/>
<rdfs:range rdf:resource="#Subject"/>
</owl:Property>
<Subject rdf:ID="Maths"></Subject>
<Lecturer rdf:ID="Songoku">
<teach>
<Subject rdf:about="#Maths"></Subject>
</teach>
</Lecturer>
But I faced a problem when I tried to represent this sentence: Bob is a Student, If Bob has 5 dogs, then he has at least 1 cat..
Can you tell me some suggestion?
You can represent some fairly complicated conditional sentences in OWL using general subclass axioms. Let's look at a few examples. If you were trying something a little bit simpler, say
which is shorthand for the quantified conditional "For all x, if x is a student with at least five dogs, then x has at least one cat, you can do this in OWL with
Those are both anonymous class expressions, but you could define some equivalent classes to make some things simpler:
Now, your example was Bob is a Student, If Bob has 5 dogs, then he has at least 1 cat. There are two sentences there. The first is easily encoded by
The second is a bit more complicated. You're saying that Bob is a member of the class of things which, if they have at least five dogs, they have at least one cat. A (material) conditional "If P then Q" is logically equivalent to the disjunction "(not P) or Q". So we're saying that Bob is a member of the class of things that either do not have at least five dots or that do have at least one cat. The class expression for that is
Now our knowledge about Bob is that
You could define an equivalent class for that anonymous class expression, but I doubt it will be rendered very naturally in most languages. Here's what an ontology containing that knowledge about Bob looks like (in the N3 format):
This same approach can be used for datatype properties and restrictions on their values. For instance, to say that "if Bob weighs at least 60kg, then he is at least 180cm tall," we can say that Bob is an element of the class of things that, if they weight at least 60kg, then they are at least 180cm tall, or equivalently, the class of things that either do not weight at least 60kg, or that are at least 180 cm tall. In the Manchester syntax, the class expression looks like
The relevant portion from the N3 serialization of the ontology is:
This is a text in Attempto Controlled English (ACE):
and it has this representation in OWL:
which can be computed automatically with the ACE parser (APE). So, if you have managed to conceptualize your statement in English, it's worth checking if the ACE parser can map it automatically to OWL, see the online demo of the ACE parser.