-2

I am getting this error when trying our rasa_nlu with spacy

AttributeError: 'sklearn_crfsuite' object has no attribute 'CRF'

rasa_nlu was importing this way import sklearn_crfsuite

So I tried importing like below before calling rasa_nlu from sklearn_crfsuite import CRF

But getting a different

error - cannot import name 'CRF'

Looking for some suggestions.

Dexters
  • 2,419
  • 6
  • 37
  • 57

1 Answers1

0

If you want to do sklearn_crfsuite.CRF, then do import sklearn_crfsuite to import it. If you're importing with from sklearn_crfsuite import CRF, then just use CRF by itself.

  • import sklearn_crfsuit is what is there already within rasa_nlu. when i followed the error. So thats why I tried rom sklearn_crfsuit import CRF. – Dexters Oct 12 '18 at 02:08
  • @Dexters You also appear to be missing the "e" on the end of the name. It's "suite", not "suit". – Joseph Sible-Reinstate Monica Oct 12 '18 at 02:12
  • Thanks for catching this. Sorry, Its a question typo. I made a mistake when I tried to recreate the error for the question. But Original error remains. – Dexters Oct 12 '18 at 02:18