-
Notifications
You must be signed in to change notification settings - Fork 23
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
integrate text stimulus into GazeDataFrame #526
Comments
what was your idea here? OCR of the images provided? |
this refers to the slides of my pitch presentation last week |
Regarding the integration of text stimuli, I would propose the following design: Types of stimuliWe can expect to encounter different kinds of stimuli during further development. Apart from We will focus on Use CaseWhen designing the integration of text stimuli into pymovements we need to focus on which types of results need the consideration of stimulus data. For all types of stimuli we will probably have some kind of AOI representation. We will focus on computing measures for rectangular AOIs first. Name spaceCreate a new pymovements.stimulus.text # has TextStimulus
pymovements.stimulus.image # has ImageStimulus
pymovements.stimulus.video # has VideoStimulus Class compositionThe
Loading stimulus dataLoading stimulus data using an interface like this: stimulus = pymovements.stimulus.text.from_files(
text='path/to/text/file.txt',
aoi='path/to/aoi.csv',
image='optional/path/to/image.jpg',
) AOI mappingThe mapping can be a polars dataframe with the columns:
The index must be ordered always. It can potentially have additional columns
Integration into GazeDataFrameEach gaze = pymovements.GazeDataFrame(
...
stimulus=stimuls,
)
gaze = pymovements.from_file(
path='/path/to/gaze.csv',
stimulus=stimulus,
) Computing measures for AOIsgaze.compute_aoi_measure('first fixation duration', level='word') Caveatsmulti character aoisI'm not sure, but maybe the index in the AOI mapping can support both an integer or a tuple/slice? multi page text stimuliI'm unsure how well mulit page text stimuli can be integrated into this design. One idea is to have some a simple dataframe with the columns The attributes stimulus.text[page_id], stimulus.image[page_id] An alternative would be the other way around: stimulus.pages[0].text, stimulus.pages[0].image I prefer the former. not much experience with gaze text dataThis is a first proposel which should open up the discussion on developing this feature. I don't have that much experience with working with text aois. It is expected that I overlook some further issues. Each proposed point is open for discussion. |
No description provided.
The text was updated successfully, but these errors were encountered: