generated from liudonghua123/esm-template
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
12 changed files
with
4,795 additions
and
416 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,49 @@ | ||
# esm-template | ||
|
||
[![Node.js CI](https://github.com/liudonghua123/esm-template/actions/workflows/node.js.yml/badge.svg)](https://github.com/liudonghua123/esm-template/actions/workflows/node.js.yml) | ||
|
||
This is a simple NodeJS template project. | ||
|
||
## Support features | ||
|
||
- Default esm module support | ||
- Type support in pure javascript | ||
- Auto doc generation, need to write doc comments | ||
- Format and Lint support | ||
|
||
## TODOs | ||
|
||
- [x] Add unit tests | ||
- [x] Add github actions for testing | ||
|
||
|
||
## License | ||
|
||
MIT License | ||
|
||
Copyright (c) 2024 liudonghua | ||
# Nagu OWL | ||
`Nagu OWL`是一个本体论框架,实现了RDF、RDFS、OWL的定义、推理,并基于`Nagu Triples`实现数据存储。 | ||
|
||
## 公理、定义及推理 | ||
|
||
### 公理(代码中硬编码) | ||
1. RDF中定义的任何资源都可以作为主体或客体使用,只有`rdf:Property`的实例才能作为三元组的谓词使用; | ||
2. RDF中定义所有资源都是`rdfs:Resource`的一个实例; | ||
3. `rdf:type` 是 `rdf:Property` 的一个实例,即 `<rdf:type, rdf:type, rdf:Property>`。`rdf:type`的定义域是`rdfs:Resource`, 值域是 `rdfs:Class`; | ||
|
||
### 定义 | ||
1. `rdf:type`是一个属性:`<rdf:type, rdf:type, rdf:Property>`; | ||
2. 基本Class定义 | ||
- `<rdfs:Class, rdf:type, rdfs:Resource>` | ||
- `<rdfs:Class, rdf:type, rdfs:Class>` | ||
- `<rdf:Property, rdf:type, rdfs:Class>` | ||
- `<rdfs:Resource, rdf:type, rdfs:Class>` | ||
- `<rdf:Statement, rdf:type, rdfs:Class>` | ||
- `<rdfs:Container, rdf:type, rdfs:Class>` | ||
- `<rdf:Bag, rdf:type, rdfs:Class>` | ||
- `<rdf:Seq, rdf:type, rdfs:Class>` | ||
- `<rdf:Alt, rdf:type, rdfs:Class>` | ||
- `<rdfs:Literal, rdf:type, rdfs:Class>` | ||
3. 基本属性定义 | ||
- `<rdfs:label, rdf:type, rdf:Property>` | ||
- `<rdfs:comment, rdf:type, rdf:Property>` | ||
- `<rdfs:domain, rdf:type, rdf:Property>` | ||
- `<rdfs:range, rdf:type, rdf:Property>` | ||
- `<rdf:subject, rdf:type, rdf:Property>` | ||
- `<rdf:predicate, rdf:type, rdf:Property>` | ||
- `<rdf:object, rdf:type, rdf:Property>` | ||
- `<rdf:first, rdf:type, rdf:Property>` | ||
- `<rdf:rest, rdf:type, rdf:Property>` | ||
- `<rdf:value, rdf:type, rdf:Property>` | ||
- `<rdf:nil, rdf:type, rdf:List>` | ||
- `<rdfs:member, rdf:type, rdf:Property>` | ||
- `<rdfs:subClassOf, rdf:type, rdf:Property>` | ||
- `<rdfs:subPropertyOf, rdf:type, rdf:Property>` | ||
4. 定义域与值域 | ||
- 属性的默认定义域和值域为`rdf:Resource` | ||
- `rdfs:domain`用于定义定义域,满足约束: | ||
- `<rdfs:domain, rdfs:domain, rdf:Property>` | ||
- `rdfs:range` 用于定义值域, 满足约束: | ||
- `<rdfs:range, rdfs:domain, rdf:Property>` | ||
5. 类与子类 | ||
- 定义域:`<rdfs:subClassOf, rdfs:domain rdfs:Class>` | ||
- 值域:`<rdfs:subClassOf, rdfs:range rdfs:Class>` | ||
- 性质:当`<ex:B, rdfs:subClassOf, ex:A>`时,如果`<ex:b, rdf:type, ex:B>`,则`<ex:b, rdf:type, ex:A>`; | ||
- 传递性:如果`<ex:C, rdfs:subClassOf, ex:B>`且`<ex:B, rdfs:subClassOf, ex:A>`,则`<ex:C, rdfs:subClassOf, ex:A>`; |
Oops, something went wrong.