NlgTools

NlgTools #

The NlgTools object is the entry point to the CoreNLG world.

Constructor #

The constructor takes 2 parameters:

  • lang: the language of the resources to check for automatic contractions and typographical convention handling (default: ‘fr’)
  • freeze: a boolean indicating if the engine should freeze the synonyms (i.e it will always take the first one in the provided list). It’s useful for test purpose (default: False)
nlg_en = NlgTools(lang='en')
nlg_fr_frozen = NlgTools(lang='fr', freeze=True)