Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

dataclass_transform() got an unexpected keyword argument 'field_specifiers'

I am trying to work with this G2P package. But I am getting dataclass_transform() got an unexpected keyword argument 'field_specifiers' this error. I am trying to run their sample code that they have provided there after running !pip install g2p_en in my jupyter notebook. The sample code for which I am getting the error is attached below. Can someone please help me with the issue?

from g2p_en import G2p

texts = ["I have $250 in my pocket.", # number -> spell-out
         "popular pets, e.g. cats and dogs", # e.g. -> for example
         "I refuse to collect the refuse around here.", # homograph
         "I'm an activationist."] # newly coined word
g2p = G2p()
for text in texts:
    out = g2p(text)
    print(out)

>Solution :

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

Install the package from the anaconda base location (assuming you are using anaconda for jupyter notebook) with this command

conda install -c conda-forge g2p-en

Then simply import from g2p_en import G2p and run the example code. For me it did the job. There are various dependencies on anaconda base level which are not fully satisfied when you install the package from the jupyter lab only. You need to install from anaconda base location sometimes to make it work.

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading