From 26bc1f60bff204a4db88b905d3e8bff5cbf56241 Mon Sep 17 00:00:00 2001 From: ARCJ137442 <61109168+ARCJ137442@users.noreply.github.com> Date: Sat, 26 Aug 2023 20:35:20 +0800 Subject: [PATCH] docs(README): :memo: translate README into English --- README-en.md | 65 ++++++++++++++++++++++++++++++++++++++++++++++++++++ README.md | 13 +++++++++-- 2 files changed, 76 insertions(+), 2 deletions(-) create mode 100644 README-en.md diff --git a/README-en.md b/README-en.md new file mode 100644 index 0000000..8eeb269 --- /dev/null +++ b/README-en.md @@ -0,0 +1,65 @@ +# JuNarsese + +[中文](https://github.com/ARCJ137442/JuNarsese.jl/blob/main/README.md) | **English** + +[![Conventional Commits](https://img.shields.io/badge/Conventional%20Commits-1.0.0-%23FE5196?logo=conventionalcommits&logoColor=white)](https://conventionalcommits.org) +[![Static Badge](https://img.shields.io/badge/julia-package?logo=julia&label=1.8%2B)](https://julialang.org/) + +This project uses [Semantic Versioning 2.0.0](https://semver.org/) for version management. + +A [Julia](https://github.com/JuliaLang/julia) implementation of Narsese (the knowledge representation language of NARS) + +- Provides data structure representation, access, and conversion support for other libraries that use Narsese + +## Overview + +JuNarsese contains two main modules: + +- **Narsese**: Data structures of Narsese + - Terms (NAL-1 ~ NAL-8) + - Statements (punctuation, truth value, timestamp) +- **Conversion**: For converting between data structures + - Provides parser API + - Abstract parser type + - "Type-based parser" and "object-based parser" + - Implements the conversion between the above data structures and the following common structures + - String + - AST (abstract syntax tree, corresponding to Julia type `Expr`) + - Native (native julia types including `Dict` and `Vector`) + +## Installation + +As a **Julia package**, you only need to: + +1. With the `Pkg` package manager installed, +2. Run the following code in REPL (`julia.exe`): + +```julia +using Pkg +Pkg.add(url="https://github.com/ARCJ137442/JuNarsese.jl") +``` + +In REPL, by press key `]`, you also can: + +```REPL +(v1.8) pkg> add https://github.com/ARCJ137442/JuNarsese.jl +``` + +## Author's note + +1. The project was initially for personal learning and research, some development standards may be lacking +2. The project was also used as a personal experiment project for learning Julia, the code contains a lot of comments and notes +3. Due to the lack of relevant information, some of the syntax parsing may not achieve the best results (such as LaTeX) +4. As of August 2023, the project has not been applied to any complete project that implements NARS (the code may be refactored in the future) + +## Future outlook + +- Project development standards integration +- Data structure performance optimization +- Provide extensible API for Narsese module + +## References + +- [OpenJunars](https://github.com/AIxer/OpenJunars) +- [OpenNARS](https://github.com/opennars/opennars) +- [PyNARS](https://github.com/bowen-xu/PyNARS) diff --git a/README.md b/README.md index 888fdf4..0f5ae13 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,7 @@ # JuNarsese +**中文** | [English](https://github.com/ARCJ137442/JuNarsese.jl/blob/main/README_en.md) + [![Conventional Commits](https://img.shields.io/badge/Conventional%20Commits-1.0.0-%23FE5196?logo=conventionalcommits&logoColor=white)](https://conventionalcommits.org) [![Static Badge](https://img.shields.io/badge/julia-package?logo=julia&label=1.8%2B)](https://julialang.org/) @@ -22,11 +24,12 @@ JuNarsese包含两个主要模块: - 「基于类型的解析器」与「基于对象的解析器」 - 实现上述数据结构与以下常用结构的相互转化 - 字符串 - - AST(抽象语法树) + - AST(抽象语法树,对应Julia的`Expr`类型) + - 原生(Julia的原生类型,包括`Dict`与`Vector`) ## 安裝 -作为一个**Julia包**,您只需: +作为一个**Julia包**,只需: 1. 在安装`Pkg`包管理器的情况下, 2. 在REPL(`julia.exe`)运行如下代码: @@ -36,6 +39,12 @@ using Pkg Pkg.add(url="https://github.com/ARCJ137442/JuNarsese.jl") ``` +在REPL,通过按下 `]` 键,同样可以: + +```REPL +(v1.8) pkg> add https://github.com/ARCJ137442/JuNarsese.jl +``` + ## 作者注 1. 项目最初仅作个人学习研究,一些开发规范可能欠缺