Quantcast
Channel: Active questions tagged python - Stack Overflow
Viewing all articles
Browse latest Browse all 17303

How to tag words that not include one specific symbol in Spacy?

$
0
0

I'm trying to tag one word in Spacy using regex, but I want to add one condition: it can't contain symbol '/' in any place inside. My code looks like this:

[{'lower': {"regex": "^.*(word).*?"}}]

I tried using ^ to exclude this but It didn't work.

So examples:

  1. 'subwordw' tagged: 'subword'
  2. 'subword/w' tagged nothing

Viewing all articles
Browse latest Browse all 17303

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>