Text

class Text(*args, **kwargs)[source]

Bases: ShallowDataValue

Monolingual text.

Parameters:
  • content – Text content.

  • language – Language tag.

datatype_class

alias of TextDatatype

datatype: ClassVar[TextDatatype] = TextDatatype()

Datatype associated with this value class.

template_class

alias of TextTemplate

variable_class

alias of TextVariable

__init__(content: Variable | Text | String | str, language: Variable | String | str | None = None) None[source]
property language: str

The language tag of text.

get_language() str[source]

Gets the language tag of text.

Returns:

Language tag.

class TextTemplate(*args, **kwargs)[source]

Bases: ShallowDataValueTemplate

Text template.

Parameters:
  • content – Text content or string variable.

  • language – Language tag or string variable.

object_class

alias of Text

__init__(content: Variable | Text | String | str, language: Variable | String | str | None = None) None[source]
property language: StringVariable | str

The language tag of text template.

get_language() StringVariable | str[source]

Gets the language tag of text template.

Returns:

Language tag or string variable.

class TextVariable(name: str, variable_class: type[Variable] | type[Term] | None = None)[source]

Bases: ShallowDataValueVariable

Text variable.

Parameters:

name – Name.

object_class

alias of Text