Setting different defaults for the same language #11872
-
Hello, I'm creating a SpaCy pipeline and customizing the stopword list as follows:
This works as expected. However, it seems like I'm changing globally the class Defaults so that, if I'd like to create a new pipeline with the default stopword set:
it would not be possible. It would be affected by the stopword list modification above. Is there a way to make this change affect only the instance and not the class? How can I have two instances with different parameters? Thanks in advice. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
Changing the defaults does affect the whole class. Instead, you'd want to use a custom language, as shown here: https://spacy.io/usage/linguistic-features/#language-subclass If you're not using any of the components in If you do want to combine components from |
Beta Was this translation helpful? Give feedback.
Changing the defaults does affect the whole class. Instead, you'd want to use a custom language, as shown here: https://spacy.io/usage/linguistic-features/#language-subclass
If you're not using any of the components in
es_core_news_md
, you can consider usingspacy.blank("es")
instead, which would turn intospacy.blank("custom_es")
for your customized language.If you do want to combine components from
es_core_news_md
and your custom language class it's a little more complicated, but let me know what you're trying to do and I can explain the details.