Skip to content

TypeError: can not serialize 'TextBlob' object #22

Description

@AltfunsMA

Just trying this expansion, but it doesn't seem like you can use the pipe with more than one process, which makes it far less attractive.

The following yields the error in the subject

import spacy
from spacytextblob.spacytextblob import SpacyTextBlob

nlp = spacy.load("en_core_web_sm")

nlp.add_pipe('spacytextblob')

l = ['This is great. But this is horrible', 'The answer to everything is 42. What did you believe?']

docs = nlp.pipe(l, n_process = 2)

for doc in docs:

  for s in doc.sents:
   
    s._.blob.polarity             
    s._.blob.subjectivity
 

Metadata

Metadata

Assignees

Labels

enhancementNew feature or requesthelp wantedExtra attention is needed

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions