RDF 트리플은 무엇입니까?
평신도의 관점에서 RDF 트리플은 무엇입니까?
질문은 두 부분으로 나눌 필요가 있다고 생각합니다. 트리플은 무엇이며 "RDF 트리플"은 무엇이 그렇게 특별할까요?
첫째, 트리플은 여기에있는 대부분의 다른 주석가들이 이미 지적했듯이 "주제 / 술어 / 객체"형식의 문장입니다. 즉, 하나의 객체 (주제)를 다른 객체 (객체) 또는 리터럴에 연결하는 문장입니다. 술어. 우리는 모두 트리플에 익숙합니다. 트리플은 이진 관계에 대한 가장 작은 축소 불가능한 표현입니다. 일반 영어 : 스프레드 시트는 트리플 모음입니다. 예를 들어 스프레드 시트의 열에 "Paul"이라는 제목이 있고 행에 "has Sister"라는 제목이 있고 셀의 값이 "Lisa"인 경우입니다. 여기 트리플이 있습니다. Paul (주제)에는 Sister (predicate) Lisa (문자 / 객체)가 있습니다.
RDF 트리플을 특별하게 만드는 것은 트리플의 모든 부분에 URI가 연결되어 있으므로 일상적인 "Mike Smith가 John Doe를 알고 있습니다"라는 문구가 RDF에서 다음과 같이 표현 될 수 있다는 것입니다.
uri://people#MikeSmith12 http://xmlns.com/foaf/0.1/knows uri://people#JohnDoe45
스프레드 시트와 유사한 점은 URI의 모든 부분에 고유 한 주소를 부여함으로써 스프레드 시트의 셀에 전체 주소 공간을 제공한다는 것입니다. 따라서 원칙적으로 모든 셀 (RDF 트리플로 표현 된 경우)을 붙일 수 있습니다. 스프레드 시트를 다른 서버의 다른 문서로 만들고 단일 쿼리를 통해 스프레드 시트를 재구성합니다.
편집 : 공식 문서 의이 섹션 은 원래 질문을 다룹니다.
RDF Triple은 한 개체를 다른 개체와 연결하는 문입니다. 예를 들면 :
"gcc" "Compiles" "c" .
"gcc" "compiles" "Java" .
"gcc" "compiles" "fortran" .
"gcc" "has a website at" <http://gcc.gnu.org/> .
"gcc" "has a mailing list at" <mailto:gcc-help@gcc.gnu.org> .
"c" "is a" "programming language" .
"c" "is documented in" <http://www.amazon.com/Programming-Language-Prentice-Hall-Software/dp/0131103628/ref=pd_bbs_sr_1?ie=UTF8&s=books&qid=1226085111&sr=8-1> .
RDF 파일은 트리플 목록으로 구문 분석되어야합니다.
트리플은 주제, 술어 및 객체로 구성됩니다. 그러나 이것이 실제로 무엇을 의미합니까?
주제는 글쎄요, 주제입니다. 트리플이 설명하는 객체를 식별합니다.
술어는 값을 제공하는 객체의 데이터 조각을 정의합니다.
개체는 실제 값입니다.
출처 : http://www.robertprice.co.uk/robblog/archive/2004/10/What_Is_An_RDF_Triple_.shtml
Adam N의 답변에 관해서는 OP 가 소셜 네트워크의 데이터와 관련하여 이전에 질문 한 것으로 생각 되므로 답변은 훌륭하지만 "원본 원본"질문과 관련하여 설명하겠습니다. (내가 책임감을 느끼면서).
존 | 의 친구입니다 | 제임스 제임스 | 의 친구입니다 | 처녀 질 | 좋아요 | 스노 보드 스노 보드 | 입니다 | 스포츠
이와 같은 트리플을 사용하면 매우 유연한 데이터 구조를 가질 수 있습니다.
상기 봐 친구 (FOAF)의 친구 아마도 더 나은 예를 들어.
RDF는 언어, 즉 정보 (일부 컨텍스트의 데이터)를 인코딩 및 디코딩하기위한 기호, 구문 및 의미 체계의 시스템입니다.
RDF에서 관찰 단위 (데이터)는 주어, 술어, 대상의 세 부분으로 구성된 문장으로 표시됩니다. 기본적으로 이것은 자연어 말하기의 기본 구조입니다.
RDF가 나타내는 엔티티 관계에 참여하는 엔티티 (사물)를 나타내는 데 사용되는 기호는 IRI (HTTP URI 포함)입니다. RDF 문장의 각 주제 및 술어 (및 선택적으로 객체) 구성 요소는 IRI로 표시됩니다.
구문 (문법)은 주제, 술어 및 객체 배열 순서의 형태로 추상 (다양한 표기법을 사용하여 표현할 수 있음을 의미)합니다.
의미론 (가장 자주 간과되는 부분)은 RDF 문에서 주제, 술어 및 객체 역할의 의미에 관한 것입니다.
HTTP URI를 사용하여 RDF 문 제목, 조건 자 및 (선택적으로) 개체를 표시하면 오늘날 World Wide Web에서와 마찬가지로 웹을 형성하는 구조화 된 데이터 (엔티티 관계 유형 모음)가됩니다.
RDF 문에서 (특히) 술어의 의미 체계가 기계적이고 사람이 이해할 수있는 경우 지식 (추론 및 추론)의 기초가되는 강력한 정보 인코딩을 제공하는 엔터티 관계 유형의 웹이 있습니다.
다음은 간단한 RDF 문의 예입니다.
{
<#this> a schema:WebPage .
<#this> schema:about dbpedia:Resource_Description_Framework .
<#this> skos:related <https://stackoverflow.com/questions/30742747/convert-a-statement-with-adjective-in-rdf-triple/30836089#30836089> .
}
이 게시물은 상대 HTTP URI 및 #
기반 조각 식별자 (인덱스) 를 사용하여 라이브 RDF 기반 연결된 데이터 데모로 전환되도록 중괄호를 사용하여 예제를 묶었습니다.
나노화를 통해이 게시물에 포함 된 RDF 문 결과 (텍스트가 허용되는 모든 곳에 RDF 문 포함) :
- 기본 엔터티 설명 페이지 -각 문은 설명 (제목, 술어, 개체 부분)으로 해석되는 하이퍼 링크로 식별됩니다.
- Deeper Faceted Browsing Page- 데이터 웹 또는 연결된 데이터의 웹을 구성하는 하이퍼 링크를 통해 코를 따라 가면서 더 깊은 탐색과 발견에 도움이되는 대체보기입니다.
- 포함 된 문에 대한 설명 -특정 RDF 문에 대한 정보입니다.
Here's the visualization generated from the triples embedded in this post (using our Structured Data Sniffer Browser Extension, using RDF-Turtle Notation:
Note, that it can get a bit more complicated. RDF triples can also be considered Subjects or Objects, so you can have something like: Bart -> said -> ( triples -> can be -> objects)
I'm going to have to agree with A Pa in part, even though he was down-voted.
Background: I'm a linguist, with a PhD in that subject, and I work in computational linguistics.
The statement that "...a sentence that consists of three parts: subject, predicate, object. Basically, this is the fundamental structure of natural language speech" (which A Pa quotes from Kingsley Uyi Idehen's answer) is simply wrong. And it's not just that Kingsley says this, I've heard it from many advocates of RDF triples.
It's wrong for many reasons, for example: Predicates (in English, arguably, and in many other natural languages) consist of a verb (or a verb-like thing) + the object (and perhaps other complements). It is definitely NOT the case that the syntactic structure of English is Subj-Pred-Obj.
Furthermore, not all natural language sentences in English have an object; intransitive verbs, in particular, by definition do not take objects. And weather verbs (among other things) don't even take a "real" subject (the "it" of "it rains" has no reverent). And on the other hand, ditransitive verbs like "give" take both a direct and an indirect object. Then there are verbs like "put" that take a locative in addition to the direct object, or "tell" that take an object and a clause. Not to mention adjuncts, like time and manner adverbials.
Yes, of course you can represent embedded clauses as embedded triples (to the extent that you can represent any statement as triples, which as I hope you've made clear, you can't), but what I don't think you can do in RDF (at least I've never seen it done, and it seems like it would take a quadruple) is to have both an object and an embedded clause. Likewise both a direct and an indirect object, or adjuncts.
So whatever the motivation for RDF triples, I wish the advocates would stop pretending that there's a linguistic motivation, or that the triples in any way resemble natural language syntax. Because they don't.
It has been awhile since I worked with RDF, but here it goes :D
A triple is a subject, predicate and object.
The subject is a URI which uniquely identifies something. For example, your openid uniquely identifies you.
The object defines how the subject and object are related.
The predicate is some attribute of the subject. For example a name.
Given that, the triples form a graph S->P. Given more triplets, the graph grows. For example, you can have the same person identified as the subject of a bunch of triples, you can then connect all of the predicates through that unique subject.
RDF Triple is an actual expression that defines a way in which you can represent a relationship between objects. There are three parts to a triple: Subject, Predicate and Object (typically written in the same order). A predicate relates subject to object.
Subject ----Predicate---> Object
More useful information can be found at:
http://www.w3.org/TR/rdf-concepts/
One can think of a triple as a type of sentence that states a single "fact" about a resource. First of all to understand RDF Triple you should know that each and every thing in RDF is defined in terms of URI http://www.w3.org/TR/2004/REC-rdf-concepts-20040210/#dfn-URI-reference
or blank node http://www.w3.org/TR/2004/REC-rdf-concepts-20040210/#dfn-blank-node
.
An RDF Triple consists of three components :- 1) Subject 2) Predicate 3) Object For ex :- Pranay hasCar Ferrari Here Subject is Pranay, hasCar is a predicate and Ferrari is a object. This are each defined with RDF-URI. For more information you can visit :- http://www.w3.org/TR/owl-ref/
Triple explained by example
Be there a table that relates users and questions.
TABLE dc:creator ------------------------- | Question | User | ------------------------- | 45 | 485527 | | 44 | 485527 | | 40 | 485528 |
This could conceptually be expressed in three RDF triples like...
<question:45> <dc:creator> <user:485527>
<question:44> <dc:creator> <user:485527>
<question:40> <dc:creator> <user:485528>
...so that each row is converted to one triple
that relates a user to a question. The general form of each triple can be described as:
<Subject> <Predicate> <Object>
One specialty about RDF is, that you can (or must) use URIs/IRIs to identify entities as well as relations. Find more here. This makes it possible for everyone to reuse already existing relations (predicates) and to publish statements about arbitrary entities in the www.
Example relating a SO answer to its creator:
<https://stackoverflow.com/a/49066324/1485527>
<http://purl.org/dc/terms/creator>
<https://stackoverflow.com/users/1485527>
As a developer, I have struggled for a while until I finally understood what RDF and its tripes was about, mostly because I have always seen the world through code and not through data.
Given this is posted on StackOverflow, here is the Java analogy that finally made it click for me: a RDF triple is to data what a class' method/parameter is to code.
So:
- A class with its package name is the Subject
- A method on this class is the Predicate
- Parameter(s) on the method is the Object, which are themselves represented by classes
- Contexts are import statements to avoid writing the full canonical name of classes
The only point where this analogy breaks down a bit is that Predicates also have namespaces, while methods do not. But the overall relationships created between class instances as Subject and Object when a Predicate is used reflects on the idea of calling a method to do something.
Basically, RDF is to data what OO is to code.
A simple answer can be that an RDF triple is a representation of some knowledge using RDF data model. This model is based upon the idea of making statements about resources (in particular web resources URIs) in the form of subject–predicate–object expressions. RDF is also a standard model for data interchange on the Web. RDF has features that facilitate data merging even if the underlying schemas differ, and it specifically supports the evolution of schemas over time without requiring all the data consumers to be changed. I recommend this article to know how: https://www.w3.org/DesignIssues/RDF-XML.html
See: http://www.w3.org/TR/2004/REC-rdf-concepts-20040210/#dfn-rdf-triple
An RDF triple contains three components:
- the subject, which is an RDF URI reference or a blank node
- the predicate, which is an RDF URI reference
- the object, which is an RDF URI reference, a literal or a blank node
where literals are essentially strings with optional language tags, and blank nodes are also strings. URIs, literals and blank nodes must be from pair-wise disjoint sets.
참고URL : https://stackoverflow.com/questions/273218/whats-a-rdf-triple
'Program Tip' 카테고리의 다른 글
이미지를로드 할 때 WPF에서 "리소스를 찾을 수 없음"예외 발생 (0) | 2020.12.03 |
---|---|
하위 프로세스 호출에서 종료 코드 및 stderr 가져 오기 (0) | 2020.12.03 |
PHP를 사용하여 단어가 다른 문자열에 포함되어 있는지 어떻게 확인할 수 있습니까? (0) | 2020.12.03 |
SQL에서 UPDATE는 항상 DELETE + INSERT보다 빠릅니까? (0) | 2020.12.03 |
여러 선택적 매개 변수를 C # 함수에 전달 (0) | 2020.12.03 |