Skip to content

syntax-tree/nlcst

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 

Repository files navigation

NLCST

Natural language for human and machine.

NLCST discloses the parts of natural language as a concrete syntax tree. Concrete means all information is stored in this tree and an exact replica of the original document can be re-created.

NLCST is a subset of Unist, and implemented by retext.

This document describes version 1.0.0 of NLCST. Changelog »

Table of Contents

CST

Root

Root (Parent) houses all nodes.

interface Root <: Parent {
  type: "RootNode";
}

Paragraph

Paragraph (Parent) represents a self-contained unit of discourse in writing dealing with a particular point or idea.

interface Paragraph <: Parent {
  type: "ParagraphNode";
}

Sentence

Sentence (Parent) represents grouping of grammatically linked words, that in principle tells a complete thought, although it may make little sense taken in isolation out of context.

interface Sentence <: Parent {
  type: "SentenceNode";
}

Word

Word (Parent) represents the smallest element that may be uttered in isolation with semantic or pragmatic content.

interface Word <: Parent {
  type: "WordNode";
}

Symbol

Symbol (Text) represents typographical devices like white space, punctuation, signs, and more, different from characters which represent sounds (like letters and numerals).

interface Symbol <: Text {
  type: "SymbolNode";
}

Punctuation

Punctuation (Symbol) represents typographical devices which aid understanding and correct reading of other grammatical units.

interface Punctuation <: Symbol {
  type: "PunctuationNode";
}

WhiteSpace

WhiteSpace (Symbol) represents typographical devices devoid of content, separating other grammatical units.

interface WhiteSpace <: Symbol {
  type: "WhiteSpaceNode";
}

Source

Source (Text) represents an external (ungrammatical) value embedded into a grammatical unit: a hyperlink, a line, and such.

interface Source <: Symbol {
  type: "SourceNode";
}

TextNode

TextNode (Text) represents actual content in an NLCST document: one or more characters. Note that its type property is TextNode, but it is different from the asbtract Text interface.

interface TextNode < Text {
    type: "TextNode";
}

List of Utilities

In addition, see Unist for other utilities which work with retext nodes.

License

MIT © Titus Wormer

About

Natural Language Concrete Syntax Tree format

Topics

Resources

Code of conduct

Security policy

Stars

Watchers

Forks

Contributors 3

  •  
  •  
  •