Experimental CoreferenceResolver fails (KeyError: "Parameter 'E' for model 'hashembed' has not been allocated yet.") #11800
-
Hi, I was interested in seeing if the experimental CoreferenceResolver would work for a problem I'm trying to solve in one of my projects. I decided to start by copying the examples from the documentation page and encountered this error. Any insight is appriciated. How to reproduce the behaviour
This snippet was found on the coref documentation page Stacktrace:
Similar issues I found: Your EnvironmentInfo about spaCy
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Sorry this isn't perfectly clear, but that part of the docs is designed to give you an idea of how things work, and not to be copy-pasted. In particular the last line is just intended to illustrate how the component is used and definitely cannot be just run after the preceding lines. This particular error is because the component you just added hasn't been trained, so it's uninitialized. You need to initialize the component first, at which point you won't get an error, but you also won't get meaningful results until you train it. For getting started with coref, I would recommend checking out the sample project. The API docs are more details if you need to tweak things or learn about the internals. |
Beta Was this translation helpful? Give feedback.
Sorry this isn't perfectly clear, but that part of the docs is designed to give you an idea of how things work, and not to be copy-pasted. In particular the last line is just intended to illustrate how the component is used and definitely cannot be just run after the preceding lines.
This particular error is because the component you just added hasn't been trained, so it's uninitialized. You need to initialize the component first, at which point you won't get an error, but you also won't get meaningful results until you train it.
For getting started with coref, I would recommend checking out the sample project. The API docs are more details if you need to tweak things or learn about the i…