Re: COMMERCIAL:Re: Hive - regexp_replace function for multiple strings

2015-02-12 Thread Viral Parikh
@hive.apache.org user@hive.apache.orgmailto:user@hive.apache.org Cc: Viral Parikh viral.j.par...@gmail.commailto:viral.j.par...@gmail.com Subject: RE: COMMERCIAL:Re: Hive - regexp_replace function for multiple strings Below 2 solutions. Solution1 uses lookahead and lookbehind but works with bi-grams

RE: COMMERCIAL:Re: Hive - regexp_replace function for multiple strings

2015-02-06 Thread Matthew Dixon
...@gmail.com] Sent: 03 February 2015 21:56 To: user@hive.apache.org Cc: Viral Parikh Subject: COMMERCIAL:Re: Hive - regexp_replace function for multiple strings I don't think this is doable using the out of the box regexp_replace() UDF. That way I would do it, is using a file to create a mapping

Hive - regexp_replace function for multiple strings

2015-02-03 Thread Viral Parikh
Hi Everyone, I am using hive 0.13! I want to find multiple tokens like hip hop and rock music in my data and replace them with hiphop and rockmusic - basically replace them without white space. I have used the regexp_replace function in hive. Below is my query and it works great for above 2

Re: Hive - regexp_replace function for multiple strings

2015-02-03 Thread Pradeep Gollakota
I don't think this is doable using the out of the box regexp_replace() UDF. That way I would do it, is using a file to create a mapping between a regexp and it's replacement and write a custom UDF that loads this file and applies all regular expressions on the input. Hope this helps. On Tue, Feb

Re: Hive - regexp_replace function for multiple strings

2015-02-03 Thread Devopam Mittra
hi Viral, Unless you are strictly bound to change the text to achieve your objectives... you may actually wish to explore ngrams and context_ngram combinations to uniquely identify the patterns you want to explore and move them to a new table for further processinng Better do it at file level on