Skip to content
Discussion options

You must be logged in to vote

Some of the defaults are only read in right when the pipeline is loaded and there's a lexeme cache in nlp.vocab, so the lexical attributes are only calculated the first time a token is seen. There's no way to clear the lexeme cache other than reloading the pipeline.

In the example above I think you're seeing the lexeme cache, so it would work if you hadn't processed a text containing "milliard" before modifying the function.

Instead of modifying nlp.Defaults, it's generally recommended to modify EnglishDefaults before loading an en pipeline. (Note that this affects any English pipeline loaded within the same script.)

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@afparsons
Comment options

@adrianeboyd
Comment options

Answer selected by afparsons
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feat / pipeline Feature: Processing pipeline and components
2 participants