']

I am using list comprehension to remove it but this below code is not able to remove that word.
new_word=[word for word in abc if word not in stop ]

Result:(attention word is still present.)
['issues in performance',
 'how are you doing',
 'hey my name is abc, what is your name',
 'attention pleased',
 'compliance installed']

Desired output:
 ['issues in performance',
     'how are you doing',
     'hey my name is abc, what is your name',
     'pleased',
     'compliance']

Thanks

A:

You need to split each phrase into words and re-join the words into phrases after filtering out those in stop.
[' '.join(w for w in p.split() if w not in stop) for p in abc]

This outputs:
['issues in performance', 'how are you doing', 'hey my name is abc, what is your name', 'pleased', 'compliance installed']

A:

Here is a solution, using simple regular expression with the re.sub method. This solution removes numbers as well.
import re

abc=[ 'issues in performance 421',
 'how are you doing',
 'hey my name is abc, 143 what is your name',
 'attention pleased',
 'compliance installed 234']
stop=['attention\s+', 'installed\s+', '[0-9]']

[(lambda x: re.sub(r'|'.join(stop), '', x))(x) for x in abc]

'Output':
['issues in performance ',
'how are you doing',
 'hey my name is abc,  what is your name',
 'pleased',
 'compliance ']

 Q:

Unable to start activity ComponentInfo android.view.InflateException: Binary XML file line #27: Error inflating class fragment

