Does OWL DL include SubObjectPropertyOf and ObjectPropertyChain? - properties

I can not find clear statement, whether SubObjectPropertyOf and ObjectPropertyChain bring me out of OWL DL or not?
In this post Post 1 is mentioned: "In OWL 2 (but, unfortunately, not OWL 2 DL, as Antoine Zimmermann pointed out in the comments), you can assert that a given property is a superproperty of a chain of properties..."
And in this Post 2 is doesnt mentioned, whether solving that problem bringed out of DL.
Thanks for the answer.

Related

how to get table info and summary of page using Wikipedia api?

I want to get minimal information of a Wikipedia page using MediaWiki API like DuckDuckGo. For example for Steve Carell: https://duckduckgo.com/?q=steve+carell&t=hp&ia=news&iax=about
How can I get this information with a Wikipedia url (eg https://en.wikipedia.org/wiki/Steve_Carell) in HTML format?
You can use the MediaWiki API for that. There's an extension, TextExtracts, which is exactly for that (and it is installed on Wikipedia).
In your case, e.g.:
https://en.wikipedia.org/w/api.php?action=query&prop=extracts&exsentences=1&titles=Steve%20Carell
will return something like:
<p class=\"mw-empty-elt\">\n</p>\n\n<p class=\"mw-empty-elt\">\n \n</p>\n<p><b>Steven John Carell</b> (<span></span>; born August 16, 1962) is an American actor, comedian, producer, writer and director.</p>
You can customize how many sentences (or characters) the API returns, as well, please consult the API documentation for that.
There's also the way to retrieve the short description, which is saved at Wikidata (and visible in the mobile view of Wikipedia). This call would be:
https://en.wikipedia.org/w/api.php?action=query&prop=pageprops&titles=Steve_Carell
This returns the following property in the pageprops of the page:
"wikibase-shortdesc": "American actor"
This may fit better depending on your use case.
You can even get both of the results with a single, combined, request:
https://en.wikipedia.org/w/api.php?action=query&prop=extracts|pageprops&exsentences=1&titles=Steve_Carell

What is Context-Only in QnA Maker?

When I use QnA Maker , Ifound something named CONTEXT-ONLY . What is it used for?
Context-Only is a part of the multi-turn feature for qna-maker. When a question in the qna maker is set to 'Context-Only', a user cannot ask that question and get the answer. It can only be 'asked' as part of the multi-turn flow:
For example, I have a question called 'Shocked Pikachu!' in my qnamaker kb. If this wasn't a Context-Only, a customer could put in 'Shocked Pikachu!' and get the answer 'I'm so confused!'. But because it is Context-Only, the only way to reach this answer is to go through the first question ("What is a pokemon"), and click the "NOT FLUFFY!" follow up:
Notice that 'Shocked Pikachu!' IS listed as question, but is not available to be asked. This is typically not a good idea, you really want your prompts to match the question. I did it to show that clicking 'NOT FLUFFY' lead to that question's answer.

Part of speech search with lucene

After many googling searchs I decided to post my problem here hoping that someone help me. What I want to achieve is to perform queries as follows:
q1: (adjective) "jumps" (preposition) // any adj followed by "jumps" followed by any prep.
q2: (adjective:brown) "jumps" (preposition) // brown as adj. followed by "jumps" followed by any prep.
q3: (adjective:brown) (verb:jumps) (preposition) // brown as adj followed by jumps as verb followed by any preposition.
In a more general form, what I want is
(POS[:specific_word]) (POS[:specific_word]) (POS[:specific_word])
For that, I have the text tagged as follows:
the|[pos:DT][lemma:the] quick|[pos:JJ][lemma:quick] brown|[pos:JJ][lemma:brown] fox|[pos:NN][lemma:fox] jumps|[pos:NNS][lemma:jump] over|[pos:IN][lemma:over] the|[pos:DT][lemma:the] lazy|[pos:JJ][lemma:lazy] dog|[pos:NN][lemma:dog]
The first thing I thought was to index extra info of each term as payload and using PayloadNearQuery after in order to access to the payload of each span. The problem is that PayloadNearQuery match the terms first and then access its payload, so none of the 3 above queries will work. (correct me if I'm wrong)
The second thing I thought was to index extra info as synonyms of the term but, this way, the second query won't work since I can't ask if the first term is an adj and the specific word "brown" simultaneously.
Any way to address this problem, suggestions, etc. will be appreciated.

Mediawiki API: Get image from articles in specific category

Without much success, I've been trying to retrieve images (and extracts) from all posts in a certain category.
Here's a query to get the images from the main page, but I haven't found a query for specific categories.
api.php?action=query&prop=images&titles=Main%20Page
Using search seemed more promising, but still it's not what I'm looking for.
api.php?action=query&list=search&format=jsonfm&srsearch=incategory:Marine_mammals
The second query could've been a good starting point if it provided page IDs.
What you want is to use the categorymembers generator, by adding &generator=categorymembers&gcmtitle=Category%3AMarine_mammals in place of &titles. Since I discovered generators I barely remember using the API for anything else. I'd also recommend sticking to mainspace. So for example,
https://en.wikipedia.org/w/api.php?action=query&prop=images&format=json&imlimit=10&generator=categorymembers&gcmtitle=Category%3AMarine_mammals&gcmnamespace=0&gcmlimit=50
Gives:
{"query-continue":{"images":{"imcontinue":"60257|Ursus_maritimus_4_1996-08-04.jpg"}},"query":{"pages":{"149269":{"pageid":149269,"ns":0,"title":"Blubber"},"19289045":{"pageid":19289045,"ns":0,"title":"Instituto Via Delphi"},"2178272":{"pageid":2178272,"ns":0,"title":"List of marine mammals of Australia"},"60257":{"pageid":60257,"ns":0,"title":"Marine mammal","images":[{"ns":6,"title":"File:Desmostylus2DB.jpg"},{"ns":6,"title":"File:Estuary-mouth.jpg"},{"ns":6,"title":"File:FL fig04.jpg"},{"ns":6,"title":"File:Humpback Whale underwater shot.jpg"},{"ns":6,"title":"File:Hydrurga leptonyx edit1.jpg"},{"ns":6,"title":"File:Maldivesfish2.jpg"},{"ns":6,"title":"File:Oceanic whale pump - journal.pone.0013255.g001.tiff"},{"ns":6,"title":"File:PikiWiki Israel 15217 Dolphin.JPG"},{"ns":6,"title":"File:Sea lion family.JPG"},{"ns":6,"title":"File:Sea otter cropped.jpg"}]},"36425597":{"pageid":36425597,"ns":0,"title":"Marine mammals as food"},"3703749":{"pageid":3703749,"ns":0,"title":"Marine otter"},"644379":{"pageid":644379,"ns":0,"title":"North Atlantic Marine Mammal Commission"},"1336536":{"pageid":1336536,"ns":0,"title":"Sea mink"},"567471":{"pageid":567471,"ns":0,"title":"Sea otter"},"2764345":{"pageid":2764345,"ns":0,"title":"United States Navy Marine Mammal Program"}}}}

Yahoo Answers API - questionSearch - Filter out certain words

Is the Yahoo Answers API very limited on its functionality, or the documentation is incomplete?
Here is API ref:
http://developer.yahoo.com/answers/V1/questionSearch.html
I'd need to be able to retrieve questions that contain termA or termB but neither termC or termD.
Example URL for questions containing termA:
http://answers.yahooapis.com/AnswersService/V1/questionSearch?appid=YahooDemo&query=termA
Also, further information on the API will be helpful.
Thanks!
Some Googling showed that the query supports AND, OR, ANDNOT and brackets. So for a query that returns anything on cats but nothing on dogs:
http://answers.yahooapis.com/AnswersService/V1/questionSearch?appid=YahooDemo&query=cats+ANDNOT+dogs
As for the brackets, to query for anything that mentions cats or dogs but not fish:
http://answers.yahooapis.com/AnswersService/V1/questionSearch?appid=YahooDemo&query=(cats+dogs)+ANDNOT+fish