Closed cutecutecat closed 3 years ago
Hi @cutecutecat!
Thank you for your pull request and welcome to our community.
In order to merge any pull request (code, docs, etc.), we require contributors to sign our Contributor License Agreement, and we don't seem to have one on file for you.
In order for us to review and merge your suggested changes, please sign at https://code.facebook.com/cla. If you are contributing on behalf of someone else (eg your employer), the individual CLA may not be sufficient and your employer may need to sign the corporate CLA.
Once the CLA is signed, our tooling will perform checks and validations. Afterwards, the pull request will be tagged with CLA signed
. The tagging process may take up to 1 hour after signing. Please give it that time before contacting us about it.
If you have received this in error or have any questions, please contact us at cla@fb.com. Thanks!
Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Facebook open source project. Thanks!
Thanks for finding this and submitting a fix!
But actually this method doesn't make too much sense and isn't used in the codebase, maybe you could instead replace it with returning the token to idx mapping:
return self.tok_to_idx.copy()
Thx!
Thank you for your review!
As I see, self.tok_to_idx
is a map from all_toks
, which equals prepend_toks
+standard_toks
.
If we use self.tok_to_idx
in to_dict
, than from_dict
can no longer get standard_toks
. Therefore, it cannot work any more.
I have searched in the project and ensured there is nowhere require Alphabet.from_dict
.
If from_dict
is also deprecated as well? Can I remove from_dict
together?
Ah now I see where you're coming from - yes you can remove both! Thank you!
Fix error attribute 'toks' into 'standard_toks'