OWL/Protégé : EquivalentTo Class Definition - owl

It seems to me that the definition of a EquivalentTo class doesn't work properly in Protégé 5.2.0. Hopefully, it is a misunderstanding on my side.
Here is the example : Link to a simple ontology that gives an unexpected result.
The problem happens when I use a min cardinality condition on some ObjectProperties. In the provided example, the classification in SubClassObject of the Object(using Pellet) doesn't work for the hasPart min 2 Part but does for hasPart min 1 Part. As you see, the element5 has 4 Parts as defined.
Has anybody ever met a similar issue?
Thank you in advance,

As #StanislavKralin said : Edit > Make all individuals different.
In my personal experience afterwards, be aware that it will considerably increase computing time of reasoning.

Related

Is there a discrete dirac delta function in Julia?

The title sums it up. I have seen some mentions in the RatFun and SpectralMeasures package but I am mostly looking for a function analogous to the ones found in the Sympy module for Python.
Edit: Thanks everyone for your answers and comments. I was looking for the discrete version of a dirac delta. At first I was confused and wanted to look for a "function" but I actually was just looking for the Kronecker delta which exhibits the following behavior:
delta(x) = 1 if x=0
delta(x) = 0 otherwise
I quickly realized that I didn't even need a function, I just had to take care of the differences in the argument. Thanks again!
There is a Dirac type in MeasureTheory.jl, but unsure if it fits your needs.
The OP basically wants the Kronecker delta function
[https://en.wikipedia.org/wiki/Kronecker_delta]
which is trivial in julia:
delta(n) = n == 0

Klocwork Analysis Metrics Issue not Clear

I don't understand this issue:
Issue: HIS Metriken - Cyclomatic (CR-MET4): [function_name] 13>10
It appears in Klocwork analysis while checking the issues of Code: METRICS.E.HIS_Metriken___Cyclomatic__CR_MET4_
Can anyone support?
Thanks
Do you see all those ifs, elses, loops in that function?
Those are the problem, you need to either design this function's logic more elegantly or split it into more functions with well-defined purposes.
By the way, I can only see that problematic function of yours because I am especially clairvoyant. For this kind of question you should normally show your code, just to be fair towards all those other users which cannot read your mind like I did.
Naaa, not really. The cyclomatic complexity is a measure for number of potential paths through your function. And that you have crossed the treshold of 10 by 3 means your function must be full of control structs, which create many paths.

Protege: reasoner HermiT won't complain about unmet assertion; why? [duplicate]

I think I am going crazy! I have followed the various tutorials for Owl and Protege and still cannot figure out the answer. Use case is simple. I have defined a class called ‘Person’. I have defined a data property called hasFirstName. I have added a ‘subclass of’ restriction to Person like this : ‘hasFirstName exactly 1 string’. I have also added an individual called Alex of type Person, and have not added the hasFirstName property. I expect the reasoner to complain as I have specified the cardinality of 1, and asserted that Alex is a Person, but have not added the property value to Alex individual, yet the reasoner does not complain. If however I add two statements e.g. hasFirstName ‘Alex’ and hasFirstName ‘John’ then I get a complain. What I am doing wrong? Any help will be most appreciated, thanks.
There's no inconsistency in the first case. OWL makes the open world assumption, which means that something being unknown is different from it being known to be true or known to be false. Your username, at the time I'm writing this answer is user3552593. I'm relatively confident that you have a name, and that's not inconsistent with the fact that I don't know what it is yet.
By saying that
Person ⊑ =1 hasFirstName.String
and that
Alex : Person
you can infer that
Alex : =1 hasFirstName.String
There's nothing inconsistent with that; Alex, by virtue of Alex's personhood, has exactly one first name—we just don't know what it is yet.

Can a single image be a positive example for multiple classes?

Bouquets of flowers are a fairly accurate analogy for our problem domain, and we have another S.O. question out there asking about the feasibility of a different approach to our problem/goal.
What if, rather than making classes by flower types, we made our classes according to the actions we need to take depending on the contents and complex combinations of the bouquet?
Let's say that, if in the bouquet in our test image, there are:
>9 roses, >14 pansies, <1 marigold, any qty of other flowers
then we need to take, both, action-a & action-d.
So, then, the same image would be used as a positive example for both class action-a and class action-d.
Inversely, there would absolutely be positive action-d examples which would be negative action-a examples, and vice versa.
Of course, even with this simplification it still gets quite complex.
I imagine this approach would need a huge number of training images.
Even still, I'm hopeful that it might work.
Thoughts?
Yes, you can have the same image in >1 classes inside 1 classifier, as long as you have >=10 unique images per class AND >=20 total unique images in the classifier in total, including any negative_examples.
However, you should be careful about what you are "teaching" the system by doing this.
Classes within a classifier are meant to be mutually exclusive. Internally the system is trying to figure out what makes the positive examples of one class different from all the other examples in a classifier's training data.
If the system discovers an exact duplicate of an image file in more than one class of a single classifier , it will use it as a positive example of both classes. Exact duplicates are determined by the check sum of the image file.
I think you are on right path. but u have to make sure that u have enough no of images for training and no. of flowers in each image should be clearly visible.
Try it

SpellCheck suggestion didn't populate the expect result

All. Forgive me I am a newbie in Solr, I am trying to add spell check in the Solr.
Currently I can say it works .But I got a problem which the suggestion is not showing up as I expected.
I tried to search with the keywords lu. and expect the suggestion lung in the result. But it doesn't show up.
the Url is http://10.2.21.38:7574/solr/gettingstarted_shard1_replica2/spell?q=lu&spellcheck=true&spellcheck.collate=true&spellcheck.build=true
Only when I tried with lun. It can return suggestion lung.
Any idea to get it work? Thanks.
Updated
It seems it has something with the configuration <str name="accuracy">{number}</str> the original value is 0.7. When I changed it to smaller value like 0.001 . keywords lu can get the suggestion lung.
But I want to know what does it mean for the accuracy. The document only say a little about it .The accuracy setting defines the threshold for a valid
suggestion. That is it.
Could someone please tell me more about it for better understanding . and Is there any other configuration to affect the suggestion result ? Thanks.
The accuracy setting refers to the value that the active StringDistance calculator returns (which is between 0 and 1, depending on similarity). The standard distance measurer in Lucene is the LevensteinDistance (sic). I'll refer to the source to see how it works - I'm not intimately familiar with the code. The returned value is at least based on:
return 1.0f - ((float) p[n] / Math.max(other.length(), sa.length));
Where p[n] is calculated through the iteration above in the code.
You can change most implementations in the spellchecker, such as the distance measurer or the spellchecker itself. See Spell Checking for examples. maxEdits and minPrefix might be interesting as well. Also, remember that lu and lung have a fairly large difference, as both terms are short and not really misspellings of each other. There are other ways of doing automagic completion, such as the Suggest module or wild card searching against a StrField or a KeywordTokenizer-ed field.

Resources