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

How to get embedding without deleting duplicates? #33

Open
WangyuchenCS opened this issue Nov 2, 2022 · 3 comments
Open

How to get embedding without deleting duplicates? #33

WangyuchenCS opened this issue Nov 2, 2022 · 3 comments

Comments

@WangyuchenCS
Copy link

Hi,
I wonder How to get embedding without deleting duplicates? as I found that the output .h5 file return a result that did not match the input .txt length, and it dropped duplicates.

@mjeensung
Copy link
Contributor

Hi @WangyuchenCS

Could you try --keep_text_order True when running the script?

@WangyuchenCS
Copy link
Author

Thanks a lot , but it cause an error that has not occurred before
image

@mjeensung
Copy link
Contributor

Thanks for reporting the error.

Could you replace line 13--16 as follows?

entity_id = str(i)
entity_name = f[entity_id].attrs['text']
embedding = f[entity_id]['embedding'][:]

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