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

Where is the -inf condition being enforced ? #83

Open
swarnadeep8597 opened this issue Nov 13, 2022 · 0 comments
Open

Where is the -inf condition being enforced ? #83

swarnadeep8597 opened this issue Nov 13, 2022 · 0 comments

Comments

@swarnadeep8597
Copy link

Hello,
How are you enforcing the -inf condition if the two words are not in the same branch ?
In the code you are setting both the places as 1, bit shouldn't it be 0 and -inf ?

Calculate Visible Matrix

        visible_matrix = np.zeros((token_num,token_num))
        for item in abs_idx_tree:
            src_ids = item[0]
            for id in src_ids:
                visible_abs_idx = abs_idx_src + [idx for ent in item[1] for idx in ent]
                #print(visible_abs_idx)
                visible_matrix[id,visible_abs_idx] = 1 
            for ent in item[1]:
                for id in ent:
                    visible_abs_idx = ent + src_ids
                    visible_matrix[id,visible_abs_idx] = 1
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

1 participant