OpenCog's parser

From Lojban
Jump to: navigation, search

Features

A parser of a subset of Lojban. Output is in AtomSpace format.

Sample output

mi klama tu

ListLink (stv 1.0 0.0)

  AnchorNode (stv 1.0 0.0) "StatementAnchor"

  ListLink (stv 1.0 0.0)

    AnchorNode (stv 1.0 0.0) "paragraphs"

    ListLink (stv 1.0 0.0)

      AnchorNode (stv 1.0 0.0) "paragraph"

      ListLink (stv 1.0 0.0)

        AnchorNode (stv 1.0 0.0) "statement"

        ContextLink (stv 1.0 0.0)

          SetLink (stv 1.0 0.0)

            ConceptNode (stv 1.0 0.0) "Tnt2pzZy2jZSUhnsUEdd"

          SetLink (stv 1.0 0.0)

            AndLink (stv 1.0 0.0)

              EvaluationLink (stv 0.75 0.9)

                PredicateNode (stv 1.0 0.0) "sumti1"

                ListLink (stv 1.0 0.0)

                  PredicateNode (stv 1.0 0.0) "ZF6FlW7mMInz8eVVqHiF___klama"

                  ConceptNode (stv 1.0 0.0) "TCQ3LYHqrroWialVGsCu___mi"

              EvaluationLink (stv 0.75 0.9)

                PredicateNode (stv 1.0 0.0) "sumti2"

                ListLink (stv 1.0 0.0)

                  PredicateNode (stv 1.0 0.0) "ZF6FlW7mMInz8eVVqHiF___klama"

                  ConceptNode (stv 1.0 0.0) "tK1wbiDWr8EAAWgMd2Bd___tu"

            InheritanceLink (stv 1.0 0.9)

              ConceptNode (stv 1.0 0.0) "tK1wbiDWr8EAAWgMd2Bd___tu"

              ConceptNode (stv 1.0 0.0) "tu"

            ImplicationLink (stv 1.0 0.9)

              PredicateNode (stv 1.0 0.0) "ZF6FlW7mMInz8eVVqHiF___klama"

              PredicateNode (stv 1.0 0.0) "klama"

            InheritanceLink (stv 1.0 0.9)

              ConceptNode (stv 1.0 0.0) "TCQ3LYHqrroWialVGsCu___mi"

              ConceptNode (stv 1.0 0.0) "mi"

How to install

  1. docker pull opencog/opencog-dev:cli
  2. docker run -it opencog/opencog-dev:cli
  3. git clone https://github.com/opencog/opencog
  4. cd opencog/opencog/nlp/lojban/HaskellLib
  5. sudo ldconfig /usr/local/lib/opencog/
  6. stack build
  7. ./run.sh for interactive mode or ./run.sh t for testmode