explosion / explosion/spaCy

can't not use wordpieces in Spacy 3.7.5 with en_core_web_trf

Open
#13,543 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
33.9k
Forks
4.7k
Avg merge
3m
Merged PRs (30d)
1

Description

When I run

>>> import spacy
>>> nlp = spacy.load("en_core_web_trf")
>>> utt8 = nlp("It went there unwillingly.")
>>> utt8._.trf_data.wordpieces

it meet error, so I run

>>> utt8 = utt8._.trf_data
>>> print(dir(utt8))
['__annotations__', '__class__', '__dataclass_fields__', '__dataclass_params__', '__delattr__', '__dict__', '__dir__', '__doc__', '__eq__', '__format__', '__ge__', '__getattribute__', '__getstate__', '__gt__', '__hash__', '__init__', '__init_subclass__', '__le__', '__lt__', '__match_args__', '__module__', '__ne__', '__new__', '__reduce__', '__reduce_ex__', '__repr__', '__setattr__', '__sizeof__', '__str__', '__subclasshook__', '__weakref__', 'all_hidden_layer_states', 'all_outputs', 'embedding_layer', 'from_dict', 'last_hidden_layer_state', 'last_layer_only', 'num_outputs', 'to_dict']

so which one I can choose to replace wordpieces in this 3.7.x version, thank you!

## How to reproduce the behaviour

## Your Environment

* Operating System:
* Python Version Used:
* spaCy Version Used:
* Environment Information:

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.