rdf

C# parsing of Freebase RDF dump yields only 11.5 million N-Triples instead of 1.9 billion

非 Y 不嫁゛ 提交于 2020-01-04 01:50:27
问题 I'm working on building a C# program to read the RDF data in the Google Freebase data dump. To start out, I've written a simple loop to simply read the file and get a count of the Triples. However, instead of getting the 1.9 billion count as stated in the documentation page (referred above), my program is counting only about 11.5 million and then exiting. The relevant portion of the source code is given below (takes about 30 seconds to run). What am I missing here? // Simple reading through

MVC2 - Consume RSS feed with RDF and namespace http://www.w3.org/1999/02/22-rdf-syntax-ns#'

陌路散爱 提交于 2020-01-03 18:34:13
问题 I' trying to read the feed for the Washington Departmene of Fish and Wildlife, and keep etting this error: The element with name 'RDF' and namespace 'http://www.w3.org/1999/02/22-rdf-syntax-ns#' is not an allowed feed format. Here's the code from RssController: public virtual ActionResult Index() { string feedUrl = @"http://wdfw.wa.gov/news/newsrss.php"; using (XmlReader reader = XmlReader.Create(feedUrl)) { **SyndicationFeed rss = SyndicationFeed.Load(reader);** return View(rss); } } I've

Java code for Converting string message into Jena model

荒凉一梦 提交于 2020-01-03 06:19:08
问题 I have a string message from an AMQP message broker that consists of RDF statements. I want to covert it into a Jena model using Java and then merge the converted model with another one into single model. How can I do this? 回答1: This can be divided into three logical steps. Some of these, you may have already done: Isolate the RDF statements from non-rdf text Identify the syntax used for the RDF (can be part of #1) Parse the resulting string into an Apache Jena Model . As the first two are

How to represent this statement in RDF?

左心房为你撑大大i 提交于 2020-01-03 05:56:08
问题 My iPhone 6's screen size is 6 inches and red color. Vocabulary are the following: iPhone 6 screen size 6 inches color red Questions: 1) How to link 'iPhone 6' node with the 'screen' node? 2) 'screen' has two properties: 'size' & color Possible relationships: 1) [iPhone6, screen, ?] what's the object here? 2) [screen, color, red] [screen, size, 6 inches] Is this appropriate to express as Compound Value Type in KB like Freebase? Reading the Freebase's documentation, it seems CVT is intended to

How to check if OWLObjectPropertyExpression between classes exists?

眉间皱痕 提交于 2020-01-03 04:50:50
问题 Assuming two types of classes, one (A) "isManagedBy" by the other (B). The following owl snipped illustrates this scenario. There are multiple classes of type A (which are "managed by" other classes) and multiple classes of B. In fact, there is also a hierarchy between between classes bot of type A and B. <owl:ObjectProperty rdf:about="#isManagedBy"/> <owl:Class rdf:about="#FunctionManagement"> <rdfs:subClassOf rdf:resource="..."/> <rdfs:subClassOf> <owl:Restriction> <owl:onProperty rdf

XMLStarlet and RSS

依然范特西╮ 提交于 2020-01-03 04:19:46
问题 I can't seem to get this basic xslt query working via xmlstarlet. I'm sure I'm missing something obvious, but for the life of me I cannot figure out this syntax, so someone please illuminate me. XML Starlet Command: xml sel -t -m "//rdf:RDF/item" -v link -v description -v link ./sss.rdf sss.rdf: <?xml version="1.0" encoding="UTF-8"?> <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns="http://purl.org/rss/1.0/" xmlns:admin="http://webns.net/mvcb/" xmlns:content="http://purl

merging two owl files and eliminate common classes in one file

╄→尐↘猪︶ㄣ 提交于 2020-01-02 23:10:07
问题 I am very new to web ontology languages, I have created owl files using protege and I have to write a program that should merge these files into one. Is it possible with jena? Can anyone help with how to proceed?Can I do that in java using owl API? thanks in advance. 回答1: I was able to solve it with protege and it works. Thanks for all the comments and contributions. It helped a lot. :-) 来源: https://stackoverflow.com/questions/19280857/merging-two-owl-files-and-eliminate-common-classes-in-one

Triple extraction from a sentance

别来无恙 提交于 2020-01-01 19:24:19
问题 I have this parsed text in this format, I got it by using Standford nlp. (ROOT (S (NP (DT A) (NN passenger) (NN plane)) (VP (VBZ has) (VP (VBD crashed) (ADVP (RB shortly)) (PP (IN after) (NP (NP (NN take-off)) (PP (IN from) (NP (NNP Kyrgyzstan) (`` `) (NNP scapital) (, ,) (NNP Bishkek))))) (, ,) (VP (VBG killing) (NP (NP (DT a) (JJ large) (NN number)) (PP (IN of) (NP (NP (DT those)) (PP (IN on) (NP (NN board))))))))) (. .))) det(plane-3, A-1) nn(plane-3, passenger-2) nsubj(crashed-5, plane-3)

boundary for arbitrary property path in SPARQL 1.1

↘锁芯ラ 提交于 2020-01-01 18:53:10
问题 Is it possible to bound the length of property path? For example getting all the triples with lengths that are between (m,n) or all that are not between this range? For instance, how could this be done with the following query? select ?x ?y where {?x p* ?y} 回答1: Some endpoints support this directly Some SPARQL engines support a method for doing this directly, with a regular-expression-like syntax. E.g., ?s :p{n,m} ?o would be a path with a length between n and m. That syntax is described in

boundary for arbitrary property path in SPARQL 1.1

坚强是说给别人听的谎言 提交于 2020-01-01 18:52:30
问题 Is it possible to bound the length of property path? For example getting all the triples with lengths that are between (m,n) or all that are not between this range? For instance, how could this be done with the following query? select ?x ?y where {?x p* ?y} 回答1: Some endpoints support this directly Some SPARQL engines support a method for doing this directly, with a regular-expression-like syntax. E.g., ?s :p{n,m} ?o would be a path with a length between n and m. That syntax is described in