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

The result of decoding BPE #61

Open
temav opened this issue Mar 23, 2023 · 4 comments
Open

The result of decoding BPE #61

temav opened this issue Mar 23, 2023 · 4 comments

Comments

@temav
Copy link

temav commented Mar 23, 2023

Hello!
Could you help me understand the following output?
I passed these tags as query label to DecomposedMetaNER:
['action', 'action', 'O', 'entity', 'O', 'O', 'O', 'action', 'O', 'property', 'entity', 'O', 'O', 'property', 'entity', 'O', 'O', 'property', 'O', 'entity', 'O', 'O']
And after applying convert_bpe I have word indexes:
[[0, 1], [3, 4], [7, 8], [9, 9], [10, 11], [13, 13], [14, 15], [17, 17], [19, 20]]
What is the logic of pairs? Why can I get [i, i] or [i, i+1] for some single words?

@temav
Copy link
Author

temav commented Mar 23, 2023

The end goal was to get model prediction in conll or jsonl format

@temav
Copy link
Author

temav commented Mar 23, 2023

It seems you have a bug at L823
You should replace bisect.left with bisect.right, am I right?

@iofu728
Copy link
Contributor

iofu728 commented Apr 18, 2023

It seems you have a bug at L823 You should replace bisect.left with bisect.right, am I right?

Hi @temav, I think you are right. However, the function convert_bpe has been deprecated. We did not use this function in our experiments. And we will fix this issue in the next PR, thank you!

@temav
Copy link
Author

temav commented Apr 27, 2023

I see, thanks!

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