Skip to content
This repository has been archived by the owner on Jun 1, 2023. It is now read-only.

TypeError: __init__() missing 1 required positional argument: 'nlp' #68

Open
ZOC-cyber opened this issue Dec 19, 2022 · 0 comments
Open

Comments

@ZOC-cyber
Copy link

Error occrred when I tested pyate(pyate v0.5.5, spacy 3.4.4, en_core 3.4.1, python 3.7.6).
The source codes are from demo:
from pyate import combo_basic

string = """Central to the development of cancer are genetic changes that endow these “cancer cells” with many of the
hallmarks of cancer, such as self-sufficient growth and resistance to anti-growth and pro-death signals. However, while the
genetic changes that occur within cancer cells themselves, such as activated oncogenes or dysfunctional tumor suppressors,
are responsible for many aspects of cancer development, they are not sufficient. Tumor promotion and progression are
dependent on ancillary processes provided by cells of the tumor environment but that are not necessarily cancerous
themselves. Inflammation has long been associated with the development of cancer. This review will discuss the reflexive
relationship between cancer and inflammation with particular focus on how considering the role of inflammation in physiologic
processes such as the maintenance of tissue homeostasis and repair may provide a logical framework for understanding the U
connection between the inflammatory response and cancer."""
import spacy
from pyate.term_extraction_pipeline import TermExtractionPipeline

nlp = spacy.load("en_core_web_sm")
nlp.add_pipe(TermExtractionPipeline())
print(doc._.combo_basic.sort_values(ascending=False).head(5))

The error info:

nlp.add_pipe(TermExtractionPipeline())
TypeError: init() missing 1 required positional argument: 'nlp'

How can I debug the problem? Many thanks!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant