labvanced logoLabVanced
  • Research
    • Publications
    • Researcher Interviews
    • Use Cases
      • Developmental Psychology
      • Linguistics
      • Clinical & Digital Health
      • Educational Psychology
      • Cognitive & Neuro
      • Social & Personality
      • Arts Research
      • Sports & Movement
      • Marketing & Consumer Behavior
      • Economics
      • HCI / UX
      • Commercial / Industry Use
    • Labvanced Blog
    • Services
  • Technology
    • Feature Overview
    • Code-Free Study Building
    • Eye Tracking
    • Mouse Tracking
    • Generative AI Integration
    • Multi User Studies
    • More ...
      • Reaction Time/Precise Timing
      • Text Transcription
      • Heart Rate Detection (rPPG)
      • Emotion Detection
      • Questionnaires/Surveys
      • Experimental Control
      • Data Privacy & Security
      • Desktop App
      • Mobile App
  • Learn
    • Guide
    • Videos
    • Walkthroughs
    • FAQ
    • Release Notes
    • Documents
    • Classroom
  • Experiments
    • Cognitive Tests
    • Sample Studies
    • Public Experiment Library
  • Pricing
    • Licenses
    • Top-Up Recordings
    • Subject Recruitment
    • Study Building
    • Dedicated Support
    • Checkout
  • About
    • About Us
    • Contact
    • Downloads
    • Careers
    • Impressum
    • Disclaimer
    • Privacy & Security
    • Terms & Conditions
    • Third-Party Licenses
  • Appgo to app icon
  • Logingo to app icon
Learn
Guide
Videos
Walkthroughs
FAQ
Newsletter Archive
Documents
Classroom
  • 中國人
  • Deutsch
  • Français
  • Español
  • English
  • 日本語
Guide
Videos
Walkthroughs
FAQ
Newsletter Archive
Documents
Classroom
  • 中國人
  • Deutsch
  • Français
  • Español
  • English
  • 日本語
  • Guide
    • GETTING STARTED

      • Task Editor
      • Frames
        • Canvas Frame
        • Page Frame
        • Website Frame
      • Trial Timeline
      • Stimulus Presentation
      • Correctness of Response
      • Objects
      • Events
      • Variables
      • Task Wizard
      • Trial System
      • Experiment Design
        • Creating a Study
        • Data Frame Patterns
        • Multi-user Experiment Design
        • Longitudinal Experiment Design
    • FEATURED TOPICS

      • Randomization & Balance
      • Eye Tracking
        • Presenting Stimuli in an Eye Tracking Task
        • How to Choose Eye Tracking Calibration Settings
        • Setting Up Eye Tracking in a Task
        • Recording and Exporting Gaze Data
        • Using Shapes as Areas of Interest (AOI) for Eye Tracking
        • The Participant Calibration Experience
      • Web Bridge
        • Selecting Website AOIs | Anchor, Adjust, and Verify AOI Tracking
        • Tracking Mouse Behavior on a Website AOI | Web Bridge Guide
      • Questionnaires
      • Desktop App
      • Sample Studies
      • Participant Recruitment
      • API Access
        • REST API
        • Webhook API
        • WebSocket API
      • Other Topics

        • Precise Stimulus Timings
        • Multi User Studies
        • Head Tracking in Labvanced | Guide
    • MAIN APP TABS

      • Overview: Main Tabs
      • Dashboard
      • My Studies
      • Shared Studies
      • My Files
      • Experiment Library
      • My Account
      • License & Services
    • STUDY TABS

      • Overview: Study-Specific Tabs
      • Study Design
        • Tasks
        • Blocks
        • Sessions
        • Groups
      • Task Editor
        • Task Controls
        • The Trial System
        • Frame Types
        • Objects
        • Object Property Tables
        • Variables
        • System Variables Table
        • The Event System
        • Text Editor Functions
        • Eye Tracking Options in the Task Editor
        • Head Tracking in a Task
        • Multi-User Studies
      • Settings
      • Variables
      • Media
      • Texts & Translate
      • Launch & Participate
      • Subject Management
      • Dataview and Export
        • Dataview and Variable & Task Selection (OLD Version)
        • Accessing Recordings (OLD Version)
  • Videos
    • Video Overview
    • Getting Started in Labvanced
    • Creating Tasks
    • Element Videos
    • Events & Variables
    • Advanced Topics
  • Walkthroughs
    • Introduction
    • Stroop Task
    • Lexical Decision Task
    • Posner Gaze Cueing Task
    • Change Blindness Flicker Paradigm
    • Eye-tracking Sample Study
    • Infant Eye-tracking Study
    • Attentional Capture Study with Mouse Tracking
    • Rapid Serial Visual Presentation
    • ChatGPT Study
    • Eye Tracking Demo: SVGs as AOIs
    • Multi-User Demo: Show Subjects' Cursors
    • Gamepad / Joystick Controller- Basic Set Up
    • Desktop App Study with EEG Integration
    • Between-subjects Group Balancing and Variable Setup
    • Building a Multi-user Study
    • Website Frame Eye Tracking Walkthrough
    • Conditional Webcam Eye Tracking
    • Text Segmentation Study Building
  • FAQ
    • Features
    • Support Policy & Guidelines
    • Security & Data Privacy
    • Licensing
    • Precision of Labvanced
    • Programmatic Use & API
    • Using Labvanced Offline
    • Troubleshooting
    • Study Creation Questions
  • Newsletter Archive
  • Documents
  • Classroom
Text Segmentation Object in the Labvanced task editor showing a sentence with a per-word area of interest box around each word

Text Segmentation Object

The Text Segmentation Object splits a sentence into one area of interest per word. Link a CSV upload, an existing data frame, or an array variable as the text source, one sentence per trial, and every word gets its own measured box automatically, no manual AOI placement. With webcam eye tracking enabled, it also records five gaze metrics per word.

Table of Contents

  • Adding the Text Segmentation Object
  • Text Segmentation Setup Wizard
  • Object Properties
  • Linking a Text Source
  • Events Integration
  • Open Materials and Study Examples
  • Further Reading

Adding the Text Segmentation Object

In the task editor toolbar, open the Text group and select Text Segmentation Object to add it to the current frame. It sits alongside Display Text, Display HTML, and Display Variable.

Labvanced task editor toolbar with the Text group open and Text Segmentation Object highlighted

Text Segmentation Setup Wizard

Adding the object opens a setup wizard with two screens: the first sets the text source, the second asks how the row is selected and what to record.

First screen: set the text source. Choose one of three options:

Text Segmentation Setup wizard's first screen, showing the Set Text Source radio options

OptionWhat it does
Upload a CSV file of sentencesParses the file into a new data frame, one row shown per trial.
Assign text from a variableLinks an existing data frame, or an array holding one trial's words.
Do not set the text sourceCloses the wizard without linking anything; set one later via Set Text Source… in Object Properties.

Selecting a file for the CSV option opens an Additional Options dialog with three checkboxes, all unchecked by default: Map strings to files (irrelevant here, since the cells hold plain text rather than filenames), Use first row as header (check this only if the first row names the columns instead of holding the first sentence), and Transpose data (check this if sentences run across columns instead of down rows).

Second screen: row index and recording. This screen opens once a source is linked, confirming it under Text is read from:. For a data frame source, it also asks how the row (sentence) is selected per trial:

OptionBehavior
Use Trial_Id as row indexRandomized order, determined by the experiment's randomization.
Use Trial_Nr as row indexFixed order, matching the trial sequence.
Select a variable as row indexUse any custom variable to control which row shows.

An array source skips this question entirely, since an array already holds one trial's words directly. The screen then asks what to record. See Events Integration for what each checkbox creates and a preview of the resulting data.

Text Segmentation Setup wizard's second screen, showing the row index options and the Record checkboxes

CheckboxDefaultWhat it creates
Record the x, y, width and height of every word on each trialCheckedA data frame variable and an event that writes the AOI geometry at the start of every frame.
Record eyetracking metrics for every word on each trialUncheckedA data frame variable and an event that writes dwell time, fixation counts, and timing at the end of every frame.

Note

Checking Record eyetracking metrics for every word on each trial also turns on fixation detection for the whole task and sets fixations to conclude at frame end, so the last fixation on a word is complete by the time the metrics are written. Both changes apply task-wide, not just to this object, and the wizard states this before you opt in.

Once set up, the object renders one word per cell and starts recording automatically:

Text Segmentation Object in Grid layout showing a stimulus sentence split into one cell per word, with the Record Text Segment AOIs event on the frame
A stimulus sentence rendered with Grid layout, one word per cell. The record text segmentation event in the Events panel on the right is the automatically created On Frame Start trigger recording each word's AOI geometry.

Object Properties

All settings below are found in the Object Properties panel when the Text Segmentation Object is selected.

