[E090] Extension 'languages' already exists on Doc. To overwrite the existing extension, set force=True
on Doc.set_extension
.
#13376
-
I am new to SpaCy and working on a project. The goal is to create a new column with the detected languages. I can do this but must take unconventional steps that would not work in production. The error is:
However as you will see in my code I do set force=True and I still get this error. For my use case I need to use Spacy_CLD since my text is in mixed languages per record. meaning it may have Spanish and English in one record. and I need the out put to say 'es', 'en' right now it says 'xx'. Here is the code that gets the error:
Now the unconventinal fix is if I add this line of code I will get a different error, then after i delete this line of code everything works fine. This is not acceptable for production though. Now the real data will come from a dataframe and I will look at one column to detect languages and output the detected languages to a new column. I have that part working fine. Its the language detect I am having an issue with. Any suggestion from some experienced SpaCy coders? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
My work around for now is this bit of code. I don't understand why it works, but it does.
|
Beta Was this translation helpful? Give feedback.
My work around for now is this bit of code. I don't understand why it works, but it does.