Debian Codegraph @

filter-stop-words

raw
1 #!/bin/bash -norc
2
3 # Public domain notice for all NCBI EDirect scripts is located at:
4 # https://www.ncbi.nlm.nih.gov/books/NBK179288/#chapter6.Public_Domain_Notice
5
6 plus=false
7
8 if [ $# -gt 0 ]
9 then
10 if [ "$1" = "-plus" ] || [ "$1" = "plus" ]
11 then
12 plus=true
13 fi
14 shift
15 fi
16
17 stop_words="#a#about#above#abs#accordingly#across#after#afterwards#again#\
18 against#all#almost#alone#along#already#also#although#always#am#among#\
19 amongst#an#analyze#and#another#any#anyhow#anyone#anything#anywhere#\
20 applicable#apply#are#arise#around#as#assume#at#be#became#because#become#\
21 becomes#becoming#been#before#beforehand#being#below#beside#besides#between#\
22 beyond#both#but#by#came#can#cannot#cc#cm#come#compare#could#de#dealing#\
23 department#depend#did#discover#dl#do#does#done#due#during#each#ec#ed#\
24 effected#eg#either#else#elsewhere#enough#especially#et#etc#ever#every#\
25 everyone#everything#everywhere#except#find#for#found#from#further#gave#get#\
26 give#go#gone#got#gov#had#has#have#having#he#hence#her#here#hereafter#hereby#\
27 herein#hereupon#hers#herself#him#himself#his#how#however#hr#i#ie#if#ii#iii#\
28 immediately#importance#important#in#inc#incl#indeed#into#investigate#is#it#\
29 its#itself#just#keep#kept#kg#km#last#latter#latterly#lb#ld#letter#like#ltd#\
30 made#mainly#make#many#may#me#meanwhile#mg#might#ml#mm#mo#more#moreover#most#\
31 mostly#mr#much#mug#must#my#myself#namely#nearly#necessarily#neither#never#\
32 nevertheless#next#no#nobody#noone#nor#normally#nos#not#noted#nothing#now#\
33 nowhere#obtained#of#off#often#on#only#onto#or#other#others#otherwise#ought#\
34 our#ours#ourselves#out#over#overall#owing#own#oz#particularly#per#perhaps#\
35 pm#pmid#precede#predominantly#present#presently#previously#primarily#\
36 promptly#pt#quickly#quite#quot#rather#readily#really#recently#refs#\
37 regarding#relate#said#same#seem#seemed#seeming#seems#seen#seriously#several#\
38 shall#she#should#show#showed#shown#shows#significantly#since#slightly#so#\
39 some#somehow#someone#something#sometime#sometimes#somewhat#somewhere#soon#\
40 specifically#still#strongly#studied#studies#study#sub#substantially#such#\
41 sufficiently#take#tell#th#than#that#the#their#theirs#them#themselves#then#\
42 thence#there#thereafter#thereby#therefore#therein#thereupon#these#they#this#\
43 thorough#those#though#through#throughout#thru#thus#to#together#too#toward#\
44 towards#try#type#ug#under#unless#until#up#upon#us#use#used#usefully#\
45 usefulness#using#usually#various#very#via#was#we#were#what#whatever#when#\
46 whence#whenever#where#whereafter#whereas#whereby#wherein#whereupon#wherever#\
47 whether#which#while#whither#who#whoever#whom#whose#why#will#with#within#\
48 without#wk#would#wt#yet#you#your#yours#yourself#yourselves#yr#"
49 while read line
50 do
51 if [[ $stop_words != *"#$line#"* ]]
52 then
53 echo "$line"
54 elif [ -n "$*" ]
55 then
56 echo "$*"
57 elif [ "$plus" = true ]
58 then
59 echo "+"
60 fi
61 done