-
Notifications
You must be signed in to change notification settings - Fork 18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
New shorthands for blank nodes and graph terms #214
Comments
On second thought, a more generic solution would be to allow the user to define their own syntax or semantic extensions using instructions named A syntax extension might look like this:
And a semantic extension like this:
This implies that shorthands can be used as subject or object, and therefore section 4.6 of the standard should be revised. For example:
By allowing users to define their own extensions, you avoid making N3 itself more complex. |
I normally like discussing syntactic extensions, but I would try to keep the number of such extensions limited. Therefore my question: do you have a particular use case in mind where you plan to use a lot of these triples containing many blank nodes? |
Translate natural languages more directly into RDF. Create Controlled natural languages, thesaurus and dictionaries in RDF. This could be of interest for the processing of natural languages by AI or for automatic translators. RDF exposes the logical structure of the sentences, which is interesting for technical or scientific applications. But maybe this isn't a trivial extension, and would require more thought. I'm not an expert at all. I came to these considerations because I find that the use of natural languages often lacks clarity. Note that this type of criticism is not new, and that it had already been raised by George Orwell in "Politics and the English Language". Is it possible to translate natural language into RDF? And if so, what language should I use? I tried using N3, and while it's possible, it's rather complicated. Maybe N3 is not appropriate, maybe we need to invent a new language. To easily translate natural languages, N3 lacks at least two features: The ability to use triples in any position: subject, verb and object. The possibility of defining your own shortcuts (like "a" for http://www.w3.org/1999/02/22-rdf-syntax-ns#type) which would allow you to import the vocabulary of your own thesaurus, in practice the vocabulary of a controlled natural language. Without much rigor, this is what it could look like: The syntax:
The grammar:
An example: "The philosopher Socrates was during antiquity a man respected by his peers"
triplets can be used as subject, verb or object, including anonymous entities. For example, |
The more I think about it, the more I think I need a new language better suited to transcribing natural languages.
Used as a subject it means: "an entity", as a verb: "is" and as an object: "something". When an indeterminate entity is a determinate resource, this means that this indeterminate entity is this determinate resource (tautology):
However, this rule is questionable as the "and" operator at the end of the document makes it trivial to join documents into one. A finite series of triples could also be terminated by a special triple, like
The structure of a convoluted sentence can thus be transcribed relatively clearly and concisely.
Indeed, when in natural language I say that a dog has crossed the road, I do not mean that the category "dog" has crossed the road, but that an instance of the category "dog" has crossed the road. Except in very specific applications (writing dictionaries, etc.), natural language almost always manipulates instances of concepts, and not the concepts themselves. The import and instantiation mechanisms should certainly be formalized with more rigor.
In summary, the example sentence would be translated as follows:
In To correct this irregularity, we also declare Thus, we are sure to speak of “Socrates, the philosopher” and not of “Socrates, the philosophy”. The description of the language certainly still lacks rigor, and could even contain errors. |
It seems to me that the proposed change is so far-reaching that it should be pushed to the level of Turtle. N3 largely has a similar grammar to Turtle, if such large changes were implemented in Turtle they could certainly also be considered in N3 but not the other way around. |
Resources are concepts that can be broken down into subject, predicate and object.
Subject is the agent, predicate is the manifestation, and object is the patient of concept.
So the statement:
can be translated as: “Employers employ employees.”
However, in RDF, subjects, predicates, and objects can serve as subjects, predicates, and objects, with any order.
Thus, the declarations:
read: "employees work with employers", and "employing is the work of employers".
The notation can be simplified to:
But it remains heavy and will quickly become unreadable if many resources are nested within each other.
Proposal 1
Introduce the following Shorthands:
So the syntax
{:employ[][]}
can be replaced by{:employ a s}
Proposal 2
Introduce the following syntax
:a~:b~:c
for{:a :b :c}
.Thus, following the two proposals, the syntax:
can be replaced by:
Interest
This syntax is inspired by synthetic languages which include all Indo-European languages (English, Spanish, Hindi, etc.) and all agglutinative languages (Tamil, Indonesian, Turkish, Finnish, Korean, Japanese, Swahili, Quechua, etc.) It is therefore intuitive for all these speakers.
This syntax still remains analytical, since the shortcuts "o", "p" and "s" are abbreviations. It is therefore intuitive to a computer scientist or a Chinese person.
The text was updated successfully, but these errors were encountered: