Skip to content

RuntimeError: Word is too long! #8

@kavyamanohar

Description

@kavyamanohar

Is there any inherent limit on the length of reference and hypothesis strings?

The following code snippet resulted in Run-time error for me.

ref_string = "ಕಾಶ್ಮೀರ ವಿಚಾರ ಕುರಿತಂತೆ ಪ್ರತಿಕ್ರಿಯಿಸಿದ ಅಮೇರಿಕ ಅಧ್ಯಕ್ಷ ಡೊನಾಲ್ಡ್ ಟ್ರಂಪ್ ಈ ಸಮಸ್ನೆಯನ್ನು ಭಾರತ ಮತ್ತು ಪಾಕಿಸ್ತಾನ ಸದ್ಯವೇ ಬಗೆಹರಿಸಿಕೊಳ್ಳಲಿವೆ ಎಂದು ಹೇಳಿದರು"
pred_string = "ಕಾಶ್ಮೀರ ವಿಚಾರ ಕುರಿತಂತೆ ಪ್ರತಿಕ್ರಿಯಿಸಿದ ಅಮೇರಿಕಾ ಅಧ್ಯಕ್ಷ ಡೊನಾಲ್ಡ್ ಟ್ರಂಪ್ ಈ ಸಮಸ್ಯೆಯನ್ನು ಭಾರತ ಮತ್ತು ಪಾಕಿಸ್ತಾನದಲ್ಲಿದೆ, ಸ್ಥಾನ ಸಧ್ಯವೇ ಬಗೆಹರಿಸಿಕೊಳ್ಳಲಿದೆ ಎಂದು ಹೇಳಿದರು."

ref_string_vector = StringVector(ref_string.split())
hypothesis_string_vector = StringVector(pred_string.split())

[aligned_a, aligned_b, cost] = align_texts(
    ref_string_vector,
    hypothesis_string_vector,
    use_chardiff=True,
    debug=False,
)

cost = texterrors_align.calc_sum_cost(summed_cost, words_a, words_b, use_chardiff, True) RuntimeError: Word is too long! Increase buffer

Is there any way out if I want to perform character aware alignment with long strings?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions