Skip to content
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

Implement a NoTransform operation #116

Open
nikvaessen opened this issue Feb 13, 2025 · 2 comments
Open

Implement a NoTransform operation #116

nikvaessen opened this issue Feb 13, 2025 · 2 comments

Comments

@nikvaessen
Copy link
Collaborator

nikvaessen commented Feb 13, 2025

what would you think about adding a "NoTransform" placeholder class ?

This would be used, if user wishes to do all the transforms himself, example here:
KarelVesely84@1c5f29d#diff-aae25c8b196777e4abeb01845ca517591f65580977ee7d1f639b5bbf16e26d9d
(plus a registration is necessary in transforms.py header to __all__ variable)

Or can there be something similar already in the code ?

Thank you & best regards
Karel

Originally posted by @KarelVesely84 in #108 (comment)

@nikvaessen
Copy link
Collaborator Author

nikvaessen commented Feb 13, 2025

This behavior can currently be done with:

import jiwer

ref = [['already', 'transformed']]
hyp = "needs to be transformed"

jiwer.process_words(ref, hyp, reference_transform=jiwer.Compose([]))

Can you specify why the default transformation is problematic in your case? It is quite minimal.

wer_default = tr.Compose(
    [
        tr.RemoveMultipleSpaces(),
        tr.Strip(),
        tr.ReduceToListOfListOfWords(),
    ]
)

@KarelVesely84
Copy link

Aha, I see, you are right.
(Maybe I am just a little "obsessed" by doing things on my own)

Thank you for the suggestion.
K.

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

No branches or pull requests

2 participants