Skip to content
This repository was archived by the owner on Mar 22, 2025. It is now read-only.

'str' object has no attribute 'exists' #169

@mirfan899

Description

@mirfan899

Describe the bug

I'm trying to use the sentiment model.

To Reproduce

from danlp.models import load_spacy_model
import operator 

# load the model
nlp = load_spacy_model(textcat='sentiment') 

# use the model for prediction
doc = nlp("Vi er glade for spacy!")
max(doc.cats.items(), key=operator.itemgetter(1))[0]

Screenshots

danlp

Your Environment

  • Operating system:
  • Python version: 3.8.16
  • DaNLP version: 0.1.2

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions