Skip to content

add_srml_to_AOIs, add_tokens_to_AOIs are not extendable for future datasets #71

@quanphan2906

Description

@quanphan2906

These functions manually matches the name of the stimuli with the name of the original code file, from which the stimuli was adapted. An example can be seen below (this is taken from add_tokens_to_AOIs):

EMIP-Toolkit/emip_toolkit.py

Lines 1222 to 1245 in d1a7eab

if image_name == "rectangle_java.jpg":
file_name = "Rectangle.java"
if image_name == "rectangle_java2.jpg":
file_name = "Rectangle.java"
if image_name == "rectangle_python.jpg":
file_name = "Rectangle.py"
if image_name == "rectangle_scala.jpg":
file_name = "Rectangle.scala"
# vehicle files
if image_name == "vehicle_java.jpg":
file_name = "Vehicle.java"
if image_name == "vehicle_java2.jpg":
file_name = "Vehicle.java"
if image_name == "vehicle_python.jpg":
file_name = "vehicle.py"
if image_name == "vehicle_scala.jpg":
file_name = "Vehicle.scala"

This needs to be refactor to make the two functions extendable for future datasets.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions