I want to find a pattern (WITH RE.COMPILE) for the exact words like this,
Imagine such words [aether, altitude, aphelion, west]
which kind of capture word or word with punctuation, In a way that I can use it in spacy, I used this but it does not work
regex_patterns = [ re.compile(r'aether?,|altitude?,|aphelion?,|apside?,|apsis?,|ascension?,|autumnal equinox?,|east?.|eastward?,|eclipse?,|ecliptic?,|elliptical?,|epicycle?,|equinoctical?,|exquinox?,|fixed star?,|latitude?,|longitude?s|mean ecliptic?,|meridian?,|mobile star?,|node?,|nodes?,|north?,|octant?,|orbit?,|\borbital?,|\bparallax?,|\brays?,|\bretrograde?,|rise?,|sidereal?,|sidereal position?,|solstice?,|south?,|star?,|vernal equinox?,|west?,') ]
It would be nice if regex capture 'word' and 'word,' (word +punctuation) like in this sentence
"west, can take a look"
the result should be