Re: Typed Literal with langString datatype

2022-08-03 Thread Adrian Walker
unsubscribe

On Wed, Aug 3, 2022 at 10:35 AM Jared Whiklo  wrote:

> Hi,
>
> We are experiencing an issue where N-Triples produced by Jena cannot be
> parsed by Jena. The issue seems to be how the Model outputs a literal like
>
> example:123 @cc:useGuidelines "This is some text."@en;
>
> It stores this triple properly (or seems to in the graph) but when
> serialized as N-Triples it has both a datatypeUri and a langString and
> so prints out.
>
>   "This is some
> text."@en^^ .
>
> My understanding is that you can _either_ have a language or a datatype
> but not both. We'd like to retain the language as that seems more
> important that "langString".
>
> I am unable to see how to alter the LiteralImpl to get a plain literal
> output instead of a typed one?
>
> Any help is appreciated.
>
> cheers,
> jared
>
> --
> Jared Whiklo
> jwhi...@gmail.com
>
>


Re: Fuseki 503 response, with java.io.IOException in logs

2022-06-21 Thread Adrian Walker
unsubscribe

On Mon, Jun 20, 2022 at 6:24 PM Noah from ProvocaTeach
 wrote:

> Hi all,
>
> I took another look at the `journalctl` logs and noticed something in the
> stack traces:
>
> Jun 20 18:15:12 numberphile fuseki-server[8404]:
> org.apache.jena.assembler.exceptions.AssemblerException: caught:
> java.io.IOException: No such file or directory
> Jun 20 18:15:12 numberphile fuseki-server[8404]: at
> org.apache.jena.assembler.assemblers.AssemblerGroup$PlainAssemblerGroup.openBySpecificType(AssemblerGroup.java:165)
> ~[fuseki-server.jar:4.5.0]
> Jun 20 18:15:12 numberphile fuseki-server[8404]: at
> org.apache.jena.assembler.assemblers.AssemblerGroup$PlainAssemblerGroup.open(AssemblerGroup.java:144)
> ~[fuseki-server.jar:4.5.0]
> Jun 20 18:15:12 numberphile fuseki-server[8404]: at
> org.apache.jena.assembler.assemblers.AssemblerGroup$ExpandingAssemblerGroup.open(AssemblerGroup.java:93)
> ~[fuseki-server.jar:4.5.0]
> Jun 20 18:15:12 numberphile fuseki-server[8404]: at
> org.apache.jena.assembler.assemblers.AssemblerBase.open(AssemblerBase.java:39)
> ~[fuseki-server.jar:4.5.0]
> Jun 20 18:15:12 numberphile fuseki-server[8404]: at
> org.apache.jena.assembler.assemblers.AssemblerBase.open(AssemblerBase.java:35)
> ~[fuseki-server.jar:4.5.0]
> Jun 20 18:15:12 numberphile fuseki-server[8404]: at
> org.apache.jena.fuseki.build.FusekiConfig.getDataset(FusekiConfig.java:667)
> ~[fuseki-server.jar:4.5.0]
> Jun 20 18:15:12 numberphile fuseki-server[8404]: at
> org.apache.jena.fuseki.build.FusekiConfig.buildDataService(FusekiConfig.java:430)
> ~[fuseki-server.jar:4.5.0]
> Jun 20 18:15:12 numberphile fuseki-server[8404]: at
> org.apache.jena.fuseki.build.FusekiConfig.buildDataAccessPoint(FusekiConfig.java:417)
> ~[fuseki-server.jar:4.5.0]
> Jun 20 18:15:12 numberphile fuseki-server[8404]: at
> org.apache.jena.fuseki.build.FusekiConfig.servicesAndDatasets$(FusekiConfig.java:322)
> ~[fuseki-server.jar:4.5.0]
> Jun 20 18:15:12 numberphile fuseki-server[8404]: at
> org.apache.jena.fuseki.build.FusekiConfig.servicesAndDatasets(FusekiConfig.java:293)
> ~[fuseki-server.jar:4.5.0]
> Jun 20 18:15:12 numberphile fuseki-server[8404]: at
> org.apache.jena.fuseki.build.FusekiConfig.processServerConfiguration(FusekiConfig.java:192)
> ~[fuseki-server.jar:4.5.0]
> Jun 20 18:15:12 numberphile fuseki-server[8404]: at
> org.apache.jena.fuseki.webapp.FusekiWebapp.processServerConfigFile(FusekiWebapp.java:283)
> ~[fuseki-server.jar:4.5.0]
> Jun 20 18:15:12 numberphile fuseki-server[8404]: at
> org.apache.jena.fuseki.webapp.FusekiWebapp.initServerConfiguration(FusekiWebapp.java:243)
> ~[fuseki-server.jar:4.5.0]
> Jun 20 18:15:12 numberphile fuseki-server[8404]: at
> org.apache.jena.fuseki.webapp.FusekiWebapp.initializeDataAccessPoints(FusekiWebapp.java:221)
> ~[fuseki-server.jar:4.5.0]
> Jun 20 18:15:12 numberphile fuseki-server[8404]: at
> org.apache.jena.fuseki.webapp.FusekiServerListener.serverInitialization(FusekiServerListener.java:97)
> ~[fuseki-server.jar:4.5.0]
> Jun 20 18:15:12 numberphile fuseki-server[8404]: at
> org.apache.jena.fuseki.webapp.FusekiServerListener.contextInitialized(FusekiServerListener.java:57)
> ~[fuseki-server.jar:4.5.0]
>
>
> What’s happening in that
> `processServerConfiguration(FusekiConfig.java:192)` function? Is it looking
> for the config file and not locating it for some reason? I passed the
> argument `--config=/srv/data-tier/database/config.ttl` in the `.service`
> file.
>
>
> Best wishes,
> Noah G.
>
>
> On Mon, Jun 20, 2022, at 13:05, Noah from ProvocaTeach wrote:
> > Hi, thanks for the reply.
> >
> > I could be mistaken, but I looked through the scripts, and I don’t think
> I’m having Fuseki generate a PIDfile since I’m using `systemd`.
> >
> > Here is my `fuseki.service` file:
> >
> > [Unit]
> > Description=Apache Jena Fuseki
> >
> > [Service]
> > Restart=on-abort
> > Type=simple
> > ExecStart=/srv/data-tier/fuseki/fuseki-server
> --conf=/srv/data-tier/database/config.ttl --port=31457
> > User=fuseki
> > SupplementaryGroups=prte_database
> > Environment='FUSEKI_BASE=/srv/data-tier/database'
> 'FUSEKI_HOME=/srv/data-tier/fuseki' 'JVM_ARGS=-Xmx1500m'
> >
> > [Install]
> > WantedBy=multi-user.target
> > The `fuseki` user owns `/srv/data-tier/database` and has
> read/write/execute permissions on it.
> >
> > According to the `systemd` docs <
> https://www.freedesktop.org/software/systemd/man/systemd.service.html#PIDFile=>,
> if I set `Type=simple` on a service, it shouldn’t be using PIDfiles.
> >
> > Is that the problem? Should I have `Type` set to something else?
> >
> >
> > Best wishes,
> > Noah G.
> >
> >
> > On Mon, Jun 20, 2022, at 07:37, Sorin Gheorghiu wrote:
> > > Hi,
> > >
> > > could it be related to the file permissions for fuseki.pid? It
> defaults
> > > first available of /var/run, /usr/var/run, and /tmp if not set.
> > >
> > > Cheers,
> > > Sorin
> > >
> > >
> > > 

Re: Semantics of SERVICE w.r.t. slicing

2022-06-03 Thread Adrian Walker
unsubscribe me please.

On Fri, Jun 3, 2022 at 10:30 AM Andy Seaborne  wrote:

