问题标签 [dotnetrdf]

For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.

0 投票
1 回答
721 浏览

sparql - 如何在 SparqlParameterizedString 中分配参数值

我正在玩一些 Dotnetrdf 的 sparql 引擎,我正在尝试创建参数化查询但尚未成功。

假设我正在处理带有标识为 _:1690 的空白节点的图 g,其代码

每当我运行它时,我都会让所有节点都具有 rdfs:label 属性,而不是仅在我的空白节点上过滤结果。

请问,如何正确设置参数的值,以便我在结果中只得到一项?

在此先感谢,马克斯。

0 投票
1 回答
311 浏览

sparql - BIND 子句上的 Sparql 问题

我目前正在尝试按优先级对一些客户进行排序(那些首先拥有正在运行的订阅的客户,然后是其他客户。

为此,我在此查询中使用了 BIND 子句:

在我看来, ?priority var 应该始终绑定到 0 或 1,但是每当我执行查询时,我得到(连同预期的输出结果)未绑定的 ?priority “行”,用于那些应该获得 1 优先级的项目,所以我需要在我的查询中添加 FILTER (bound(?priority)) 以获得我所期望的。

这是正常的还是我错过了什么?

在此先感谢,马克斯。

编辑 :

=> 在跟踪器中提交排序问题

我编辑了查询以检查优先权在同一个节点上是否绑定和未绑定。

这是我返回的结果集的示例输出

在最后两行中,变量 ?priority 根本没有绑定。顺便说一句,您会注意到如果第一个子句未绑定,则第二个 ORDER 子句也不会被执行

0 投票
1 回答
435 浏览

data-binding - SPARQL BIND 子句导致转发器数据源异常

我尝试通过以下 VB 代码填充转发器控件的数据源:

其中变量g是我的工作图

我使用相同的查询

每当我在一个简单的 aspx 页面中尝试此 vb 代码时,它都可以正常工作,但如果在转发器OnLoad事件上失败并带有VDS.RDF.Query.RdfQueryException: Cannot add a Set to the Null Multiset

似乎错误是由该BIND ( IF(EXISTS {?s rdf:type my:Subscriber}, 1, 0) AS ?priority )子句引起的:如果我删除它,我的转发器会按预期运行!

知道为什么会发生异常以及如何纠正它吗?

0 投票
2 回答
1257 浏览

nlp - Tagging and Categorizing text automatically using NLP and Ontology respectively

I am working on a project in which user adds some text into Database, and while saving also adds tags to his/her entry, so that others can search using those tags.

EXAMPLE:

TEXT: "Next Formula 1 race is in Spain"

TAGS: "Formula 1", "race", Spain"

if any user will search for these tags will get this entry in the results.

But i want users who search for "Sports" or "Motor Sport" or "Europe" should also get this entry, although these tags were not explicitly tagged into the entry, but are related because "Formula 1" is type of "Motor Sport" which is a type of "Sport" and "Spain" is in "Europe".

At the moment on my submission form, users write their text in one text box, and then write their tags into the second text box below, and submit.

these tags are later then categorized manually by the admin. So in the above case the admin will manually put "Spain" as the child element of "Europe". (MS SQL Server Hierarchy Column)

I think this can be achieved using some Ontologies software. dotNetRdf, OWL ... but am not sure. I just go to know about this side of the world few days back, and I am not sure how these can help me. Is this the solution, or am I looking into completely wrong thing? Any suggestions to achieve the above?

Also, before doing the categorization, I would want to automatically pick tags from the text and fill in to the lower text box as Tags.

For this I guess I'll have to use some NLP service? Any ideas which one to use, or any other suggestion?

0 投票
1 回答
688 浏览

namespaces - 无法解析此 RDF/XML,因为 System.Xml 无法解析文档

我正在使用 .Net RDF 库对 RDF 文件进行一些 sparql 查询。但是当我尝试将 RDF 文件加载到 C# .Net RDFlibrary 时。

错误是:

无法解析此 RDF/XML,因为System.Xml无法解析文档,请参阅内部异常了解详细信息

我的 RDF 文件:

和要加载的语句:

谁能告诉我出了什么问题?- 为什么我会收到这个错误?

0 投票
1 回答
194 浏览

rdf - 将 sparql 与 RDF 三元组文件一起使用

鉴于此 RDF:

我正在尝试进行 sparql 查询,但是当我进行此查询时:

我得到答案。但是当我尝试这个时:

我不明白。

我需要通过查询获取 startTime 和 endTime,我该怎么写?!

包括来自 OP 注释的代码

0 投票
1 回答
562 浏览

rdf - dotnetrdf Graph Sparql query

with rdf triples like this:

how can i query about subject or object?

my code:

with my code below i get all answers from the query. can anyone help me to get for just subject = fadi?

0 投票
1 回答
120 浏览

views - 视图和参考图上面向用户的 sparql

我有一个内存存储,它将带有参考数据的图表和带有用户绑定资源的图表混合在一起。我想公开按用户和/或角色过滤的数据以及所有参考数据。

另外,我需要对数据集进行 RDFS 推理。

首先,是否可以向 sparqlview 对象添加推理器,还是每次刷新视图时都需要运行推理器?

至于架构部分,我似乎有几个选择:

  1. 为每个用户构建一个联合引用数据和用户范围的视图(但我无法使查询与不同图形模式的联合一起工作)
  2. 为每个用户构建一个视图,其中仅包含他可以浏览/修改的数据,并对默认为参考图和用户视图联合的数据集运行我的查询。
  3. ...

在查询性能、内存消耗和简单性方面,使用 dotNetRdf 执行此操作的最佳模式是什么?

0 投票
1 回答
310 浏览

sparql - SparqlResultSet 给出 {“远程服务器返回错误:(400)错误请求。”}

这是我正在使用的代码和查询..

我知道查询运行良好,因为我已经在 Virtuoso 中尝试过,我不知道为什么它给了我这个错误,感谢 Visual Studio 2012。

0 投票
1 回答
130 浏览

rdf - 具有基数问题的 DotNetRdf Sparql 属性路径?

我有一个业务活动层次结构,我想根据特定活动过滤公司,所以我的意思是捕获在特定活动中工作的所有公司或其任何后代。

活动通过 my:hasActivity 谓词分配,层次结构用 my:isPartOf 谓词表示(即传递性)

因此,为了过滤结果集,我在查询中添加了这个模式:

我希望它相当于一个归纳模式,如:

但我得到的结果与此不一致。

我的假设是错误的还是 DotNetRdf 中的这个 propertyPath 模式有问题?

事实上,sparql 引擎似乎失去了 my:hasActivity 三元组对象和 my:isPartOf 主题之间的约束......

预先感谢您的建议,马克斯。