Skip to content

Add SATP translation testing module for soundscape attribute validation#124

Draft
Copilot wants to merge 3 commits intomainfrom
copilot/incorporate-translation-testing-code
Draft

Add SATP translation testing module for soundscape attribute validation#124
Copilot wants to merge 3 commits intomainfrom
copilot/incorporate-translation-testing-code

Conversation

Copy link

Copilot AI commented Nov 8, 2025

Incorporates translation testing methodology from the Soundscape Attributes Translation Project (SATP) to enable quantitative validation of soundscape attribute translations.

Changes

New module: soundscapy.databases.satp_testing

  • Translation quality metrics - Computes 7 criteria for main axes (APPR, UNDR, CLAR, ANTO, ORTH, NCON, IBAL) and 5 for derived axes (excludes ANTO, ORTH, NCON; adds CONN)
  • Statistical tests - Kruskal-Wallis test with effect size and Mann-Whitney test with Bonferroni correction for comparing translation candidates
  • Aggregation functions - Summary functions for grouping by candidate and/or country

Implementation

  • Translated from R code at ntudsp/satp-zsm-stage1
  • Main axes handle antonymic pairs (pleasant-annoying), derived axes handle single descriptors (vibrant, calm)
  • Test coverage: 20 unit tests, 7 doctests

Example Usage

import pandas as pd
from soundscapy.databases import satp_testing

# Survey data with translation ratings (0-10 scale)
df = pd.DataFrame({
    'COUNTRY': ['SG', 'MY'] * 10,
    'APPR': [...],  # Appropriateness ratings
    'UNDR': [...],  # Understandability ratings
    'ANTO': [...],  # Antonymy ratings (main axes only)
    'BIAS': [...],  # Bias scores
    'ASSOCW': [...],  # Association with word
    'ASSOCCW': [...],  # Association with counter-word
    'IMPCW': [...],  # Importance with word
    'IMPCCW': [...],  # Importance with counter-word
    'CANDIDATE': ['menyenangkan'] * 10 + ['sedap'] * 10
})

# Compute normalized metrics (0-1 scale)
results = satp_testing.compute_main_axis_criteria(df)

# Summarize and compare candidates
summary = satp_testing.summarize_main_axis(results)
stats = satp_testing.kruskal_wallis_test(results, axis_type="main")

Files Changed

  • src/soundscapy/databases/satp_testing.py - New module
  • src/soundscapy/databases/__init__.py - Export module
  • test/databases/test_satp_testing.py - Test suite
  • docs/reference/databases.md - Documentation update

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • zenodo.org
    • Triggering command: python -m pytest test/databases/test_satp.py test/databases/test_satp_testing.py -v --no-cov (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

Original prompt

This section details on the original issue you should resolve

<issue_title>Incorporate translation testing code from SATP into Soundscapy</issue_title>
<issue_description></issue_description>

Comments on the Issue (you are @copilot in this section)


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Copilot AI and others added 2 commits November 8, 2025 12:19
Co-authored-by: MitchellAcoustics <22335636+MitchellAcoustics@users.noreply.github.com>
Co-authored-by: MitchellAcoustics <22335636+MitchellAcoustics@users.noreply.github.com>
Copilot AI changed the title [WIP] Incorporate translation testing code from SATP into Soundscapy Add SATP translation testing module for soundscape attribute validation Nov 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Incorporate translation testing code from SATP into Soundscapy

2 participants