Quickstart

Quickstart #

Install CoreNLG #

To use this library you will need to have Python installed. If you don’t already have Python installed please follow the official installation guide.

You can install the latest version of the library using the pip command:

pip install CoreNLG

Hello World #

from CoreNLG.NlgTools import NlgTools
from CoreNLG.PredefObjects import TextVar

nlg = NlgTools()

text = TextVar(
  "Hello",
  nlg.nlg_syn("world", "everyone"),
  "!"
)

nlg.write_text(text)

print(nlg.text)

"""
Possible outputs are:
- Hello world!
- Hello everyone!
"""

This is a basic example showing the use of:

  • NlgTools which is the object from which CoreNLG functions are called
  • TextVar which ease the concatenation of strings