Hi, I am new to prodigy and learning to use the tool.
I want to do text classification and created a dataset with seeds terms. This dataset named pricing_seeds is in prodigy database and can be read with prodigy print-dataset method.
Yet I am unable to use the terms.to_pattern method due to the below error.
In addition I am unable to see the dataset using this snippet
from prodigy.components.db import connect
db = connect()
all_dataset_names = db.datasets
all_dataset_names
I do not understand the problem.
Any help would be much appreciated !
@Prodigy_Spacy> prodigy terms.to-patterns pricing_seeds ./pricing_seeds.jsonl --label PRICING --spacy-model en_core_web_lg
Traceback (most recent call last):
File "C:\Users\lveys\anaconda3\lib\runpy.py", line 194, in _run_module_as_main
return _run_code(code, main_globals, None,
File "C:\Users\lveys\anaconda3\lib\runpy.py", line 87, in _run_code
exec(code, run_globals)
File "C:\Users\lveys\.virtualenvs\_Prodigy_Spacy-fzgAanM1\lib\site-packages\prodigy\__main__.py", line 61, in <module>
controller = recipe(*args, use_plac=True)
File "cython_src\prodigy\core.pyx", line 426, in prodigy.core.recipe.recipe_decorator.recipe_proxy
File "C:\Users\lveys\.virtualenvs\_Prodigy_Spacy-fzgAanM1\lib\site-packages\plac_core.py", line 367, in call
cmd, result = parser.consume(arglist)
File "C:\Users\lveys\.virtualenvs\_Prodigy_Spacy-fzgAanM1\lib\site-packages\plac_core.py", line 232, in consume
return cmd, self.func(*(args + varargs + extraopts), **kwargs)
File "C:\Users\lveys\.virtualenvs\_Prodigy_Spacy-fzgAanM1\lib\site-packages\prodigy\recipes\terms.py", line 174, in to_patterns
DB = connect()
NameError: name 'connect' is not defined