What is the best way to replace one word with one/more words #9991
-
Hi I wish to use SpaCy to analyze a bunch of sentences, the things is I want to explicitly transform abbreviations and common phrases into their full meaning, suppose I have the following dictionary:
I want to be able to transform words according to the dictionary when the language is applied on a sentence (sentences are deliberately lower case). e.g:
Changing the Token's text is not possible ( |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
You could a custom extension or even just your dict for this. Something like:
If you use a custom extension you could set an underscore property, like |
Beta Was this translation helpful? Give feedback.
You could a custom extension or even just your dict for this. Something like:
If you use a custom extension you could set an underscore property, like
tok._.expanded
.