# evennia.utils.verb_conjugation.conjugate

English verb conjugation

Original Author: Tom De Smedt <tomdesmedt@organisms.be> of Nodebox Refactored by Griatch 2021, for Evennia.

This is distributed under the GPL2 license. See ./LICENSE.txt for details.

The verb.txt morphology was adopted from the XTAG morph_englis.flat: http://www.cis.upenn.edu/~xtag/

`evennia.utils.verb_conjugation.conjugate.``verb_infinitive`(verb)

  Returns the uninflected form of the verb, like ‘are’ -> ‘be’

  Parameters

    verb (str) – The verb to get the uninflected form of.

  Returns

    str – The uninflected verb form of verb.

`evennia.utils.verb_conjugation.conjugate.``verb_conjugate`(verb, tense='infinitive', negate=False)

  Inflects the verb to the given tense.

  Parameters

    - verb (str) – The single verb to conjugate.

    - tense (str) – The tense to convert to. This can be given either as a long or short form - “infinitive” (“inf”) - be - “1st/2nd/3rd singular present” (“1/2/3sgpres”) - am/are/is - “present plural” (“pl”) - are - “present participle” (“prog”) - being - “1st/2nd/3rd singular past” (“1/2/3sgpast”) - was/were/was - “past plural” (“pastpl”) - were - “past” - were - “past participle” (“ppart”) - been

    - negate (bool) – Negates the verb. This only supported for a limited number of verbs: be, can, do, will, must, have, may, need, dare, ought.

  Returns

    str – The conjugated verb. If conjugation fails, the original verb is returned.

  Examples

  The verb ‘be’: - present: I am, you are, she is, - present participle: being, - past: I was, you were, he was, - past participle: been, - negated present: I am not, you aren’t, it isn’t.

`evennia.utils.verb_conjugation.conjugate.``verb_present`(verb, person='', negate=False)

  Inflects the verb in the present tense.

  Parameters

    - person (str or int) – This can be 1, 2, 3, “1st”, “2nd”, “3rd”, “plural” or “*”.

    - negate (bool) – Some verbs like be, have, must, can be negated.

  Returns

    str – The present tense verb.

  Example

  had -> have

`evennia.utils.verb_conjugation.conjugate.``verb_present_participle`(verb)

  Inflects the verb in the present participle.

  Parameters

    verb (str) – The verb to inflect.

  Returns

    str – The inflected verb.

  Examples

  give -> giving, be -> being, swim -> swimming

`evennia.utils.verb_conjugation.conjugate.``verb_past`(verb, person='', negate=False)

  Inflects the verb in the past tense.

  Parameters

    - verb (str) – The verb to inflect.

    - person (str, optional) – The person can be specified with 1, 2, 3, “1st”, “2nd”, “3rd”, “plural”, “*”.

    - negate (bool, optional) – Some verbs like be, have, must, can be negated.

  Returns

    str – The inflected verb.

  Examples

  give -> gave, be -> was, swim -> swam

`evennia.utils.verb_conjugation.conjugate.``verb_past_participle`(verb)

  Inflects the verb in the present participle.

  Parameters

    verb (str) – The verb to inflect.

  Returns

    str – The inflected verb.

  Examples

  give -> given, be -> been, swim -> swum

`evennia.utils.verb_conjugation.conjugate.``verb_all_tenses`()

  Get all all possible verb tenses.

  Returns

    list – A list if string names.

`evennia.utils.verb_conjugation.conjugate.``verb_tense`(verb)

  Returns a string from verb_tenses_keys representing the verb’s tense.

  Parameters

    verb (str) – The verb to check the tense of.

  Returns

    str – The tense.

  Example

  given -> “past participle”

`evennia.utils.verb_conjugation.conjugate.``verb_is_tense`(verb, tense)

  Checks whether the verb is in the given tense.

  Parameters

    - verb (str) – The verb to check.

    - tense (str) – The tense to check.

  Returns

    bool – If verb matches given tense.

`evennia.utils.verb_conjugation.conjugate.``verb_is_present`(verb, person='', negated=False)

  Checks whether the verb is in the present tense.

  Parameters

    - verb (str) – The verb to check.

    - person (str) – Check which person.

    - negated (bool) – Check if verb was negated.

  Returns

    bool – If verb was in present tense.

`evennia.utils.verb_conjugation.conjugate.``verb_is_present_participle`(verb)

  Checks whether the verb is in present participle.

  Parameters

    verb (str) – The verb to check.

  Returns

    bool – Result of check.

`evennia.utils.verb_conjugation.conjugate.``verb_is_past`(verb, person='', negated=False)

  Checks whether the verb is in the past tense.

  Parameters

    - verb (str) – The verb to check.

    - person (str) – The person to check.

    - negated (bool) – Check if verb is negated.

  Returns

    bool – Result of check.

`evennia.utils.verb_conjugation.conjugate.``verb_is_past_participle`(verb)

  Checks whether the verb is in past participle.

  Parameters

    verb (str) – The verb to check.

  Returns

    bool – The result of the check.

`evennia.utils.verb_conjugation.conjugate.``verb_actor_stance_components`(verb)

  Figure out actor stance components of a verb.

  Parameters

    verb (str) – The verb to analyze

  Returns

    tuple –

    The 2nd person (you) and 3rd person forms of the verb,

      in the same tense as the ingoing verb.