Text

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

Bases: ShallowDataValue

Monolingual text.

Parameters:
  • content – Text content.

  • language – Language.

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 | Text | String | str | None = None) None[source]
property language: str

The language of text.

get_language() str[source]

Gets the language of text.

Returns:

Language.

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

Bases: ShallowDataValueTemplate

Text template.

Parameters:
  • content – Text content or string variable.

  • language – Language 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 of text template.

get_language() StringVariable | str[source]

Gets the language of text template.

Returns:

Language or string variable.

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

Bases: ShallowDataValueVariable

Text variable.

Parameters:

name – Name.

object_class

alias of Text

class TextDatatype(datatype_class: TDatatype | None = None)[source]

Bases: Datatype

Text datatype.

instance: ClassVar[TextDatatype] = TextDatatype()

Singleton instance of this datatype class.

value_class

alias of Text