all_tokens_from_aois#
- pymovements.measure.reading.all_tokens_from_aois(aois: DataFrame, trial: str | None = None) DataFrame[source]#
Return every AOI token on the page in word-index order.
Includes words, spaces, and punctuation — every row that has a
word_idx. Iftrialis provided and thetrialcolumn is absent fromaois, it is added as a constant column.- Parameters:
aois (pl.DataFrame) – AOI table containing at least the columns
page,word_idx, andword.trial (str | None) – Trial identifier to attach when the
trialcolumn is absent fromaois. IfNoneand the column is already present, it is used as-is. (default: None)
- Returns:
Deduplicated table with columns
trial,page,word_idx, andword, sorted byword_idx.- Return type:
pl.DataFrame