realpython / realpython/materials
textcat -> architecture extra fields not permitted
Nessuno ha ancora preso questa issue.
- Lingua principale
- Jupyter Notebook
- Stelle
- 5.2k
- Fork
- 5.3k
- Merge medio
- 4g 10h
- PR unite (30g)
- 10
Descrizione
Good evening sir,
I've been trying to practise what I've learned from your tutorial:(https://realpython.com/sentiment-analysis-python/) using PyCharm.
And these lines:
textcat.add_label("pos")
textcat.add_label("neg")
generated a warning ==>
#Cannot find reference 'add_label' in '(Doc) -> Doc | (Doc) -> Doc'
I thought it maybe because of a difference between my spacy version and yours, so I run the script anyway, but then I got the an error from this line==>
textcat = nlp.create_pipe("textcat", config={"architecture": "simple_cnn"})
Error msg:
raise ConfigValidationError(
thinc.config.ConfigValidationError:
Config validation error
textcat -> architecture extra fields not permitted
{'nlp': <spacy.lang.en.English object at 0x0000015E74F625E0>, 'name': 'textcat', 'architecture': 'simple_cnn', 'model': {'@architectures': 'spacy.TextCatEnsemble.v2', 'linear_model': {'@architectures': 'spacy.TextCatBOW.v1', 'exclusive_classes': True, 'ngram_size': 1, 'no_output_layer': False}, 'tok2vec': {'@architectures': 'spacy.Tok2Vec.v2', 'embed': {'@architectures': 'spacy.MultiHashEmbed.v1', 'width': 64, 'rows': [2000, 2000, 1000, 1000, 1000, 1000], 'attrs': ['ORTH', 'LOWER', 'PREFIX', 'SUFFIX', 'SHAPE', 'ID'], 'include_static_vectors': False}, 'encode': {'@architectures': 'spacy.MaxoutWindowEncoder.v2', 'width': 64, 'window_size': 1, 'maxout_pieces': 3, 'depth': 2}}}, 'threshold': 0.5, '@factories': 'textcat'}
I'm very new to spacy and data analysis over all, so please excuse me if it's a stupid mistake from my side.
Thank you
Guida per i contributori
Nessuna guida per i contributori indicizzata per questo repository
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Direzione di ricerca
Inizia con il tutorial sull’analisi del sentiment collegato nell’issue e con le righe che usano nlp.create_pipe("textcat", config={"architecture": "simple_cnn"}) e textcat.add_label. Verifica la versione di spaCy prevista dal tutorial rispetto alla versione che produce il ConfigValidationError. Il lavoro è concluso quando l’esempio viene eseguito senza l’errore relativo ai campi aggiuntivi e le chiamate alle label sono valide per la versione supportata.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- python
- Ambito
- machine-learning
- Tipo di issue
- Bug
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Stato di attività
- Ferma
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 30/100