NER Demo notebooks fail on NerConverter
w2o-hbrashear opened this issue · 1 comments
w2o-hbrashear commented
When I run the some NER demo notebooks in CoLab, the code fails on NerConverter on setInputCols
Description
---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
[<ipython-input-24-af178ab2dc2d>](https://localhost:8080/#) in <module>
21
22 ner_converter = NerConverter()\
---> 23 .setInputCols(['document', 'token', 'ner'])\
24 .setOutputCol('ner_chunk')
25
1 frames
[/usr/local/lib/python3.7/dist-packages/sparknlp/common/annotator_properties.py](https://localhost:8080/#) in inputColsValidation(self, value)
65 if actual_columns != expected_columns:
66 raise TypeError(
---> 67 f"setInputCols in {self.uid} expecting {expected_columns} columns. "
68 f"Provided column amount: {actual_columns}. "
69 f"Which should be columns from the following annotators: {self.inputAnnotatorTypes}")
TypeError: setInputCols in NerConverter_b8ceba550877 expecting 0 columns. Provided column amount: 3. Which should be columns from the following annotators: []
Steps to Reproduce
Run the following demo notebooks in CoLab:
- https://colab.research.google.com/github/JohnSnowLabs/spark-nlp-workshop/blob/master/tutorials/streamlit_notebooks/NER_FewNERD.ipynb
- https://colab.research.google.com/github/JohnSnowLabs/spark-nlp-workshop/blob/master/tutorials/streamlit_notebooks/NER_EN.ipynb
They are the first two NER options on https://nlp.johnsnowlabs.com/recognize_entitie
Not affected
Your Environment
- Spark-NLP version: 4.2.3
- Apache Spark version: 3.1.2
- Operating System and version: CoLab
- Deployment (Docker, Jupyter, Scala, pip, conda, etc.): CoLab
Cabir40 commented
solved with 4.2.8 , and notebooks are updated