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

Add option to split alignment output based on maximum character length #88

Open
gerazov opened this issue May 6, 2024 · 0 comments
Open

Comments

@gerazov
Copy link

gerazov commented May 6, 2024

This would be useful for looking at alignments of long sentences, e.g.:

    out = jiwer.process_words(
        "This is a very long sentence that is much longer than the previous one or the one before that",
        "This is a very loong sentence that is not much longer than the previous one or one before that",
        )

    print(jiwer.visualize_alignment(out, max_chars=80))

Would output:

sentence 1
REF: This is a very  long sentence that is *** much longer than the previous one
HYP: This is a very loong sentence that is not much longer than the previous one
                        S                    I

REF: or the one before that
HYP: or *** one before that
          D
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 a pull request may close this issue.

1 participant