Skip to content

08 – Setting the tense

Kira edited this page Apr 14, 2019 · 1 revision

The following tenses are supported in SimpleNLG German and can be set to a sentence according to the sample code:

  • Present: Default time, no need to set this
  • Preterite: sentence.setFeature(Feature.TENSE, Tense.PAST);
  • Perfect: sentence.setFeature(Feature.TENSE, Tense.PERFECT);. Here, you additionally have the option to set if the perfect should be build with "sein" ("be") or "haben" ("have"). Default is "sein", if you want to have "haben", set the feature verb.setFeature(Feature.PROGRESSIVE, true);
  • Future I: sentence.setFeature(Feature.TENSE, Tense.FUTURE);