> Probably a bug then.
>
> Are you going to be making improvements to query
> tranformation/optimization as part of your work on the enhanced SERVICE
> handling on the active PR?
>
>  Andy
>
> On 03/06/2022 10:39, Claus Stadler wrote:
> > Hi again,
> >
> >
> > I think the point was missed; what I was actually after is that in the
> > following query a "join" is optimized into a "sequence"
> >
> > and I wonder whether this is the correct behavior if a LIMIT/OFFSET is
> > present.
> >
> > So running the following query with optimize enabled/disabled gives
> > different results:
> >
> > SELECT * {
> >SERVICE  { SELECT * { ?s a
> >  } LIMIT 5 }
> >SERVICE  { SELECT * { ?s
> >  ?x } LIMIT 1 }
> > }
> >
> >
> > ➜  bin ./arq --query service-query.rq
> >
> >(sequence !
> >
> >  (service 
> >(slice _ 5
> >  (bgp (triple ?s
> > 
> > 
> >  (service 
> >(slice _ 1
> >  (bgp (triple ?s 
> > ?x)
> >
> >
> ---
>
> >
> > | s   |
> > x |
> >
> ===
>
> >
> > |    | "Aarti
> > Mukherjee"@en  |
> > | | "Abatte
> > Barihun"@en   |
> > | | "Abby
> > Abadi"@en   |
> > |  | "Abd al
> > Malik"@de |
> > |   | "Abdul Wahid
> > Khan"@en |
> >
> ---
>
> >
> >
> >
> > ./arq --explain --optimize=no --query service-query.rq
> >(join !
> >  (service 
> >(slice _ 5
> >  (bgp (triple ?s
> > 
> > 
> >  (service 
> >(slice _ 1
> >  (bgp (triple ?s 
> > ?x)
> > -
> > | s | x |
> > =
> > -
> >
> >
> > Cheers,
> >
> > Claus
> >
> >
> > On 03.06.22 10:22, Andy Seaborne wrote:
> >>
> >>
> >> On 02/06/2022 21:19, Claus Stadler wrote:
> >>> Hi,
> >>>
> >>> I noticed some interesting results when using SERVICE with a sub
> >>> query with a slice (limit / offset).
> >>>
> >>>
> >>> Preliminary Remark:
> >>>
> >>> Because SPARQL semantics is bottom up, a query such as the following
> >>> will not yield bindings for ?x:
> >>>
> >>> SELECT * {
> >>>SERVICE  { SELECT * { ?s a
> >>>  } LIMIT 5 }
> >>>SERVICE  { BIND(?s AS ?x) }
> >>> }
> >>
> >> The query plan for that is:
> >>
> >> (join
> >>   (service 
> >> (slice _ 5
> >>   (bgp (triple ?s
> >> 
> >> 
> >>   (service 
> >> (extend ((?x ?s))
> >>   (table unit
> >>
> >> which has not had any optimization applied.  ARQ checks scopes before
> >> doing any transfomation.
> >>
> >> Change BIND(?s AS ?x) to BIND(?s1 AS ?x)
> >>
> >> and it will have (join) replaced by (sequence)
> >>
> >> ---
> >> | s   | x |
> >> ===
> >> |    |   |
> >> | |   |
> >> | |   |
> >> |  |   |
> >> |   |   |
> >> ---
> >>
> >> LIMIT 1 is a no-op - the second SERVICE always evals to one row of no
> >> columns. Which makes the second SERVICE the join identity and the
> >> result is the first SERVICE.
> >>
> >> Column ?x is only in the display because it is in "SELECT *"
> >>
> >>> Query engines, such as Jena, attempt to optimize execution. For
> >>> instance, in the following query,
> >>>
> >>> instead of retrieving all labels, jena uses each binding for a
> >>> Musical Artist to perform a lookup at the servic

Re: Ontology

2021-08-19 Thread Adrian Walker
Matt,

This may be useful. The Executable English system is online at the site
below.

The basic idea is to capture knowledge in an English form that can also be
run as a program. When necessary, SQL is automatically generated and run
"under the covers".  Then, the results are explained in English, at the
human level.

Here's a summary slide:
www.executable-english.com/executable_english_in_a_nutshell.pdf

and a short paper

https://www.executable-english.com/Analytics,_Executable_English,_Data,_and_Explanations.pdf

Thanks for comments, -- Adrian

Adrian Walker
Executable English LLC
San Jose, CA, USA
860 830 2085
https://www.executable-english.com

On Thu, Aug 19, 2021 at 12:30 PM Matt Whitby  wrote:

> This will be off-topic but I believe you're the best group of people to ask
> this to. We need to look at our various datasets and start to put together
> an ontology. Does anyone have any suggestions on books to read, videos to
> watch, or any general advice or pitfalls to avoid?
>
> Thanks,
> Matt.
>


Re: Reasoning demo ideas?

2020-10-17 Thread Adrian Walker
Hi Danny,

The system online at the site below has a very simple author-user interface
front ending a reasoner that assigns a highly declarative meaning to
rules.  It also provides English explanations of results.

All your students need is a browser to run the examples provided, and to
write and run their own examples.

Sheared use is free, there are no ads, and we don't sell your data.

Apologies to folks who have seen this before, and thanks for comments,  --
Adrian

Adrian Walker
Executable English LLC
San Jose, CA, USA
(USA) 860 830 2085 (California time)
https://www.executable-english.com

On Sat, Oct 17, 2020 at 8:04 AM Danny Ayers  wrote:

> All being well I'll be doing a bit of teaching next month. Someone else has
> bagged publishing linked data, so I guess I'm on SPARQL &
> ontologies/reasoning. (With Fuseki in mind).
>
> Unfortunately I have very little experience with reasoners, only really
> poked around a bit, never needed in practice.
>
> Which has left me drawing a blank on demo ideas. Imagination deficit. I'd
> like something simple, but potentially useful.
>
> Suggestions?
>
> Also, I've not had a proper look at the Jena/Fuseki docs in a long while,
> not sure what reasoners have been implemented. Could you kindly save me
> trawling - what is available? (link fine).
>
> Cheers,
> Danny.
>


Re: Analyzing SPARQL Queries

2019-10-06 Thread Adrian Walker
Bart,
This might be useful --
www.executable-english.com/demo_agents/RDFQueryLangComparison1.agent

Cheers,  -- Adrian

Adrian Walker
Executable English LLC
San Jose, CA, USA
(USA) 860 830 2085 (California time)
www.executable-english.com

On Sun, Oct 6, 2019 at 6:13 PM Bart van Leeuwen 
wrote:

> Hi,
>
> I'm looking for some examples to analyze a sparql query e.g.
>
> select * where { ?s a ?t . ?s <http://example.com#b> ?x }
>
> I would like to be able to infer that ?t is rdf:class
>
> and that ?x is related to ?s by ex#b
>
> I've looked at Query.getQueryPattern() and the walker but couldn't find a
> nice example of how to do this.
>
> Met Vriendelijke Groet / With Kind Regards
> Bart van Leeuwen
>
>
> twitter: @semanticfire
> tel. +31(0)6-53182997
> Netage B.V.
> http://netage.nl
> Esdoornstraat 3
> 3461ER Linschoten
> The Netherlands
>


Re: Combining inferences from GRR and RDFS or OWL reasoner

2019-07-19 Thread Adrian Walker
Hi Pierre,

You may like to write your example in Executable English.  (The vocabulary
is open,
so you could also use phrases in French).

Executable English is a platform for cooperative writing of self-serve,
self-explaining analytics in open vocabulary English.  It's live online
with many examples.   You are cordially invited to write and run your own
examples too.  Just point your browser to executable-english.com  .  Shared
use is free, and there are no commercials.

Enjoy!  - Adrian

Adrian Walker
Executable English LLC
San Jose, CA, USA
(USA) 860 830 2085 (California time)
www.executable-english.com





On Fri, Jul 19, 2019 at 9:48 AM Pierre Grenon 
wrote:

> Hello,
>
> (I apologise for I am not sure if this has been addressed before and I
> have not found the right thread or documentation.)
>
> The configuration file below seems to allow reasoning with either a GRR or
> an out of the box reasoner on the same dataset.
>
> However, I don't think it allows combining inferences from both reasoners
> at the same time. I am not sure how to achieve this through configuration.
>
> (Happy to provide an example of data and rule for the GRR. I've noticed
> this when adding a rule to classify undeclared individuals, i.e.,
> individuals appearing in the subject position of a triple. The rule to the
> effect that if they do, they are instances of a class A. It is possible to
> derive the instantiation. However, it is not possible to combine it with
> type inheritance from a reasoner. If class A is a subclass of class B,
> there is no inference to the effect that the individual is also an instance
> of class B.)
>
> With many thanks and kind regards,
> Pierre
>
>
>
>
> -
>
>
> @prefix :  <http://base/#> .
> @prefix rdf:   <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
> @prefix tdb2:  <http://jena.apache.org/2016/tdb#> .
> @prefix ja:<http://jena.hpl.hp.com/2005/11/Assembler#> .
> @prefix rdfs:  <http://www.w3.org/2000/01/rdf-schema#> .
> @prefix fuseki: <http://jena.apache.org/fuseki#> .
>
> :theService a   fuseki:Service ;
> rdfs:label"Service with update and query to
> test minimal dataset with inference using an instance of generic rule
> reasoner and RDFSExptRuleReasoner" ;
> fuseki:dataset:theDataset ;
> #:tdb_dataset_readwrite ;
> fuseki:name   "Conference2" ;
> fuseki:serviceQuery   "query" , "sparql" ;
> fuseki:serviceReadGraphStore  "get" ;
> fuseki:serviceReadWriteGraphStore
> "data" ;
> fuseki:serviceUpdate  "update" ;
> fuseki:serviceUpload  "upload" .
>
> :theDataset a ja:RDFDataset ;
> ja:defaultGraph <#theUnionModel>
> .
>
> <#theUnionModel> a ja:UnionModel ;
> ja:rootModel <#theRootModel> ;
> ja:subModel <#theModel_GRR> , <#theModel_RDFS> .
>
> <#theRootModel> a ja:Model ;
> ja:baseModel <#theGraph> ;
> .
>
>
> <#theModel_GRR> a ja:InfModel ;
> ja:baseModel <#theGraph> ;
> ja:reasoner [
> ja:reasonerURL <
> http://jena.hpl.hp.com/2003/GenericRuleReasoner> ;
> ja:rulesFrom
> 
>
> ] ;
> .
>
> THIS E-MAIL MAY CONTAIN CONFIDENTIAL AND/OR PRIVILEGED INFORMATION.
> IF YOU ARE NOT THE INTENDED RECIPIENT (OR HAVE RECEIVED THIS E-MAIL
> IN ERROR) PLEASE NOTIFY THE SENDER IMMEDIATELY AND DESTROY THIS
> E-MAIL. ANY UNAUTHORISED COPYING, DISCLOSURE OR DISTRIBUTION OF THE
> MATERIAL IN THIS E-MAIL IS STRICTLY FORBIDDEN.
>
> IN ACCORDANCE WITH MIFID II RULES ON INDUCEMENTS, THE FIRM'S EMPLOYEES
> MAY ATTEND CORPORATE ACCESS EVENTS (DEFINED IN THE FCA HANDBOOK AS
> "THE SERVICE OF ARRANGING OR BRINGING ABOUT CONTACT BETWEEN AN INVESTMENT
> MANAGER AND AN ISSUER OR POTENTIAL ISSUER"). DURING SUCH MEETINGS, THE
> FIRM'S EMPLOYEES MAY ON NO ACCOUNT BE IN RECEIPT OF INSIDE INFORMATION
> (AS DESCRIBED IN ARTICLE 7 OF THE MARKET ABUSE REGULATION (EU) NO
> 596/2014).
> (https://www.handbook.fca.org.uk/handbook/glossary/G3532m.html)
> COMPANIES WHO DISCLOSE INSIDE INFORMATION ARE IN BREACH OF REGULATION
> AND MUST IMMEDIATELY AND CLEARLY NOTIFY ALL ATTENDEES. FOR INFORMATION
> ON THE FIRM'S POLICY IN RELATION TO ITS PARTICIPATION IN MARKET SOUNDINGS,
> PLEASE SEE https://www.horizon-asset.co.uk/market-soundings/.
>
> HORIZON ASSET LLP IS AUTHORISED AND REGULATED
> BY THE FINANCIAL CONDUCT AUTHORITY.
>
>
>


Re: [GenericRuleReasoner] inner workings

2019-03-13 Thread Adrian Walker
Hi All,

Correcting a link  This one

www.executable-english.com/demo_agents/RDFQu eryLangComparison1.agent
<http://www.executable-english.com/demo_agents/RDFQueryLangComparison1.agent>

should of course be

www.executable-english.com/demo_agents/RDFQueryLangComparison1.agent

Based on comments so far, this one may also be useful

www.executable-english.com/A_Wiki_for_Business_Rules_in_Open_Vocabulary_Executable_English.pdf

   Cheers, -- Adrian

On Wed, Mar 13, 2019 at 11:50 AM Adrian Walker 
wrote:

> Hi Lorenz &All,
>
> *Marco*'s original question was
>
>
> *what's your current recommendation for a superior third party rules
> reasoner that works efficiently with the jena tooling? free & commercial
> option welcome *
> Lorenz B. wrote:
>
>
> *The code  [1] just indicates to use some online service - so a user has
> to register and, as far as I can see, has to pay US $100 per month. And you
> need the data as SQL database? Or can it process RDF directly?*
>
> Actually, the user does not have to register with the reasoner endpoint,
> either from a Java client, or from a browser in shared mode.  Registration
> is
> only for a more private way of using the system.
>
> Small examples run without the need for for a SQL database.  For larger
> examples the
> system  automatically generates and runs SQL queries "under the covers".
> The SQL generator could in principle be modified to emit SPARQL queries.
>
> Here's a simple example of querying RDF [2].
>
>HTH,  -- Adrian
>
>
> [1]  www.executable-english.com/iblClient1.java
> <http://www.executable-english.com/iblClient1.java>
>
> [2]  www.executable-english.com/demo_agents/RDFQu eryLangComparison1.agent
>
> <http://www.executable-english.com/demo_agents/RDFQueryLangComparison1.agent>
>
>
>
> On Wed, Mar 13, 2019 at 1:39 AM Lorenz B. <
> buehm...@informatik.uni-leipzig.de> wrote:
>
>> I don't see how this link to some code example to some whatever online
>> service answers his question...can you explain this please a bit more?
>>
>> I mean, if I understood correctly, Marco was asking for some rule engine
>> that can be combined with Apache Jena. So, I'd expect something like
>> Drools engine with a Jena adapter or the like. And ideally I guess a
>> standalone, open source, free to use tool.
>>
>> I read through your research paper but couldn't figure out what the
>> underlying rule engine is based on nor could I see any benchmarks w.r.t.
>> performance.
>> Moreover, the code just indicates to use some online service - so a user
>> has to register and, as far as I can see, has to pay US $100 per month.
>> And you need the data as SQL database? Or can it process RDF directly?
>>
>> Sorry for my questions, it's just because I've never heard about this
>> tool before. And I'm a bit confused how it works on RDF data.
>>
>>
>> > Marco,
>> >
>> > This might be of interest:
>> >
>> >www.executable-english.com/iblClient1.java
>> >
>> > HTH,   -- Adrian
>> >
>> > On Tue, Mar 12, 2019 at 3:18 PM Marco Neumann 
>> > wrote:
>> >
>> >> so what's your current recommendation for a superior third party rules
>> >> reasoner that works efficiently with the jena tooling? free &
>> commercial
>> >> option welcome
>> >>
>> >> Marco
>> >>
>> >>
>> >>
>> >> On Mon 14. Jan 2019 at 19:16, Dave Reynolds > >
>> >> wrote:
>> >>
>> >>> Hi Barry,
>> >>>
>> >>> [Agreed that dev is probably the better place to discuss this.]
>> >>>
>> >>> The two engines in jena are indeed loosely styled on RETE and on
>> tabled
>> >>> datalog. However, I wouldn't claim they were particularly complete or
>> >>> good implementations of either. So while looking at some of the source
>> >>> literature that inspired them might be helpful don't expect very much
>> of
>> >>> what's covered in the literature to be present in the code.
>> >>>
>> >>> For RETE then the wikipedia article [1] is a good summary and source
>> of
>> >>> starting references. I had a copy of the original Forgy paper [1](ref
>> >>> 1), among others,when I was doing the work. There has been a *lot* of
>> >>> work on improvements to RETE since the 80s 

Re: [GenericRuleReasoner] inner workings

2019-03-13 Thread Adrian Walker
Hi Lorenz &All,

*Marco*'s original question was


*what's your current recommendation for a superior third party rules
reasoner that works efficiently with the jena tooling? free & commercial
option welcome *
Lorenz B. wrote:


*The code  [1] just indicates to use some online service - so a user has to
register and, as far as I can see, has to pay US $100 per month. And you
need the data as SQL database? Or can it process RDF directly?*

Actually, the user does not have to register with the reasoner endpoint,
either from a Java client, or from a browser in shared mode.  Registration
is
only for a more private way of using the system.

Small examples run without the need for for a SQL database.  For larger
examples the
system  automatically generates and runs SQL queries "under the covers".
The SQL generator could in principle be modified to emit SPARQL queries.

Here's a simple example of querying RDF [2].

   HTH,  -- Adrian


[1]  www.executable-english.com/iblClient1.java


[2]  www.executable-english.com/demo_agents/RDFQu eryLangComparison1.agent




On Wed, Mar 13, 2019 at 1:39 AM Lorenz B. <
buehm...@informatik.uni-leipzig.de> wrote:

> I don't see how this link to some code example to some whatever online
> service answers his question...can you explain this please a bit more?
>
> I mean, if I understood correctly, Marco was asking for some rule engine
> that can be combined with Apache Jena. So, I'd expect something like
> Drools engine with a Jena adapter or the like. And ideally I guess a
> standalone, open source, free to use tool.
>
> I read through your research paper but couldn't figure out what the
> underlying rule engine is based on nor could I see any benchmarks w.r.t.
> performance.
> Moreover, the code just indicates to use some online service - so a user
> has to register and, as far as I can see, has to pay US $100 per month.
> And you need the data as SQL database? Or can it process RDF directly?
>
> Sorry for my questions, it's just because I've never heard about this
> tool before. And I'm a bit confused how it works on RDF data.
>
>
> > Marco,
> >
> > This might be of interest:
> >
> >www.executable-english.com/iblClient1.java
> >
> > HTH,   -- Adrian
> >
> > On Tue, Mar 12, 2019 at 3:18 PM Marco Neumann 
> > wrote:
> >
> >> so what's your current recommendation for a superior third party rules
> >> reasoner that works efficiently with the jena tooling? free & commercial
> >> option welcome
> >>
> >> Marco
> >>
> >>
> >>
> >> On Mon 14. Jan 2019 at 19:16, Dave Reynolds 
> >> wrote:
> >>
> >>> Hi Barry,
> >>>
> >>> [Agreed that dev is probably the better place to discuss this.]
> >>>
> >>> The two engines in jena are indeed loosely styled on RETE and on tabled
> >>> datalog. However, I wouldn't claim they were particularly complete or
> >>> good implementations of either. So while looking at some of the source
> >>> literature that inspired them might be helpful don't expect very much
> of
> >>> what's covered in the literature to be present in the code.
> >>>
> >>> For RETE then the wikipedia article [1] is a good summary and source of
> >>> starting references. I had a copy of the original Forgy paper [1](ref
> >>> 1), among others,when I was doing the work. There has been a *lot* of
> >>> work on improvements to RETE since the 80s and while there were times
> >>> when we might have done a new forward engine using more modern
> >>> techniques it never happened.
> >>>
> >>> For the backward engine the approach is a variant of SLG-WAM as used
> for
> >>> XSB but highly highly simplified since we can't express general tuples
> >>> or recursive data structures within jena's triples. A few google
> >>> searches haven't turned up the exact paper that originally inspired the
> >>> approach. The closest I've found are [2] and [3], which probably cover
> >>> the same ground.
> >>>
> >>> Let me reinforce that the Jena engines are really simplified. They were
> >>> enough to get the job done at the time (over a decade ago now) and have
> >>> proved useful for some people since but I wouldn't want to defend any
> of
> >>> the implementation choices.
> >>>
> >>> Dave
> >>>
> >>> [1] https://en.wikipedia.org/wiki/Rete_algorithm
> >>> [2]
> >>>
> >>>
> >>
> https://pdfs.semanticscholar.org/2078/96964ee85f983cd861a4f8c5dff0bfc9f03e.pdf
> >>> [3]
> >>>
> >>>
> >>
> https://pdfs.semanticscholar.org/6c6d/26e8fe1b755140ffcb57025b021a046b2a3b.pdf
> >>> On 14/01/2019 16:33, ajs6f wrote:
>  I have no useful general information about the reasoning framework,
> but
> >>> I am copying this over to dev@. Discussions of how to extend Jena
> >>> definitely have a place there.
>  ajs6f
> 
> > On Jan 14, 2019, at 6:40 AM, Nouwt, B. (Barry)
> >>>  wrote:
> > Hi all, I want to investigate the inner workings of 

Re: [GenericRuleReasoner] inner workings

2019-03-12 Thread Adrian Walker
Marco,

This might be of interest:

   www.executable-english.com/iblClient1.java

HTH,   -- Adrian

On Tue, Mar 12, 2019 at 3:18 PM Marco Neumann 
wrote:

> so what's your current recommendation for a superior third party rules
> reasoner that works efficiently with the jena tooling? free & commercial
> option welcome
>
> Marco
>
>
>
> On Mon 14. Jan 2019 at 19:16, Dave Reynolds 
> wrote:
>
> > Hi Barry,
> >
> > [Agreed that dev is probably the better place to discuss this.]
> >
> > The two engines in jena are indeed loosely styled on RETE and on tabled
> > datalog. However, I wouldn't claim they were particularly complete or
> > good implementations of either. So while looking at some of the source
> > literature that inspired them might be helpful don't expect very much of
> > what's covered in the literature to be present in the code.
> >
> > For RETE then the wikipedia article [1] is a good summary and source of
> > starting references. I had a copy of the original Forgy paper [1](ref
> > 1), among others,when I was doing the work. There has been a *lot* of
> > work on improvements to RETE since the 80s and while there were times
> > when we might have done a new forward engine using more modern
> > techniques it never happened.
> >
> > For the backward engine the approach is a variant of SLG-WAM as used for
> > XSB but highly highly simplified since we can't express general tuples
> > or recursive data structures within jena's triples. A few google
> > searches haven't turned up the exact paper that originally inspired the
> > approach. The closest I've found are [2] and [3], which probably cover
> > the same ground.
> >
> > Let me reinforce that the Jena engines are really simplified. They were
> > enough to get the job done at the time (over a decade ago now) and have
> > proved useful for some people since but I wouldn't want to defend any of
> > the implementation choices.
> >
> > Dave
> >
> > [1] https://en.wikipedia.org/wiki/Rete_algorithm
> > [2]
> >
> >
> https://pdfs.semanticscholar.org/2078/96964ee85f983cd861a4f8c5dff0bfc9f03e.pdf
> > [3]
> >
> >
> https://pdfs.semanticscholar.org/6c6d/26e8fe1b755140ffcb57025b021a046b2a3b.pdf
> >
> > On 14/01/2019 16:33, ajs6f wrote:
> > > I have no useful general information about the reasoning framework, but
> > I am copying this over to dev@. Discussions of how to extend Jena
> > definitely have a place there.
> > >
> > > ajs6f
> > >
> > >> On Jan 14, 2019, at 6:40 AM, Nouwt, B. (Barry)
> >  wrote:
> > >>
> > >> Hi all, I want to investigate the inner workings of the
> > GenericRuleReasoner (with the purpose of extending it in the future). In
> > Jena's documentation I read:
> > >>
> > >> "Jena includes a general purpose rule-based reasoner which is used to
> > implement both the RDFS and OWL reasoners but is also available for
> general
> > use. This reasoner supports rule-based inference over RDF graphs and
> > provides forward chaining, backward chaining and a hybrid execution
> model.
> > To be more exact, there are two internal rule engines one forward
> chaining
> > RETE engine and one tabled datalog engine - they can be run separately or
> > the forward engine can be used to prime the backward engine which in turn
> > will be used to answer queries."
> > >> source: https://jena.apache.org/documentation/inference/#rules
> > >>
> > >> Apart from Jena's documentation, Jena's mailing lists and its source
> > code, are there any resources that can better help me grasp what is
> > happening inside the generic rule reasoner? For example, the text above
> > mentions the forward chaining RETE engine and the tabled datalog engine,
> > are there any scientific papers that I might read to better understand
> > their inner workings?
> > >>
> > >> Maybe this question is better suited for the d...@jena.apache.org
> > ?
> > >>
> > >> Regards, Barry
> > >> This message may contain information that is not intended for you. If
> > you are not the addressee or if this message was sent to you by mistake,
> > you are requested to inform the sender and delete the message. TNO
> accepts
> > no liability for the content of this e-mail, for the manner in which you
> > use it and for damage of any kind resulting from the risks inherent to
> the
> > electronic transmission of messages.
> > >
> >
> --
>
>
> ---
> Marco Neumann
> KONA
>


Re: SPIN support

2017-09-04 Thread Adrian Walker
Hi Holger

I think your note was intended for Adrian Gschwend [spelling?], not me.

HTH.

Adrian Walker
Reengineering LLC
San Jose, CA, USA
860 830 2085
www.executable-english.com


On Mon, Sep 4, 2017 at 3:07 PM, Holger Knublauch 
wrote:

> Hi Adrian,
>
> out of interest: which features of SPIN would be of interest, and which of
> these are not covered by SHACL?
>
> See also http://spinrdf.org/spin-shacl.html
>
> Holger
>
>
> On 5/09/2017 4:19, Adrian Gschwend wrote:
>
>> On 30.12.16 17:24, Andy Seaborne wrote:
>>
>> Hi Andy,
>>
>> For integration with Fuseki there are a couple of things needed:
>>>
>> it's a while ago, did you make any progress on SPIN API support in
>> Fuseki? Some stuff in SPIN would be useful.
>>
>> regards
>>
>> Adrina
>>
>
>


Re: Fuseki support other query languages

2017-03-04 Thread Adrian Walker
HI All,

Here's a little case study in going from a spec to a SPARQL query, and
separately to SQL.

HTH,  -- Adrian

Adrian Walker
Reengineering LLC
San Jose, CA, USA
860 830 2085
www.executable-english.com


-SPECIFICATION-

I have a graph where resources have a number of controlled properties.
Call them A thorough F.  Some resources may have one property other may
have all 6.

I have a resource with a with properties A, B, and C.

I want to find all resources in the graph where the resource has matching
values but does not have any non specified properties.

So
x with A, B, and C will match
y with A and C will match
z with A, B, C and D will not match
w with A and D will not match.

Any idea how to construct a query that will do this?




- SPARQL QUERY-

Okay, let me try. I think I've done something similar actually - and ran
into performance problems with those queries using the latest Jena
releases. But that's a different story...

SELECT ?r
WHERE {
  # we have a specific resource for which we are looking for matches
  BIND(:inputresource AS ?a)

  # the input resource has one or more properties
  ?a :p ?val .
  # the matching resource should have at least one of those properties
  ?r :p ?val .

  # but the targeted resource shouldn't have any property that the input
resource doesn't have
  FILTER NOT EXISTS {
?r :p ?val2 .
FILTER NOT EXISTS {
  ?a :p ?val2 .
}
  }
}

I think one or both of the FILTER NOT EXISTS may be changed to a MINUS as
well.




-EXECUTABLE ENGLISH --> SQL--

some-resource has the property some-property
not : that-resource has a non-matching property
--
that-resource having that-property matches


some-resource has the property some-property
that-resource has a non-matching property
---
that-resource having that-property does not match


some-resource has the property some-property
that-property is a non matching one
---
that-resource has a non-matching property


this-resource has the property this-property
=
  x   A
  x   B
  x   C
  y   A
  y   C
  z   A
  z   B
  z   C
  z   D
  w   A
  w   D


this-property is a non matching one
===
  D

Here is  SQL _generated_ from the above.

select  tt1.RES , tt1.PROP from
  mysql.matchT1 tt1 where tt1.RES not in
   (select tt2.RES from mysql.matchT1 tt2 , mysql.matchT2
 where mysql.matchT2.PROP = tt2.PROP and tt1.RES = tt2.RES )





On Sat, Mar 4, 2017 at 7:32 AM, Martynas Jusevičius 
wrote:

> > My goal is simply to learn more about graph databases, so I want to
> install and use one. I've installed Fuseki, but I found SPARQL to be overly
> complex compared to other query languages.
>
> It's a little like wanting to use RDBMS but finding SQL overly
> complex. Sure, there is probably some query approach, but you will
> constantly face challenges to try to get it to work. Same for XML and
> XPath, etc.
>
> SPARQL is an industry standard, deal with it. Trying to avoid it will
> lead to a more complex setup than trying to learn and use it. And no
> way it's more complex than SQL.
>


Re: SPARQL query

2017-03-01 Thread Adrian Walker
Hi All,

Here is what Claude's example looks like in executable English.





































*some-resource has the property some-propertynot : that-resource has a
non-matching
property--that-resource
having that-property matchessome-resource has the property
some-propertythat-resource has a non-matching
property--that-resource
having that-property does not matchsome-resource has the property
some-propertythat-property is a non matching
one---that-resource
has a non-matching propertythis-resource has the property
this-property==
x   A  x   B
x   C  y   A
y   C  z   A
z   B  z   C
z   D  w   A
w   Dthis-property is a non matching
one===  D*
and here is  SQL generated from the above.




*select  tt1.RES , tt1.PROP from   mysql.matchT1 tt1 where tt1.RES not in
   (select tt2.RES from mysql.matchT1 tt2 , mysql.matchT2  where
mysql.matchT2.PROP = tt2.PROP and tt1.RES = tt2.RES )*

Presumably,SPARQL could be similar.

HTH,  - Adrian

Adrian Walker
Reengineering LLC
San Jose, CA, USA
860 830 2085
www.executable-english.com


On Wed, Mar 1, 2017 at 2:02 PM, Paul Tyson  wrote:

> Maybe something like:
>
> Select ?s ?p ?o
> Where {
> ?s ?p ?o.
> Filter (?p in (:A, :B, :C))
> Minus {?s ?p2 ?o2.
> Filter (!(?p2 in (:A, :B, :C)))}
>
> Untested.
>
> Regards,
> --Paul
>
> > On Mar 1, 2017, at 14:12, Claude Warren  wrote:
> >
> > I have a graph where resources have a number of controlled properties.
> > Call them A thorough F.  Some resources may have one property other may
> > have all 6.
> >
> > I have a resource with a with properties A, B, and C.
> >
> > I want to find all resources in the graph where the resource has matching
> > values but does not have any non specified properties.
> >
> > So
> > x with A, B, and C will match
> > y with A and C will match
> > z with A, B, C and D will not match
> > w with A and D will not match.
> >
> > Any idea how to construct a query that will do this?
> >
> > It seems backwards to the way I normally think about queries.
> >
> > Any help would be appreciated,
> > Claude
> >
> >
> >
> >
> > --
> > I like: Like Like - The likeliest place on the web
> > <http://like-like.xenei.com>
> > LinkedIn: http://www.linkedin.com/in/claudewarren
>


Re: Benefits of Semantic web

2017-02-13 Thread Adrian Walker
Baran,

You wrote: *There is really a lot of work to do making your idea
transparent for a normal user as i, would i say...*

Can you be more specific please?  Details appreciated.

BTW, we made some changes to the user interface over the weekend.

  -- Adrian

Adrian Walker
Reengineering LLC
San Jose, CA, USA
860 830 2085
www.executable-english.com








On Mon, Feb 13, 2017 at 8:28 AM,  wrote:

> Adrian,
>
> *Is it a possible scenario to think a Semantic Web environment controlled
>> only by rules?*
>> Yes.  Executable English is rules-only on the surface.  Internally, it
>> automatically generates and runs networked SQL.
>>
>> Here's an example:
>> www.executable-english.com/Oil_Industry_Supply_Chain_by_Kowa
>> lski_and_Walker.pdf
>>
>
> I think, your 'Executable English' devolopement idea doesn't involve a
> 'Semantic Web environment', but ofcourse with rules it can support running
> 'a networked SQL'.
>
> In www.executable-english.com/Oil_Industry_Supply_Chain_by_Kowa
> lski_and_Walker.pdf i cannot see, when it was published??? This a bit
> important for investing time reading it. I see in this document again the
> link
>
> http://www.executable-english.com
>
> I think, its mean content is not yet in a state of publishing for the
> world as i already wrote in my previous posting. There is really a lot of
> work todo making your idea transparent for a normal user as i, would i
> say...
>
> baran
>
> 
>
>
>
>> Adrian Walker
>> Reengineering LLC
>> San Jose, CA, USA
>> 860 830 2085
>> www.executable-english.com
>>
>>
>> On Sun, Feb 12, 2017 at 6:41 AM,  wrote:
>>
>> Hello,
>>>
>>> I still need some explanation. What is the advantage of using ontology in
>>>
>>>> our semantic web application. Its just that we can share it?
>>>>
>>>> Second, what is the advantage of Jena rules? A task completed with an
>>>> RDF
>>>> API and same task with Jena rules, why people prefer rules?
>>>>
>>>>
>>> i think, kumar's both questions together make sense. Ontologies + Rules
>>> make the whole thing really very complex.
>>>
>>> My question: Is it a possible scenario to think a Semantic Web
>>> environment
>>> controlled only by rules?
>>>
>>> thanks, baran
>>>
>>> **
>>>
>>>
>>>
>>>
>>> Thanks.
>>>>
>>>> On Sun, Feb 12, 2017 at 11:28 AM,  wrote:
>>>>
>>>>
>>>> Adrian, i think this is a rather old and not yet fully developed
>>>>> application with a UI needing a bit freshing up for smoothly working,
>>>>> databases are (I tried with commodities1/2) also old and rather small.
>>>>> Is
>>>>> gold no commodity? if i put a question with an agent the effect is only
>>>>> reordering the list of general questions. My suggestion is: Let at
>>>>> first
>>>>> as
>>>>> input for an agent not only questions but also the option of a single
>>>>> item
>>>>> and then give a list of possible questions the agent can answer exactly
>>>>> for
>>>>> this item. May be i couldn't get everything so how it is meant...
>>>>>
>>>>> But the idea as whole has some original aspects, that was really what i
>>>>> meant: Trying away from heavy classical view of SPARQL databases
>>>>> connected
>>>>> to certain ontologies with a lot of small surprising error effects in
>>>>> developement, so that people ask: Why dont you make a simple SQL
>>>>> database,
>>>>> you talk then about Semantic Web, Linked Data basing on triples and
>>>>> URI's
>>>>> and of course about public endpoints. Then comes the question: 'public'
>>>>> endpoints with this performance where SPARQL only an adapted SQL for
>>>>> triples is? etc...
>>>>>
>>>>> I think you could next fresh up your concept if you have time for it,
>>>>> the
>>>>> other question is how it would react under heavy usage... This is my
>>>>> comment after 20 minutes, sorry that i had not much more time...
>>>>>
>>>>> **
>>>>>
>>>>>
>>>>> On Sun, 12 Feb 2017 07:05:54 +0100, Adrian Walker <
>>&g

Re: Benefits of Semantic web

2017-02-12 Thread Adrian Walker
Baran,

Thanks for your comments on executable-english.com.

You wrote:
*Is it a possible scenario to think a Semantic Web environment controlled
only by rules?*
Yes.  Executable English is rules-only on the surface.  Internally, it
automatically generates and runs networked SQL.

Here's an example:
www.executable-english.com/Oil_Industry_Supply_Chain_by_Kowalski_and_Walker.pdf

-- Adrian

Adrian Walker
Reengineering LLC
San Jose, CA, USA
860 830 2085
www.executable-english.com


On Sun, Feb 12, 2017 at 6:41 AM,  wrote:

> Hello,
>
> I still need some explanation. What is the advantage of using ontology in
>> our semantic web application. Its just that we can share it?
>>
>> Second, what is the advantage of Jena rules? A task completed with an RDF
>> API and same task with Jena rules, why people prefer rules?
>>
>
> i think, kumar's both questions together make sense. Ontologies + Rules
> make the whole thing really very complex.
>
> My question: Is it a possible scenario to think a Semantic Web environment
> controlled only by rules?
>
> thanks, baran
>
> **
>
>
>
>
>> Thanks.
>>
>> On Sun, Feb 12, 2017 at 11:28 AM,  wrote:
>>
>>
>>> Adrian, i think this is a rather old and not yet fully developed
>>> application with a UI needing a bit freshing up for smoothly working,
>>> databases are (I tried with commodities1/2) also old and rather small. Is
>>> gold no commodity? if i put a question with an agent the effect is only
>>> reordering the list of general questions. My suggestion is: Let at first
>>> as
>>> input for an agent not only questions but also the option of a single
>>> item
>>> and then give a list of possible questions the agent can answer exactly
>>> for
>>> this item. May be i couldn't get everything so how it is meant...
>>>
>>> But the idea as whole has some original aspects, that was really what i
>>> meant: Trying away from heavy classical view of SPARQL databases
>>> connected
>>> to certain ontologies with a lot of small surprising error effects in
>>> developement, so that people ask: Why dont you make a simple SQL
>>> database,
>>> you talk then about Semantic Web, Linked Data basing on triples and URI's
>>> and of course about public endpoints. Then comes the question: 'public'
>>> endpoints with this performance where SPARQL only an adapted SQL for
>>> triples is? etc...
>>>
>>> I think you could next fresh up your concept if you have time for it, the
>>> other question is how it would react under heavy usage... This is my
>>> comment after 20 minutes, sorry that i had not much more time...
>>>
>>> **
>>>
>>>
>>> On Sun, 12 Feb 2017 07:05:54 +0100, Adrian Walker <
>>> adriandwal...@gmail.com>
>>> wrote:
>>>
>>> Baran,
>>>
>>>>
>>>> You wrote:
>>>> *This means downsizing the whole thing to a simplified kernel for a
>>>> special
>>>> application field.*
>>>> Here's a simplified kernel that arguably covers wider version of
>>>> application semantics than the usual "semantic web"  tools.
>>>>
>>>> Here's a summary slide:
>>>>
>>>> www.executable-english.com/internet_business_logic_in_a_nuts
>>>> hell.pdf
>>>>
>>>> The system that supports this is live, online at
>>>> www.executable-english.com.
>>>>
>>>>
>>>> Shared use is free, and there are no advertisements.  Nothing to
>>>> download,
>>>> just point a browser to the site.
>>>>
>>>> Thanks for comments,-- Adrian
>>>>
>>>> Adrian Walker
>>>> Reengineering LLC
>>>> San Jose, CA, USA
>>>> 860 830 2085
>>>>
>>>>
>>>>
>>>> On Sat, Feb 11, 2017 at 4:33 AM,  wrote:
>>>>
>>>> Hello,
>>>>
>>>>>
>>>>> On Fri, 10 Feb 2017 18:02:46 +0100, David Jordan <
>>>>> jdavidjorda...@gmail.com>
>>>>> wrote:
>>>>>
>>>>> I agree that have some discussion about this is very useful. Many of us
>>>>>
>>>>> have tried to evangelize semantic web technologies in our organizations
>>>>>> and > have struggled and failed because we cannot provide sufficient
&

Re: Benefits of Semantic web

2017-02-11 Thread Adrian Walker
Baran,

You wrote:
*This means downsizing the whole thing to a simplified kernel for a special
application field.*
Here's a simplified kernel that arguably covers wider version of
application semantics than the usual "semantic web"  tools.

Here's a summary slide:

www.executable-english.com/internet_business_logic_in_a_nutshell.pdf

The system that supports this is live, online at www.executable-english.com.


Shared use is free, and there are no advertisements.  Nothing to download,
just point a browser to the site.

Thanks for comments,    -- Adrian

Adrian Walker
Reengineering LLC
San Jose, CA, USA
860 830 2085



On Sat, Feb 11, 2017 at 4:33 AM,  wrote:

> Hello,
>
> On Fri, 10 Feb 2017 18:02:46 +0100, David Jordan 
> wrote:
>
> I agree that have some discussion about this is very useful. Many of us
>> have tried to evangelize semantic web technologies in our organizations
>> and > have struggled and failed because we cannot provide sufficient
>> justification for using the technology. Hearing the specific value
>> provided that can convince the skeptics is extremely valuable, much more
>> valuable
>> than simple support questions about a particular API interface.
>>
>
>
> yes, i thing similar things, also like others responding to this thread in
> an open minded way...
>
> But i also want to describe something for the future:
>
> I imagine, a cheekily developer constructs a small, easily understandable
> and effectively implementable  'subset' of the whole thing 'Semantic Web'
> defining a new playing field or making great progress in usual apps of
> today.
>
> This cold be the realisation of TBL cit. (about 20 years ago?): 'The most
> exciting things about Semantic Web is not what we can imagine to do with
> it, but we can't yet imagine it will do.'
>
> First step is always a very simple and comprehensible idea.. This means
> downsizing the whole thing to a simplified kernel for a special application
> field... Better late than never...
>
> This is really what i instinctively think about this stuff after so many
> years. I know, such things are totally off topic for Jena team, but my
> posting is for 2 or 3 users who can be interested, if it is allowed...
>
> thanks, baran.
>
> 
>
>
>
> On 10/02/17 12:22, kumar rohit wrote:
>>>
>>> Hi, what are the benefits of semantic web technologies? I have used
>>>> semantic web technologies from one year but, in theory I am not sure the
>>>> real advantages of semantic web.
>>>> When we develop a system using traditional RDBMS and Java and same
>>>> system
>>>> we develop using Java/Jena Protege SPARQL etc, so what is the advantage
>>>> of
>>>> the latter application?
>>>>
>>>>
>>>>
>
> --
> Using Opera's mail client: http://www.opera.com/mail/
>


Re: [EXTERNAL] RE: Adding priorities to Jena rules?

2016-10-05 Thread Adrian Walker
David,

You wrote: *Rules ease-of-authoring is a big requirement for us.*

*Procedural *rules systems have been around since the 1990s at least, and
their drawbacks are indeed well known.

It's now feasible to interpret rules in a strongly *declarative *way, such
that the consequences you can draw from a set of rules are the same,
independent of the order in which they are written down.  There is no
longer any need to 'game' the execution order to get the right results.

Here are a couple of examples.

www.executable-english.com/demo_agents/ProcessSpecificationLanguage1.agent
www.executable-english.com/demo_agents/GrowthAndDebt1.agent

These and other examples are online at the site below, where you can
view, run, and change them using a browser.  You are most welcome to
write and run your own examples too.

HTH,  -- Adrian

Adrian Walker
Reengineering LLC
San Jose, CA, USA
860 830 2085
www.executable-english.com









On Wed, Oct 5, 2016 at 6:34 PM, David Martin 
wrote:

> Regarding this particular question from my initial message:
>
> > Any thoughts from anyone about what would be involved in modifying the
> Jena code base to support this?
>
> It looks like what I'm asking for would be reasonably easy.  It looks like
> the high-level steps would be:
>
>  * Modify the rule representation to store a numeric priority
>  * Define a rule syntax modification for how to state a numeric priority
>  * Modify the rule parser to parse out the numeric priority and put it
>into the rule representation
>  * In RETEConflictSet, write a new method to choose a rule to fire
>based on these priorities.  The place to call that method (hopefully
>the only place needed) would be in RETEConflictSet.fireOne.
>
> So I guess I'll add the following question: Does that sound right to those
> to know the code well?
>
> Cheers,
> David
>
>
>
> On 10/5/2016 6:15 PM, David Martin wrote:
>
>> Hi Niels,
>>
>> Thanks for the excellent observations/suggestions.  Yes, I think you are
>> right that we could adopt these techniques that leverage what's provided in
>> the basic RETE algorithm, which are already implemented in Jena.  However,
>> we strongly prefer a more streamlined approach.  For one thing, the
>> "bookkeeping" clauses and assertions in the rules can get to be really
>> cumbersome and can seriously impact the readability of the rules, and can
>> be hard for the rules author to wrap his head around once you get beyond a
>> few rules.  Rules ease-of-authoring is a big requirement for us.
>>
>> So we've concluded that we want an approach that's very easy for the
>> rules writer to read and think about, and more tightly integrated with
>> rule-firing choices that happen under the hood.
>>
>> We've thought a little bit about using the techniques you've mentioned to
>> support a preprocessing approach.  That is, the rules author would simply
>> write the numeric priorities, but some kind of preprocessor would generate
>> the bookkeeping clauses and assertions just before (or just after) the
>> rules are loaded.  That might work out pretty well, but I'd still like to
>> find out if the Jena gurus think this could be done in a more elegant
>> fashion by modifying the existing Java rule-firing code.  (And if anyone
>> has already worked on this.)
>>
>> Best regards,
>> David
>>
>>
>> On 10/5/2016 3:57 PM, Niels Andersen wrote:
>>
>>> David,
>>>
>>> Could you put the priority into the rule and then let the rule
>>> completion trigger the next set of rules?
>>>
>>> Another option is to create the rule so that each rule tests to see if
>>> there are any overlapping rules that have a higher priority.
>>>
>>> Niels
>>>
>>> -Original Message-
>>> From: David Martin [mailto:david.mar...@nuance.com]
>>> Sent: Wednesday, October 5, 2016 15:28
>>> To: jena-us...@apache.org
>>> Subject: Adding priorities to Jena rules?
>>>
>>> Hi all,
>>>
>>> We are working on a system that employs Jena rules, and we're finding it
>>> would be extremely valuable to have a capability for specifying rule
>>> priorities.  We are using the forwardRETE reasoning mode.
>>>
>>> What we're thinking of would be the ability of the rules author to
>>> assign a numeric priority to each rule.  When the system chooses a rule to
>>> fire, if there are multiple possibilities, one of the rules with the
>>> highest numeric priority is chosen.
>>>
>>> Priorities have been added in v

Re: Struggling with rules

2016-09-28 Thread Adrian Walker
Hi Marynas,

The word "unless" in your spec appears to need non-monotonic reasoning.

Here's how to do this in Executable English:

class some-class1 is a subclass of class some-class2
at level some-l2 that-class2 has a parameter some-par2 with value some-value2
not : class that-class1 has a parameter that-par2 with a value

class that-class1 inherits parameter that-par2 with value that-value2
from class that-class2


at level some-l some-class has a parameter some-par with value some-value

class that-class has a parameter that-par with a value


at level this-l this-class has a parameter this-par with value this-value
=
  1topclass par1_199
  2midclass par2_188
  3botclass par1_177


at level some-l1 some-class1 has a parameter some-par1 with value some-value1
at level some-l2 some-class2 has a parameter some-par2 with value some-value2
that-l1 + 1 = that-l2
-
class that-class2 is a subclass of class that-class1


class some-class1 is a subclass of class some-class2
class that-class2 is a subclass of class some-class3
-
class that-class1 is a subclass of class that-class3


You can  edit, run and change the above at executable-english.com . Select
the example MartynasInherit1.

HTH,  -- Adrian

Adrian Walker
Reengineering LLC
San Jose, CA, USA
860 830 2085
www.executable-english.com

On Wed, Sep 28, 2016 at 12:20 PM, Martynas Jusevičius  wrote:

> Hey,
>
> is it possible to express such condition using Jena rules:
> "Subclasses inherit parameter arguments from superclasses, unless an
> argument with the same predicate already is a subclass parameter"?
>
> For example
>
> # 1
>
> :SuperClass ldt:param [ a ldt:Argument ; spl:predicate foaf:name ],
>   [ a ldt:Argument ; spl:predicate dct:title ] .
>
> :SubClass rdfs:subClassOf :SuperClass .
>
> should infer new triples:
>
> :SubClass ldt:param [ a ldt:Argument ; spl:predicate foaf:name ],
>   [ a ldt:Argument ; spl:predicate dct:title ] .
>
> # 2
>
> :SuperClass ldt:param [ a ldt:Argument ; spl:predicate foaf:name ],
>   [ a ldt:Argument ; spl:predicate dct:title ] .
>
> :SubClass rdfs:subClassOf :SuperClass ;
>   ldt:param [ a ldt:Argument ; spl:predicate dct:title ] ,
> [ a ldt:Argument ; spl:predicate sioc:name ] .
>
> should infer new triples:
>
> :SubClass ldt:param [ a ldt:Argument ; spl:predicate foaf:name ] .
> # no dct:title param inferred, because it exists already
>
>
> What I use currently is this:
>
> [arg1:  (?template rdf:type <http://www.w3.org/ns/ldt#Template>),
> (?template <http://www.w3.org/ns/ldt#param> ?arg), (?arg rdf:type
> <http://www.w3.org/ns/ldt#Argument>), (?subTemplate rdfs:subClassOf
> ?template), (?subTemplate rdf:type
> <http://www.w3.org/ns/ldt#Template>), noValue(?subTemplate
> <http://www.w3.org/ns/ldt#param>) -> (?subTemplate
> <http://www.w3.org/ns/ldt#param> ?arg)]
>
> [arg2:  (?template rdf:type <http://www.w3.org/ns/ldt#Template>),
> (?template <http://www.w3.org/ns/ldt#param> ?arg), (?arg rdf:type
> <http://www.w3.org/ns/ldt#Argument>), (?subTemplate rdfs:subClassOf
> ?template), (?subTemplate rdf:type
> <http://www.w3.org/ns/ldt#Template>), (?arg
> <http://spinrdf.org/spl#predicate> ?predicate), (?subTemplate
> <http://www.w3.org/ns/ldt#param> ?subArg), noValue(?template
> <http://www.w3.org/ns/ldt#param> ?subArg), noValue(?subArg
> <http://spinrdf.org/spl#predicate> ?predicate) -> (?subTemplate
> <http://www.w3.org/ns/ldt#param> ?arg)]
>
> Sometimes I get desired results, sometimes only a single param is inferred.
>
> Are the rules wrong or is this can't be done with monotonic rules?
>
>
> Thanks,
>
> Martynas
>


Re: Relationship between similar columns from multiple databases

2016-09-07 Thread Adrian Walker
Hi,

You wrote:



*What are the steps if I want Jena to find out ENAME of MYSQL is same as
EMPLOYEENAME column of Oracle, ( and so can be joined). *
That's knowledge that you need to specify to the system.  (Even if the
column names are the same, their meanings could be different).

You can specify, and then run, the correct correspondence in executable
English, see executable-english.com .

HTH,  -- Adrian

Adrian Walker
Reengineering LLC
San Jose, CA, USA

On Wed, Sep 7, 2016 at 10:43 AM, ☼ R Nair (रविशंकर नायर) <
ravishankar.n...@gmail.com> wrote:

> All,
>
> I am new to Jena. I would like to query two databases, mysql and Oracle.
> Assume that there are similar columns in both. For example MYSQL contains a
> table EMP with ENAME column. Oracle contains, say, DEPT table with
> EMPLOYEENAME column. What are the steps if I want Jena to find out ENAME of
> MYSQL is same as EMPLOYEENAME column of Oracle, ( and so can be joined). Is
> this possible, at least to get an output saying both columns are similar?
> If so, how, thanks and appreciate your help.
>
> Best, Ravion
>


Re: Vague knowledge in Ontologies

2016-07-29 Thread Adrian Walker
Here's an unusual approach to fuzzy reasoning:

   www.executable-english.com/demo_agents/Zadeh1.agent

   www.executable-english.com/demo_agents/Zadeh2.agent

You can view, run and change these and other examples, and write your own.
Just point a browser to www.executable-english.com .

 -- Adrian


Adrian Walker
Reengineering LLC
San Jose, CA
860 830 2085


On Fri, Jul 29, 2016 at 3:58 AM, Luigi Selmi 
wrote:

> Being OWL a logic language any statement is assumed to be true. In order
> to add a probability (or fuziness) to a statement (or triple in RDF) a way
> could be to create a quadrupole and add the probability in a second triple
>  // triple for original statement
>
>
>
>
>
>
> //quadrupole
> <:probability> 0.5
> Best,
> Luigi
> > From: tinamadri...@gmail.com
> > Date: Fri, 29 Jul 2016 03:23:21 -0700
> > Subject: Vague knowledge in Ontologies
> > To: users@jena.apache.org
> >
> > How can we use the vague information, fuzzy based, in our ontologies.
> > Is it possible that we embed it into the already existed domain
> ontologies?
> > I will appreciate if some one share a working examples.
> > I have an ontology in which two of the classes needs fuzzy values like
> > useful, very useful and useless. How I will be able to do it without much
> > changes to my original ontology.
> >
> > with regards
>
>


Re: Web Development tools

2015-09-04 Thread Adrian Walker
Hi Kumar,

You wrote:
*I could not understand it, what is it and its purpose? How it replace
tools like JSP and Java?*

It makes possible the writing of apps in English (without programming in
Java etc), running the apps, and getting English explanations of the
results.

It's normally used by pointing a browser to the site, but you can also use
it as a software service endpoint as described in
http://www.reengineeringllc.com/iblClient1.java  .

HTH,  -- Adrian

Executable Open English / Internet Business Logic
Online at www.reengineeringllc.com
Nothing to download, shared use is free, and there are no advertisements



On Fri, Sep 4, 2015 at 1:01 PM, kumar rohit  wrote:

> I could not understand it, what is it and its purpose? How it replace tools
> like JSP and Java?
>
> On Fri, Sep 4, 2015 at 4:19 PM, Adrian Walker 
> wrote:
>
> > Kumar,
> >
> > You may be interested in the advanced semantics in the Executable English
> > system --
> >
> >  www.reengineeringllc.com/internet_business_logic_in_a_nutshell.pdf
> >
> >  -- Adrian
> >
> > Executable Open English / Internet Business Logic
> > Online at www.reengineeringllc.com
> > Nothing to download, shared use is free, and there are no advertisements
> >
> >
> > On Fri, Sep 4, 2015 at 12:44 AM, kumar rohit 
> > wrote:
> >
> > > BEA Workshop IDE, JSP, Jena TDB, Spring and Sparql... These tools are
> > > sufficient to build a Semantic Web application?
> > > Is there any need for another tool or technology ? Please guide me.
> > >
> >
>


Re: Web Development tools

2015-09-04 Thread Adrian Walker
Kumar,

You may be interested in the advanced semantics in the Executable English
system --

 www.reengineeringllc.com/internet_business_logic_in_a_nutshell.pdf

 -- Adrian

Executable Open English / Internet Business Logic
Online at www.reengineeringllc.com
Nothing to download, shared use is free, and there are no advertisements


On Fri, Sep 4, 2015 at 12:44 AM, kumar rohit  wrote:

> BEA Workshop IDE, JSP, Jena TDB, Spring and Sparql... These tools are
> sufficient to build a Semantic Web application?
> Is there any need for another tool or technology ? Please guide me.
>


Re: TDB with Pellet

2015-06-01 Thread Adrian Walker
Hi --

It's not OWL, but you may be interested in the author friendly system and
examples online at the site below.

In particular:

  www.reengineeringllc.com/demo_agents/OwlResearchOnt.agent

  www.reengineeringllc.com/demo_agents/RDFQueryLangComparison1.agent

In addition to its browser author-user interface, the system can be used
from Java (and other languages):

   www.reengineeringllc.com/iblClient1.java

Apologies if you have seen this before, and thanks for comments.

-- Adrian

Internet Business Logic
A Wiki and SOA Endpoint for Apps in Executable Open Vocabulary English over
SQL and RDF
Online at www.reengineeringllc.com
Shared use is free, and there are no advertisements

Adrian Walker
Reengineering



On Mon, Jun 1, 2015 at 5:42 AM, Diana Magdi  wrote:

> Hi,
>
> I have an large OWL ontology file as RDF which includes swrl rules and i'm
> trying to reason in java with jena TDB using Pellet but when i run the
> following code on eclipse.
>
>
>
> public class TestJenaTDB {
>
>
>  public static void main(String[] args) {
>
> // TODO Auto-generated method stub
>
>
>
> String directory = "TDB";
>
> Dataset dataset = TDBFactory.createDataset(directory);
>
> Model tdb = dataset.getDefaultModel();
>
> OntModel ont = ModelFactory.createOntologyModel(PelletReasonerFactory.
> THE_SPEC,tdb);
>
>  // read the input file
>
> String source = "Ontology_rdf.owl";
>
> ont.read(source,"RDF/XML");
>
> //FileManager.get().readModel( tdb, source,"RDF/XML");
>
>PelletOptions.USE_CONTINUOUS_RULES = true;
>
>  Reasoner reasoner = PelletReasonerFactory.theInstance().create();
>
>  reasoner = reasoner.bindSchema(ont);
>
>
>  InfModel infModel = ModelFactory.createInfModel(reasoner, tdb);
>
>   String sparqlQueryString = "PREFIX ling: <
> http://www.lsis.org/LingOnto/LingOnto.owl#> PREFIX rdf: <
> http://www.w3.org/1999/02/22-rdf-syntax-ns#> SELECT ?p  WHERE {\n" + "?p
> rdf:type ling:PER }";
>
>
>  Query query = QueryFactory.create(sparqlQueryString) ;
>
> QueryExecution qexec = QueryExecutionFactory.create(query, infModel) ;
>
> ResultSet results = qexec.execSelect() ;
>
> ResultSetFormatter.out(results) ;
>
>
>
> TDB.sync(dataset);
>
> qexec.close();
>
> tdb.close();
>
> dataset.close();
>
>
>  }
>
>
> }
>
>
> i get this exception:
>
>
> Exception in thread "main" java.lang.OutOfMemoryError: Java heap space
>
> at org.mindswap.pellet.EdgeList.getEdges(EdgeList.java:202)
>
> at com.clarkparsia.pellet.rules.rete.AlphaEdgeNode.getEdges(
> AlphaEdgeNode.java:115)
>
> at com.clarkparsia.pellet.rules.rete.AlphaEdgeNode.getMatches(
> AlphaEdgeNode.java:105)
>
> at com.clarkparsia.pellet.rules.rete.AlphaEdgeNode.getMatches(
> AlphaEdgeNode.java:89)
>
> at com.clarkparsia.pellet.rules.rete.BetaMemoryIndex$JoinIndexed.getWMEs(
> BetaMemoryIndex.java:208)
>
> at com.clarkparsia.pellet.rules.rete.BetaMemoryNode.activate(
> BetaMemoryNode.java:71)
>
> at com.clarkparsia.pellet.rules.rete.BetaNode.activateChildren(
> BetaNode.java:24)
>
> at com.clarkparsia.pellet.rules.rete.BetaMemoryNode.activate(
> BetaMemoryNode.java:75)
>
> at com.clarkparsia.pellet.rules.rete.BetaNode.activateChildren(
> BetaNode.java:24)
>
> at com.clarkparsia.pellet.rules.rete.BetaMemoryNode.activate(
> BetaMemoryNode.java:75)
>
> at com.clarkparsia.pellet.rules.rete.BetaNode.activateChildren(
> BetaNode.java:24)
>
> at com.clarkparsia.pellet.rules.rete.BetaMemoryNode.activate(
> BetaMemoryNode.java:58)
>
> at com.clarkparsia.pellet.rules.rete.AlphaNode.activate(AlphaNode.java:55)
>
>
>
> What am I doing incorrect ? Thanks
>


Re: SPARQL Query Generation

2015-04-22 Thread Adrian Walker
Hi Amal et al,

The links and online system below are about generating SQL, not SPARQL, but
may be useful background.

HTH,  -- Adrian

www.reengineeringllc.com/internet_business_logic_in_a_nutshell.pdf

www.reengineeringllc.com/A_Wiki_for_Business_Rules_in_Open_Vocabulary_Executable_English.pdf

www.reengineeringllc.com/Oil_Industry_Supply_Chain_by_Kowalski_and_Walker.pdf


On Wed, Apr 22, 2015 at 5:54 AM, james anderson  wrote:

> good morning;
>
> from the back of my mind, “aksw” popped up and, in fact, they have at
> least one link to their work in this area:
>
>   aksw.org/Projects/AutoSPARQL
>
> it was the top link in a google search, but google claims there appear to
> be numerous others.
>
> best regards, from berlin,
>
> > On 2015-04-22, at 09:22, Amal Sultan  wrote:
> >
> > Hello All !
> >
> > I am working on a Semantic Web Project where the user enters text query
> > like "US president " and I have to generate automatic sparql query based
> on
> > user's input text to retrieve results from TDB triple store.
> >
> > I am confused how to select subject, predicate and object.
> >
> > Though translating natural language into SPARQL queries is not an easy
> task
> > .
> >
> > Are there any helpful tools in Jena to generate sparql query from English
> > query.
> >
> >
> > Example:
> >
> > SQUALL sentence:
> >
> > How many person-s are an author of PaperX?
> >
> > SPARQL translation:
> >
> > SELECT DISTINCT (COUNT(DISTINCT ?x2) AS ?x1) WHERE {
> > ?x2 a :person .
> > :PaperX :author ?x2 .
> > }
> >
> >
> >
> > Thanks in advance.
> >
> >
> > Regards,
> >
> > Amal
>
> ---
> james anderson | ja...@dydra.com | http://dydra.com
>
>
>
>
>
>


Re: Meaning/Semantic question

2014-02-03 Thread Adrian Walker
Hi Karen and all,

Here's how to write this example in Executable English:

*some-person ate dish some-number*
*not : dish that-number has a non-vegetarian ingredient*
*---*
*that-person ate at least one dish that only had vegetable ingredients*

*dish some-number has some-ingredient*
*not : that-ingredient is vegetarian*
**
*dish that-number has a non-vegetarian ingredient*

*this-person ate dish this-number*
*===*
*  Fred   1*
*  Jane   2*

*dish this-number has this-ingredient*
*==*
*  1beef*
*  1lettuce*
*  2carrot*
*  2lettuce*


*this-ingredient is vegetarian*
**
* lettuce*
* carrot*

You can view run and change this example (and get explanations of answers)
by browsing to www.reengineeringllc.com and choosing Vegetarian1.

HTH,   -- Adrian






On Mon, Feb 3, 2014 at 11:11 AM, Joshua TAYLOR wrote:

> On Mon, Feb 3, 2014 at 10:41 AM, Karen Menz  wrote:
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> >
>
> It's easier to understand this if you look at it in a different
> syntax.  E.g., in the Manchester OWL syntax, it's
>
>   Class1 subClassOf (prop1 some (prop2 only Class2))
>
> It will be easier to understand that if you can use some more
> descriptive property and class names.  E.g,.
>
>   ThingThatAteAVegetarianDish subClassOf (ateDish some (hasIngredient
> only Vegetable))
>
> A thing that ate a vegetarian dish is something that ate at least one
> dish that only had vegetable ingredients.
>
> --
> Joshua Taylor, http://www.cs.rpi.edu/~tayloj/
>


Re: Jena+ retrieve information

2012-07-15 Thread Adrian Walker
Ooops, apologies to list folks  -- the post was intended for Fairouz only.

On Sat, Jul 14, 2012 at 7:55 PM, Fairouz FakhFakh wrote:

>
> Hello,
> I use OWL-S API (you find  attached). I know that OWL-S API use Jena.So, I
> would like to retrieve or extract the value of a datatypeProperty . For
> example the value of a "serviceProduct"., "serviceName", ...Can I use this
> with Jena and how ?Please, can some one help me. I am really blocked
>


Re: Jena+ retrieve information

2012-07-15 Thread Adrian Walker
Hi --

It's not Jena, but you may be interested in the author friendly system and
examples online at the site below.

In particular:

  www.reengineeringllc.com/demo_agents/RDFQueryLangComparison1.agent

In addition to its browser author-user interface, the system can be used
from Java (and other languages):

   www.reengineeringllc.com/iblClient1.java

Apologies if you have seen this before, and thanks for comments.

-- Adrian

Internet Business Logic
A Wiki and SOA Endpoint for Executable Open Vocabulary English over SQL and
RDF
Online at www.reengineeringllc.com
Shared use is free, and there are no advertisements

Adrian Walker
Reengineering



On Sat, Jul 14, 2012 at 7:55 PM, Fairouz FakhFakh wrote:

>
> Hello,
> I use OWL-S API (you find  attached). I know that OWL-S API use Jena.So, I
> would like to retrieve or extract the value of a datatypeProperty . For
> example the value of a "serviceProduct"., "serviceName", ...Can I use this
> with Jena and how ?Please, can some one help me. I am really blocked
>