Last active
March 22, 2021 16:48
-
-
Save jroakes/248eefdfdac92e24195e4f9a3afb623e to your computer and use it in GitHub Desktop.
Use NLTK Stopwords List to group similar text fields in Google Data Studio
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
REGEXP_REPLACE(REGEXP_REPLACE(REGEXP_REPLACE(LOWER(<field_to_convert>), "[^\\w]+", " "), "(\\ |^)(me|my|the|of|myself|we|our|ours|ourselves|you|your|yours|yourself|yourselves|he|him|his|himself|she|her|hers|herself|it|its|itself|they|them|their|theirs|themselves|what|which|who|whom|this|that|these|those|am|is|are|was|were|be|been|being|have|has|had|having|do|does|did|doing|a|an|the|and|but|if|or|because|as|until|while|of|at|by|for|with|about|against|between|into|through|during|before|after|above|below|to|from|up|down|in|out|on|off|over|under|again|further|then|once|here|there|when|where|why|how|all|any|both|each|few|more|most|other|some|such|no|nor|not|only|own|same|so|than|too|very|can|will|just|don|should|now|i|t|s)(\\ |$)", " "), "[\\s]{2,}", " ") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment