Modified regex to include 30 additional English stop words
This commit is contained in:
+1
-1
@@ -439,7 +439,7 @@ sub hashtagify {
|
||||
# drop stop words
|
||||
# TODO : make these overridable
|
||||
next if length( $item ) < 3;
|
||||
next if lc( $item ) =~ m/^(and|are|but|can|for|from|had|her|his|have|how|its|that|the|their|they|theyre|this|was|what|when|you)$/;
|
||||
next if lc( $item ) =~ m/^a(lso|nd|ny|re)|been|but|can(not|t)?|e(ach|tc|very)|for|from|g(e|o)t|ha(d|ve)|has(nt)?|hers?|hi(m|s)|how|its|no(r|t)|ours?|she|some|th(an|at|em?|eirs?|(e|o)se|ey|eyre|is)|too|very|was|wh(at|en|o)|with|you(r|rs)?$/;
|
||||
# hashtagify it
|
||||
$item = '#' . $item;
|
||||
# use a hash here instead of an ordered list for auto-dedupe
|
||||
|
||||
Reference in New Issue
Block a user