realpython / realpython/materials
textcat -> architecture extra fields not permitted
Chưa có ai nhận issue này.
- Ngôn ngữ chính
- Jupyter Notebook
- Star
- 5.2k
- Fork
- 5.3k
- Merge trung bình
- 4 ngày 10 giờ
- Pull request đã merge (30 ngày)
- 10
Mô tả
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
Hướng dẫn đóng góp
Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Hướng nghiên cứu
Bắt đầu với tutorial phân tích cảm xúc được liên kết trong issue và các dòng sử dụng nlp.create_pipe("textcat", config={"architecture": "simple_cnn"}) cùng textcat.add_label. Kiểm tra phiên bản spaCy mà tutorial yêu cầu so với phiên bản tạo ra ConfigValidationError. Hoàn thành khi ví dụ chạy mà không gặp lỗi về các trường bổ sung và các lời gọi label hợp lệ với phiên bản được hỗ trợ.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- python
- Lĩnh vực
- machine-learning
- Loại issue
- Lỗi
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức độ hoạt động
- Đình trệ
- Độ rõ ràng
- Khá rõ ràng
- Mức phù hợp với người mới
- 30/100