Skip to content

Commit

Permalink
docs: 📝 更新自述文件
Browse files Browse the repository at this point in the history
随「真值缺省」机制,更新README文档
  • Loading branch information
ARCJ137442 committed Jan 27, 2024
1 parent 53c1420 commit 4c738e0
Show file tree
Hide file tree
Showing 3 changed files with 110 additions and 55 deletions.
51 changes: 34 additions & 17 deletions README-en.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,26 +27,43 @@ Knowledge representation language of NARS
### ***CommonNarsese***

- Defined by [Narsese Grammar (IO Format)](https://github.com/opennars/opennars/wiki/Narsese-Grammar-(Input-Output-Format))
- Among various NARS (Narsese) implementations
- The first generated specification that is most widely accepted syntax
- Among the various NARS(Narsese) implementations, the first to produce specifications and the most widely accepted syntax
- is basically an intersection of the Narsese syntax of the various NARS implementations

Differences from other dialects and supersets:

- Atomic terms:
- Consistently use `$`, `#`, `?`, `^` to distinguish "independent variable", "dependent variable", "query variable", "operator"
- Consistently use separate `_` to represent "placeholders"
- Compound terms:
- Consistently use special brackets `{terms...}` and `[terms...]` to represent "extension set" and "intension set"
- Consistently use "(connector, term...)" to represent "non-extension and intension compound terms"
- e.g. `(&, <A --> B>, ^op)`
- Do not use prefix expression for "negation" (such as `--<A --> B>`)
- Do not use infix expression for other "binary compound terms" (such as `(A*B)`)
- Propositions:
- Consistently use angle brackets to represent propositions, no other options
- e.g. `<A --> B>`
- Do not use retrospective equivalence "<\\>"
- Consistently use predictive equivalence "</>" with equivalent representational capability instead
- e.g. `<A <\> B>` will be expressed as `<B </> A>`
#### Atomic term

- Consistently use `$`, `#`, `?`, `^` to distinguish "independent variable", "dependent variable", "query variable", "operator"
- Consistently use separate `_` to represent "placeholders"

#### Compound term

- Consistently use special brackets `{terms...}` and `[terms...]` to represent "extension set" and "intension set"
- Consistently use "(connector, term...)" to represent "non-extension and intension compound terms"
- e.g. `(&, <A --> B>, ^op)`
- Do not use prefix expression for "negation" (such as `--<A --> B>`)
- Do not use infix expression for other "binary compound terms" (such as `(A*B)`)

#### Statement

- Consistently use angle brackets to represent propositions, no other options
- e.g. `<A --> B>`
- Not use retrospective equivalence "<\\>"
- Consistently use predictive equivalence "</>" with equivalent representational capability instead
- e.g. `<A <\> B>` will be expressed as `<B </> A>`

#### Sentence

- Truth default: No part of the truth value can be entered during statement parsing
- Such truth values will be completed when entering a specific NARS implementation
- e.g. OpenNARS 'Default truth' `%1.0; 0.9%`
- e.g. OpenJunars 'Default truth' `%1.0; 0.5%`
- Specific form
- Single default (single truth value) : f is specified, and c is missing
- Such as `A. %1.0%`
- Full default (null true value) : neither f nor c is specified
- Such as `A`

## Code Map

Expand Down
61 changes: 40 additions & 21 deletions README-zh_tr.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,27 +26,46 @@ NARS 的知識表示語言

### ***CommonNarsese***

-[Narsese Grammar (IO Format)](https://github.com/opennars/opennars/wiki/Narsese-Grammar-(Input-Output-Format)) 定義,
- 在各類 NARS(Narsese) 實現中,
- 最先產生規範,並最為廣泛接受的一種語法

與其它方言、超集的不同點舉例:

- 原子詞項:
- 一律使用 `$``#``?``^` 區分「獨立變量」「非獨變量」「查詢變量」「操作」
- 一律使用單獨的 `_` 表示「像佔位符」
- 複合詞項:
- 一律使用特殊括弧 `{詞項...}``[詞項...]` 表示「外延集」「內涵集」
- 一律使用「圓括號+前綴表達式」`(連接符, 詞項...)` 形式表示「非外延集、內涵集的複合詞項」
-`(&, <A --> B>, ^op)`
- 對「否定」不使用前綴表達式(如`--<A --> B>`
- 對其它「二元複合詞項」不使用中綴表達式(如`(A*B)`
- 陳述:
- 一律使用尖括號表示陳述,沒有其他選項
-`<A --> B>`
- 不使用「回顧性等價」`<\>`系詞
- 一律用表義能力等同的「預測性等價」`</>`系詞代替
-`<A <\> B>` 將表示為 `<B </> A>`
-[Narsese Grammar (IO Format)](https://github.com/opennars/opennars/wiki/Narsese-Grammar-(Input-Output-Format))定義,
- 在各類NARS(Narsese)實現中,最先產生規範,且最廣爲接受的一種語法
- 基本是各路NARS實現之Narsese語法的**交集**

與其它方言、超集的不同點舉例:

#### Atom 原子詞項

- 一律使用`$``#``?``^`區分「獨立變量」「非獨變量」「查詢變量」「操作」
- 一律使用單獨的`_`表示「像佔位符」
- 一律不在名稱中包含特殊符號
-`^goto`(不允許`^go-to`

#### Compound 複合詞項

- 一律使用特殊括弧`{詞項...}``[詞項...]`表示「外延集」「內涵集」
- 一律使用「圓括號+前綴表達式」`(連接符, 詞項...)`形式表示「非外延集、內涵集的複合詞項」
-`(&, <A --> B>, ^op)`
- 對「否定」不使用前綴表達式
- 對其它「二元複合詞項」不使用中綴表達式

#### Statement 陳述

- 一律使用尖括號表示陳述,沒有其他選項
-`<A --> B>`
- 不使用「回顧性等價」`<\>`繫詞
- 一律用表義能力等同的「預測性等價」`</>`繫詞代替
-`<A <\> B>`將表示爲`<B </> A>`

#### Sentence 語句

- 「真值缺省」:解析語句時,允許不輸入一部分真值
- 此類真值將在輸入具體NARS實現時被補全
- 如:OpenNARS的「默認真值」`%1.0; 0.9%`
- 如:OpenJunars的「默認真值」`%1.0; 0.5%`
- 具體形式
- 單缺省(單真值):f已指定,缺c值
-`A. %1.0%`
- 全缺省(空真值):f、c均未指定
-`A.`

## 代碼地圖

Expand Down
53 changes: 36 additions & 17 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,26 +27,45 @@ NARS的知识表示语言
### ***CommonNarsese***

-[Narsese Grammar (IO Format)](https://github.com/opennars/opennars/wiki/Narsese-Grammar-(Input-Output-Format))定义,
- 在各类NARS(Narsese)实现中,
- 最先产生规范,并最为广泛接受的一种语法
- 在各类NARS(Narsese)实现中,最先产生规范,且最广为接受的一种语法
- 基本是各路NARS实现之Narsese语法的**交集**

与其它方言、超集的不同点举例:

- 原子词项:
- 一律使用`$``#``?``^`区分「独立变量」「非独变量」「查询变量」「操作」
- 一律使用单独的`_`表示「像占位符」
- 复合词项:
- 一律使用特殊括弧`{词项...}``[词项...]`表示「外延集」「内涵集」
- 一律使用「圆括号+前缀表达式」`(连接符, 词项...)`形式表示「非外延集、内涵集的复合词项」
-`(&, <A --> B>, ^op)`
- 对「否定」不使用前缀表达式(如`--<A --> B>`
- 对其它「二元复合词项」不使用中缀表达式(如`(A*B)`
- 陈述:
- 一律使用尖括号表示陈述,没有其他选项
-`<A --> B>`
- 不使用「回顾性等价」`<\>`系词
- 一律用表义能力等同的「预测性等价」`</>`系词代替
-`<A <\> B>`将表示为`<B </> A>`
#### Atom 原子词项

- 一律使用`$``#``?``^`区分「独立变量」「非独变量」「查询变量」「操作」
- 一律使用单独的`_`表示「像占位符」
- 一律不在名称中包含特殊符号
-`^goto`(不允许`^go-to`

#### Compound 复合词项

- 一律使用特殊括弧`{词项...}``[词项...]`表示「外延集」「内涵集」
- 一律使用「圆括号+前缀表达式」`(连接符, 词项...)`形式表示「非外延集、内涵集的复合词项」
-`(&, <A --> B>, ^op)`
- 对「否定」不使用前缀表达式
- 对其它「二元复合词项」不使用中缀表达式

#### Statement 陈述

- 一律使用尖括号表示陈述,没有其他选项
-`<A --> B>`
- 不使用「回顾性等价」`<\>`系词
- 一律用表义能力等同的「预测性等价」`</>`系词代替
-`<A <\> B>`将表示为`<B </> A>`

#### Sentence 语句

- 「真值缺省」:解析语句时,允许不输入一部分真值
- 此类真值将在输入具体NARS实现时被补全
- 如:OpenNARS的「默认真值」`%1.0; 0.9%`
- 如:OpenJunars的「默认真值」`%1.0; 0.5%`
- 具体形式
- 单缺省(单真值):f已指定,缺c值
-`A. %1.0%`
- 全缺省(空真值):f、c均未指定
-`A.`

## 代码地图

Expand Down

0 comments on commit 4c738e0

Please # to comment.