-
Notifications
You must be signed in to change notification settings - Fork 8
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
xubowen
committed
Feb 16, 2022
1 parent
cb893be
commit dd5a5c7
Showing
174 changed files
with
748 additions
and
577 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 |
---|---|---|
|
@@ -5,7 +5,7 @@ __pycache__/ | |
Tests/*.png | ||
*.pkl | ||
./utils/SparseLUT | ||
|
||
temp/ | ||
# C extensions | ||
*.so | ||
|
||
|
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
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 |
---|---|---|
@@ -0,0 +1,22 @@ | ||
The MIT License | ||
|
||
Copyright (c) 2022 PyNARS authors | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining | ||
a copy of this software and associated documentation files (the | ||
"Software"), to deal in the Software without restriction, including | ||
without limitation the rights to use, copy, modify, merge, publish, | ||
distribute, sublicense, and/or sell copies of the Software, and to | ||
permit persons to whom the Software is furnished to do so, subject to | ||
the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be | ||
included in all copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, | ||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF | ||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND | ||
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE | ||
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION | ||
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION | ||
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. |
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 |
---|---|---|
@@ -0,0 +1,5 @@ | ||
include requirements.txt | ||
include pynars/*.json | ||
include pynars/utils/SparseLUT/*.pyd | ||
include pynars/utils/SparseLUT/*.pyi | ||
include pynars/Narsese/Parser/*.lark |
This file was deleted.
Oops, something went wrong.
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,40 +1,41 @@ | ||
# PyNARS | ||
|
||
#### 介绍 | ||
Python implementation of NARS (Non-Axiomatic-Reasoning-System). | ||
References: | ||
OpenNARS 3.0.4, | ||
Design Report of OpenNARS 3.1.0 | ||
#### Description | ||
Python implementation of NARS (Non-Axiomatic-Reasoning-System) | ||
|
||
#### 软件架构 | ||
软件架构说明 | ||
Reference: | ||
- OpenNARS 3.0.4, | ||
- The Design Report of OpenNARS 3.1.0 | ||
|
||
|
||
#### 安装教程 | ||
#### Environments | ||
|
||
1. xxxx | ||
2. xxxx | ||
3. xxxx | ||
- Python version: 3.7.10. | ||
- Only tested under this version, however, Python 3.7 and higher versions maybe acceptable. | ||
- OS: Windows 10. | ||
- Only tested under this OS, however, other OS might be ok. | ||
- Packages Requirements: see `requirements.txt`. | ||
- It is noted that the version of the python package `tqdm` should be no higher than 3.1.4, otherwise the color display would be abnormal. This is because of a bug of `tqdm`, which leads to conflicts between `sty` and `tqdm` and cause unexpected color display of `sty`. However, this constraints is not necessary, i.e., higher version of `tqdm` is ok if you don't mind abnormal display occuring. The abnormal case only occur when you first run the PyNARS when SparseLUT (Sparse Look-Up Table) is built. | ||
|
||
#### 使用说明 | ||
#### Installation | ||
|
||
1. xxxx | ||
2. xxxx | ||
3. xxxx | ||
|
||
#### 参与贡献 | ||
pip install pynars | ||
|
||
1. Fork 本仓库 | ||
2. 新建 Feat_xxx 分支 | ||
3. 提交代码 | ||
4. 新建 Pull Request | ||
|
||
#### Instructions | ||
|
||
#### 特技 | ||
1. Copy the file `pynars/config.json` to your workspace-directory. *(Optional)* | ||
2. In the workspace-directory, run cmd `python -m pynars.Console`. To execute an `*.nal` file, run cmd `python -m pynars.Console <your-file-name.nal>` | ||
3. Input Narsese in the console, input an positive integer to run a number of cycles, or input a comment which is a string with `'` as the beginning, e.g. `' your comment`. | ||
4. Press `ctrl`+`C` to exit. | ||
|
||
1. 使用 Readme\_XXX.md 来支持不同的语言,例如 Readme\_en.md, Readme\_zh.md | ||
2. Gitee 官方博客 [blog.gitee.com](https://blog.gitee.com) | ||
3. 你可以 [https://gitee.com/explore](https://gitee.com/explore) 这个地址来了解 Gitee 上的优秀开源项目 | ||
4. [GVP](https://gitee.com/gvp) 全称是 Gitee 最有价值开源项目,是综合评定出的优秀开源项目 | ||
5. Gitee 官方提供的使用手册 [https://gitee.com/help](https://gitee.com/help) | ||
6. Gitee 封面人物是一档用来展示 Gitee 会员风采的栏目 [https://gitee.com/gitee-stars/](https://gitee.com/gitee-stars/) | ||
#### Contribution | ||
|
||
1. Fork the repository | ||
2. Create Feat_xxx branch | ||
3. Commit your code | ||
4. Create Pull Request | ||
|
||
|
||
**Note:** This document will be imporved in the future. |
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 |
---|---|---|
@@ -0,0 +1,38 @@ | ||
# PyNARS | ||
|
||
#### 介绍 | ||
Python implementation of NARS (Non-Axiomatic-Reasoning-System). | ||
|
||
Reference: | ||
- OpenNARS 3.0.4, | ||
- The Design Report of OpenNARS 3.1.0 | ||
|
||
|
||
#### 运行环境 | ||
|
||
- Python版本: 3.7.10. | ||
- 只有这个版本被测试过,但Python 3.7以及更高的版本应该都可以接受。 | ||
- 操作系统: Windows 10. | ||
- 仅在这个操作系统下做过测试,但其他的操作系统或许也可以。 | ||
- 依赖包: 见`requirements.txt`. | ||
- 请注意包`tqdm` 的版本不应超过3.1.4,否则颜色显示可能会异常。这是因为高版本`tqdm`中的BUG会导致包`sty`和`tqdm`之间的冲突,`sty`的颜色显示会出现错误。然而,这一约束不是必须的,即如果你不介意颜色显示异常则高版本的`tqdm`也可接受。异常显示只有在第一次运行PyNARS过程中构建稀疏查找表(SparseLUT)时出现。 | ||
|
||
#### 安装教程 | ||
|
||
|
||
pip install pynars | ||
|
||
|
||
#### 使用说明 | ||
|
||
1. 复制文件`pynars/config.json`到你的工作目录。 *(可选)* | ||
2. 在工作目录下,运行命令`python -m pynars.Console`。若需要运行`*.nal`文件,则运行命令`python -m pynars.Console <文件名.nal>`。 | ||
3. 在控制台中输入纳思语(Narsese),输入正整数运行一定的推理周期,或输入`'`开头的字符串作为i注释(例如`' 这是一条注释`)。 | ||
4. 按下`ctrl`+`C`退出。 | ||
|
||
#### 参与贡献 | ||
|
||
1. Fork 本仓库 | ||
2. 新建 Feat_xxx 分支 | ||
3. 提交代码 | ||
4. 新建 Pull Request |
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
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
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
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
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
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
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
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
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
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
Oops, something went wrong.