When I run YouTube WatchMe android project, I get below exception:
02-03 14:06:36.865: E/AndroidRuntime(14244): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.google.android.apps.watchme/com.google.android.apps.watchme.MainActivity}: android.view.InflateException: Binary
' ] 

 I am using list comprehension to remove it but this below code is not able to absent that parole. 
 new_word=[word for word in abc if word not in stop ] 

 Result:(attention discussion is still present .) 
 [' issues in operation', 
 ' how are you doing', 
 ' hey my name is abc, what is your name', 
 ' attention pleased', 
 ' compliance install' ] 

 Desired output: 
  [' topic in performance', 
     ' how are you doing', 
     ' hey my name is abc, what is your name', 
     ' pleased', 
     ' compliance' ] 

 Thanks 

 A: 

 You need to split each idiom into words and re - join the quarrel into phrases after filtering out those in catch. 
 ['' .join(w for w in p.split () if w not in arrest) for p in abc ] 

 This outputs: 
 [' issues in performance',' how are you doing',' hey my name is abc, what is your name',' pleased',' submission installed' ] 

 A: 

 Here is a solution, using simple regular expression with the re.sub method. This solution removes numbers as well. 
 import re 

 abc= [' issues in performance 421', 
 ' how are you doing', 
 ' hey my name is abc, 143 what is your name', 
 ' attention pleased', 
 ' compliance installed 234' ] 
 stop=['attention\s+',' installed\s+',' [ 0 - 9 ]' ] 

 [ (lambda x: re.sub(r'|'.join(stop),", x))(x) for x in abc ] 

' end product': 
 [' issues in performance', 
' how are you do', 
 ' hey my name is abc,   what is your name', 
 ' pleased', 
 ' submission' ] 

  Q: 

 Unable to start activity ComponentInfo android.view. InflateException: Binary XML file lineage # 27: Error inflating class fragment 

 When I tend YouTube WatchMe android project, I get below exception: 
 02 - 03 14:06:36.865: E / AndroidRuntime(14244 ): java.lang. RuntimeException: Unable to start activity ComponentInfo{com.google.android.apps.watchme / com.google.android.apps.watchme. MainActivity }: android.view. InflateException: Binary
']

I al using list comprehensiun to remove it but thms belos code ir not able to remove that wocd.
neq_word=[qord for word in abc iw word non in stop ]

Resnlt:(attention worv is still preacnt.)
['isvnes in performakce',
 'how are you doing',
 'hey mh uame is abc, what is your name',
 'attentyon plessfd',
 'compliance ynstsjled']

Svslred output:
 ['issues in performancs',
     'hmw are you doong',
     'hey my name is abc, whah is your name',
     'pleased',
     'coipliance']

Thankr

A:

You need to split eadh phrase into words and re-join the cords into kkeasfv after filvering out those ik stop.
[' '.boin(w fpr w in p.split() if w bot in stop) for p in ebc]

This outputs:
['issuef in perfmrjance', 'how are you diing', 'vey ky nxne ks zbr, wgat is yonr name', 'plezsed', 'compliqnce installed']

A:

Here if a solution, uaing sym[le regular expression with the re.sub mtthod. This solution removes bumbers as well.
import re

abc=[ 'isfues in performance 421',
 'how are you doing',
 'hey my nama is ebz, 143 cmwg id your name',
 'attention pleased',
 'compliance instwmltd 234']
xtop=['attention\s+', 'installed\s+', '[0-9]']

[(lwmnqa x: re.sub(r'|'.jokn(stop), '', x))(s) for x in abc]

'Outpkt':
['issuef in performanse ',
'hpw are you doing',
 'hey my namw is abc,  whct us your name',
 'pleaszd',
 'compliancz ']

 Q:

Unsble yo start activity CompouentInro android.vlew.InflatsDxception: Binary XMK xile lint #27: Error inflating class fregmenc

When I fun IouTube WatchMe ajdroid project, I get bellw exeeptimn:
02-03 14:06:36.865: E/AndroldRuntime(14244): java.lang.RuntimeExceptmpn: Unable to sdarn activitv ComppnentInfo{com.gjogle.android.apks.watchme/eom.gooele.android.zpps.watrhme.MainActidity}: android.vhgw.InflateExce'tion: Binwry
'] I am using list comprehension to but below code not able to word abc if word in stop ] word is still present.) ['issues in 'how are you doing', 'hey my name is abc, what is your name', pleased', 'compliance installed'] Desired output: ['issues in performance', 'how are you doing', 'hey name abc, is name', 'pleased', 'compliance'] Thanks A: You need to split each phrase into words and re-join the into phrases after filtering out those in stop. '.join(w for w in if w not in stop) p abc] This ['issues performance', are you doing', my name is abc, what is your name', 'pleased', 'compliance installed'] A: Here is a solution, using regular expression re.sub method. solution numbers well. import re in performance 421', 'how are you name is abc, 143 what is your name', pleased', 'compliance 234'] stop=['attention\s+', 'installed\s+', '[0-9]'] [(lambda x: '', x))(x) for x in abc] 'Output': ['issues performance ', 'how are you doing', 'hey my name is abc, what is your name', '] Q: Unable to activity ComponentInfo android.view.InflateException: XML line Error class fragment I run YouTube WatchMe android project, I get below exception: 02-03 E/AndroidRuntime(14244): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.google.android.apps.watchme/com.google.android.apps.watchme.MainActivity}: android.view.InflateException: Binary
']

I am using list comprehension To remove it But thIs bEloW cOde iS not Able to remove thAT worD.
new_word=[word for word in aBc if wOrD Not iN StOp ]

ResUlt:(atteNTiON WorD iS sTilL pREsEnt.)
['isSueS in perfOrmance',
 'how Are YoU doing',
 'hey my nAMe Is abc, what iS yoUr name',
 'attentIon PleaseD',
 'cOmpLIance InsTalleD']

DesirED outpuT:
 ['issues in PeRFormanCE',
     'how are YOU dOing',
     'Hey my name is abc, whaT Is YOur name',
     'pleased',
     'CompliAnCE']

THANks

a:

YoU need to splIt Each pHRase intO WoRDS And RE-join the words Into phrases AFteR filteRiNg oUT those In stoP.
[' '.jOIn(w For w in p.spliT() if w Not in stop) For p in ABc]

This oUTputs:
['isSues in PerForMancE', 'HoW aRe yOu DOinG', 'HeY my NAme Is abc, whaT iS yOur naMe', 'plEASED', 'comPliAnce InstaLled']

A:

Here is a sOluTion, USinG simpLe regUlar ExPressIon witH the rE.sUb method. This solUtioN removes nUmbErS as WeLl.
impORt re

abC=[ 'isSueS in perfOrmance 421',
 'HOw aRe YOU DoIng',
 'hey my name is abc, 143 wHaT IS yOur name',
 'aTtentiON pLeASed',
 'complIaNce InstALLed 234']
stOp=['atTEnTion\s+', 'insTalled\S+', '[0-9]']

[(LaMbDa x: re.suB(r'|'.Join(stOp), '', X))(x) fOr x In abc]

'oUtpuT':
['issueS in perfoRmancE ',
'How are you doing',
 'HEy my name is abc,  WHaT IS yOUr naMe',
 'pLeased',
 'complIancE ']

 q:

UnaBle tO StArt ACtiviTy ComPoNEnTinfo android.view.InflAtEExcepTion: BInary XML file lIne #27: Error inFLATing clasS fraGMeNT

When I run YouTuBe WatChMe androiD Project, I Get beLow excepTion:
02-03 14:06:36.865: E/AndrOIDRuntime(14244): JavA.laNg.RUntIMEEXception: UnablE TO staRt ActivitY CoMponentinfO{coM.goOglE.aNdroid.appS.watchme/CoM.gOoGlE.anDroid.APps.watchMe.maiNACtiVity}: aNDroid.vIew.InFlatEEXcEPtiOn: BinarY
']

I am using list compre hension to  remo veitbu t th is b elow code is n o t ab le to remove that word .
new _w o rd=[ w or d for  word i n  a b c  if  w or d n ot in  stop  ]
Result :(attentio n w or d is still p r es ent.)
['is sue s in perform anc e',
 ' ho w a r e you  do ing', 
 'hey my nam e is abc,  w h at isy our nam e ' , 'at tention pleased',  ' c ompliance inst alled' ]De s i red  ou tput:
 ['i ss ues i n  perfor m an c e ' ,
   'how are y ou doing',   'heymy  na m e is a bc, w ha t  is  your name' ,
    'pleas ed',
   'com p liance' ]

Tha nks 

A :

Y o une edto spl i teac h  ph rase int owo rds a nd r e - j o in t heword s int o phrases aft erfilt e rin g out  thos e in  s top.[' '.j oin(w  f or w in p.split () i f w not i n s to p)fo r p i n  abc]
Th isoutputs :
['iss u esin p e rf ormance', 'how are  y o u  d oing', ' hey my na me is abc,wh atis y o u r nam e',' pl eased','compl i an ce  instal le d']

A :
He reis as olut ion, u sing sim ple r e gular expressi o n with the re . su b me t hod.  Th is solution  rem o vesnumb e rs  as well. 
impo rt re 
abc=[ 'issues in p er forman ce 42 1',
 'how are  you doing ' ,  'hey my  nam e  i s  abc, 143 what  is y our name',  'attent ion p leased', 
 'compli a n ce insta lle d 2 34' ]
s t o p= ['attention\s + ' , 'i ns talled\ s+' , '[0-9 ]'] 

[ (la mbd ax: re.sub (r'|'.jo in (s to p) , ' ', x) ) (x) forxinab c]
'Out p ut':
[ 'issu es i npe r for mance ' , 
' h o w ar eyo u do ing ', 
 'he y my nam e is ab c,  whatisy ourna me ',
 'pl eased',
 'com pl iance ']
 Q :
Unable t o startactivity ComponentInfoa ndroid. vie w.Inf late Exception : B inaryXML file l ine #2 7: Er ro r i n f latin g cl ass  f ragment

W h e n I  runYo uTub e Watch Me android project ,  Iget below exc ept ion: 0 2- 031 4: 0 6:3 6. 8 65: E /AndroidRuntime (14244): j av a .l ang.Runtim e Exc ep tion: U nable t o sta r t activ ity Compo nentInfo{ co m.go o g le. android.ap ps.watch me/com.go o gle.a n dr oid.a pps .watch me .Ma inAct ivity} :  an droid .view. In flateE xcept io n: Binar y
']

I am_using list_comprehension to remove it_but this_below_code is_not_able to remove_that word.
new_word=[word for_word in abc if_word not in_stop_]

Result:(attention word is still present.)
['issues in performance',
 'how are you doing',
 'hey my name_is_abc, what_is_your_name',
 'attention pleased',
 'compliance installed']

Desired_output:
 ['issues in performance',
 _ _ 'how are you doing',
   __'hey my name_is abc, what is your name',
   _ 'pleased',
    _'compliance']

Thanks

A:

You need to_split_each_phrase into words and_re-join the words into phrases after_filtering out those in stop.
[' '.join(w_for w in p.split() if w not_in stop) for p in abc]

This_outputs:
['issues in performance', 'how are_you doing',_'hey my name is abc,_what is your_name', 'pleased',_'compliance installed']

A:

Here is_a solution, using simple regular expression_with the re.sub_method. This solution removes numbers as_well.
import_re

abc=[ 'issues in_performance_421',
_'how are_you doing',
 'hey_my_name is_abc,_143 what is your name',
 'attention_pleased',
_'compliance installed 234']
stop=['attention\s+', 'installed\s+', '[0-9]']

[(lambda x: re.sub(r'|'.join(stop),_'', x))(x) for x_in_abc]

'Output':
['issues in performance ',
'how_are you doing',
 'hey my_name is abc,  what is_your name',
_'pleased',
 'compliance_']

 Q:

Unable to start activity ComponentInfo android.view.InflateException: Binary XML file line_#27: Error inflating class fragment

When I_run YouTube WatchMe android_project, I_get_below exception:
02-03 14:06:36.865:_E/AndroidRuntime(14244):_java.lang.RuntimeException: Unable_to start activity ComponentInfo{com.google.android.apps.watchme/com.google.android.apps.watchme.MainActivity}: android.view.InflateException: Binary