Skip to content

doubt about the code #4

@Huangryyyy

Description

@Huangryyyy

I have a question regarding the logic in utils/chair.py, specifically around lines 128 and 129.

I noticed a potential index misalignment issue. The idxs appear to be generated based on the sentence's original structure. However, these indices are then used to look up words in raw_words. The raw_words list has already been processed to handle double_words, which can alter its length and the positions of subsequent words.

My concern is that if the sentence contains double_words, the idxs may no longer correspond to the correct word positions in the modified raw_words list, leading to a dislocation.

Could you please clarify if this is the intended behavior or if I might be misunderstanding a previous step? Thank you!

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