ProfileDesc

class graf.ProfileDesc(**kwargs)

Class that represents the descriptions of the file containing the primary data document.

__init__(**kwargs)

Class’s constructor.

catRef : str
One or more categories defined in the resource header.
subject : str
Topic of the primary data.
domain : str
Primary domain of the data.
subdomain : str
Subdomain of the data.
languages : array_like
Array that contains the codes of the language(s) of the primary data. The codes should be in the ISO 639.
participants : array_like
Array that contains the participants in an interaction. Each person is a dict element and the keys are ‘age’, ‘sex’, ‘role’ and ‘id’ - Identifier for reference from annotation documents. The ‘id’ key is mandatory.
settings : array_like
Array that contains the settings within which a language interaction takes place. Each settings is a dictionary and the keys are ‘who’, ‘time’, ‘activity’ and ‘locale’.
add_language(language_code)

This method is responsible to add the annotations to the list of languages.

The language list in this class will represents the language(s) that the primary data use.

language_code : str
ISO 639 code(s) for the language(s) of the primary data.
add_participant(id, age=None, sex=None, role=None)

This method is responsible to add the annotations to the list of participants.

The parcipant list in this class will represents participants in an interaction with the data manipulated in the files pointed by the header.

A participant is a person in this case and it’s important and required to give the id.

id : str
Identifier for reference from annotation documents.
age : int
Age of the speaker.
role : str
Role of the speaker in the discourse.
sex : str
One of male, female, unknown.
add_setting(who, time, activity, locale)

This method is responsible to add the annotations to the list of settings.

The setting list in this class will represents the setting or settings within which a language interaction takes place, either as a prose description or a series of setting elements.

A setting is a particular setting in which a language interaction takes place.

who : str
Reference to person IDs involved in this interaction.
time : str
Time of the interaction.
activity : str
What a participant in a language interaction is doing other than speaking.
locale : str
Place of the interaction, e.g. a room, a restaurant, a park bench.