write_text

write_text #

The write_text method draws synonyms and handles post evaluations on the text provided as argument then saves the text in the NlgTools object allowing its acces via the text property.

Parameters #

The method takes a string as parameter.

nlg = NlgTools(lang='en')

text = TextVar(
  nlg.nlg_syn('My name is', 'I am'),
  'John.'
)

nlg.write_text(text)
print(nlg.text)
# My name is John.
# I am John.