home << dhlab reference << dhlab.api.dhlab_api

word_variant#

from dhlab.api.dhlab_api import word_variant
word_variant(word, form, lang='nob')[source]#

Find alternative form for a given word form.

Call the API BASE_URL endpoint /variant_form

Example: word_variant('spiste', 'pres-part')

Parameters:
  • word (str) – any word string

  • form (str) – a morphological feature tag from the Norwegian wordbank “Orbanken”.

  • lang (str) – either “nob” or “nno”