PropertyDescription
Text SourceThe linked CSV, data frame, or array variable. Click Set Text Source… to relink it.
Row IndexThe variable controlling which row (sentence) displays on the current trial.
Row Index OffsetAdded to the row index value. Row numbers are 1-based in Labvanced, so the default of -1 maps the first trial to the first row. Only change this if your row variable is counted differently.
Preview RowData frame sources only. Which sentence to draw on the canvas while editing; does not affect what participants see, since that depends on randomization.
Recorded IntoThe data frame variable receiving the object's own linked data.
Split cells on whitespaceOff by default when the spreadsheet already holds one word per column. Turn on to split each cell's text into separate words automatically.
LayoutFlow wraps words at the element's width and records each word's own glyph box. Grid places words into equal-width columns and records the whole cell, so AOIs tile the element with no gaps or overlaps.
Max RowsThe maximum number of wrapped lines the element allows before showing a warning in the editor.
ColumnsGrid layout only. Words per row. 0 uses as few columns as fit the text within Max Rows.
Word AlignmentGrid layout only. Horizontal and vertical alignment of each word's glyphs inside its cell. Does not change the recorded AOI, which is always the full cell.
Gap Between Cells / Margin Between WordsX and Y spacing, in frame units. Labeled Gap Between Cells in grid layout, Margin Between Words in flow layout.
AOI PaddingFlow layout only. Grows each word's recorded box beyond its glyphs, in frame units per side. Not available in grid layout, where growing the box would overlap the next word's cell.
FontFont family, size, and color for the rendered words.
Sentence AlignmentFlow layout only. Horizontal and vertical alignment of the whole sentence within the element.
Show AOI boxes in playerWhen checked, draws each word's AOI box on screen during the study, useful for checking coverage while building.
Stimulus InfoFree-text field for notes about the current stimulus, not shown to participants.

Linking a Text Source

The CSV-to-data-frame path is the fastest way to bring an existing stimulus set in, whether through the setup wizard's first step or later through Set Text Source… in Object Properties: a spreadsheet with one sentence per row and, with Split cells on whitespace off, one word per column imports with ragged row lengths supported, shorter rows simply have fewer words measured. A trailing punctuation mark can stay attached to the sentence's last word as its own cell.

Linking an existing data frame works the same way once the data frame already exists in the experiment, useful when the same stimulus set feeds multiple objects. An array variable is the simplest option for a single-sentence study, since it skips the data frame step entirely.

Events Integration

Two dedicated actions record the object's data. Both need a Target (the frame element holding the Text Segmentation Object) and a Variable (the data frame receiving the table). Both actions are created automatically if you check the corresponding box in the setup wizard.

ActionWhat it recordsWhen to fire it
Record Text Segment AOIsWord, line, and position/size geometry, one row per word.Typically at frame start, re-measures the rendered words so the table matches what was on screen.
Record Text Segment Eyetracking MetricsDwell time, total fixations, total fixation duration, time to first fixation, and mean fixation duration, one row per word.At frame end, once the frame's fixations are final. Requires webcam eye tracking enabled.

A word that was never fixated keeps its row in the metrics table with zeros across every column, rather than a blank cell. Filter on total_fixations > 0 before averaging a time column, since a zero does not distinguish "never looked at" from "fixated at exactly frame onset."

An example of the events added around a reading study using the Text Segmentation Object with webcam eye tracking, to progress between trials, can be seen in Step 5: Set Up Trial Progression of the companion walkthrough.

Data Preview

The following images represent the data captured from these two automated events.

AOI geometry data frame recorded by Record Text Segment AOIs, one row per word
The AOI geometry table from Record Text Segment AOIs: each word's index, text, line, and bounding box (x, y, width, height), one row per word in the sentence.
Eyetracking metrics data frame recorded by Record Text Segment Eyetracking Metrics, one row per word
The eyetracking metrics table from Record Text Segment Eyetracking Metrics: dwell time, fixation counts, and timing per word, matched to the AOI table above by the same word_index.

Open Materials and Study Examples

Self-Paced Reading Study (Text Segmentation Object - Demo)

See the Text Segmentation Object in a real study: ten sentences, one per trial, with per-word AOI geometry and eye tracking metrics recorded automatically.

Further Reading

Text Segmentation technology overview page

Text Segmentation Technology

The capability overview: mechanism, data output, and research use cases.

Walkthrough of building a reading study with the Text Segmentation Object

Building a Reading Study

A real word-frequency reading study built step by step with this object.

All Objects

A full index of all objects available in the Labvanced experiment editor.